From: Colin Walters <walters@cis.ohio-state.edu>
Subject: Re: emacs-21 and gnus
Date: Fri, 13 Jul 2001 00:51:46 -0400 [thread overview]
Message-ID: <8766cx4ejh.church.of.emacs@cis.ohio-state.edu> (raw)
In-Reply-To: <ysd6d775sn4g.fsf@sol-cmarquar.pet.usa.alcatel.com>
Colin Marquardt <colin.marquardt@usa.alcatel.com> writes:
> Some users still might want that, true. If not, it adds some
> incentive to switch to Emacs 21 ;-)
It does look nice in Emacs 21. Screen shot at:
<URL:http://www.cis.ohio-state.edu/~walters/shot.jpg>
> What do they get on the console?
An arrow overlay, just like in Emacs20 and XEmacs.
> Sounds reasonable to me. Or maybe set it to nil per default, and
> after people start using and liking it, make t the default.
Another option is to make it turned on by default only if:
(and (string-match "GNU" (emacs-version))
(>= emacs-major-version 21)
(display-graphic-p))
> Unfortunately, I cannot really try your first patch since I still
> didn't switch the either XEmacs 21.4 or Emacs 21 (which is more
> likely to happen).
Well, it does work in Emacs 20, too. It *should* work in XEmacs, but
I haven't tried it, because my init files and everything are too
tightly bound to GNU Emacs.
Here's an updated patch (supersedes the old one):
2001-07-12 Colin Walters <walters@cis.ohio-state.edu>
* gnus-sum.el (gnus-summary-display-arrow): New variable.
(gnus-summary-set-article-display-arrow): New function.
(gnus-summary-goto-subject): Use it.
--- gnus-sum.el.~6.72.~ Thu Jul 12 13:04:12 2001
+++ gnus-sum.el Fri Jul 13 00:44:36 2001
@@ -797,6 +797,15 @@
:group 'gnus-summary
:type 'hook)
+(defcustom gnus-summary-display-arrow
+ (and (string-match "GNU" (emacs-version))
+ (>= emacs-major-version 21)
+ (display-graphic-p))
+ "*If non-nil, display an arrow highlighting the current article."
+ :version "21.1"
+ :group 'gnus-summary
+ :type 'boolean)
+
(defcustom gnus-summary-selected-face 'gnus-summary-selected-face
"Face used for highlighting the current article in the summary buffer."
:group 'gnus-summary-visual
@@ -2703,6 +2712,21 @@
(aset table i [??]))))
(setq buffer-display-table table)))
+(defun gnus-summary-set-article-display-arrow (pos)
+ "Update the overlay arrow to point to line at position POS."
+ (when (and gnus-summary-display-arrow
+ (boundp 'overlay-arrow-position)
+ (boundp 'overlay-arrow-string))
+ (save-excursion
+ (goto-char pos)
+ (beginning-of-line)
+ (unless overlay-arrow-position
+ (setq overlay-arrow-position (make-marker)))
+ (setq overlay-arrow-string "=>"
+ overlay-arrow-position (set-marker overlay-arrow-position
+ (point)
+ (current-buffer))))))
+
(defun gnus-summary-buffer-name (group)
"Return the summary buffer name of GROUP."
(concat "*Summary " group "*"))
@@ -6123,7 +6147,9 @@
(unless silent
(gnus-message 3 "Can't find article %d" article))
nil)
- (goto-char (gnus-data-pos data))
+ (let ((pt (gnus-data-pos data)))
+ (goto-char pt)
+ (gnus-summary-set-article-display-arrow pt))
(gnus-summary-position-point)
article)))
next prev parent reply other threads:[~2001-07-13 4:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-11 19:34 reader
2001-07-11 20:09 ` Colin Walters
2001-07-11 22:20 ` Harry Putnam
2001-07-11 22:49 ` Kai Großjohann
2001-07-11 23:16 ` Colin Marquardt
2001-07-12 11:17 ` Kai Großjohann
2001-07-12 19:02 ` Colin Walters
2001-07-12 20:41 ` Colin Walters
2001-07-13 0:12 ` Colin Marquardt
2001-07-13 4:51 ` Colin Walters [this message]
2001-07-13 18:46 ` Colin Marquardt
2001-07-18 12:58 ` Fabien Penso
2001-07-20 17:13 ` Mattias Ahnberg
2001-07-30 13:06 ` Fabien Penso
2001-07-13 8:51 ` Kai Großjohann
2001-07-13 15:12 ` Colin Walters
2001-07-12 3:20 ` Harry Putnam
2001-07-12 11:19 ` Kai Großjohann
2001-07-12 18:25 ` Harry Putnam
2001-07-12 3:07 ` Karl Eichwalder
2001-07-12 10:28 ` Gerd Moellmann
2001-07-12 20:34 ` Karl Eichwalder
2001-07-13 9:19 ` Richard Stallman
2001-07-19 5:55 ` Karl Eichwalder
2001-07-19 6:57 ` Eli Zaretskii
2001-07-11 20:50 ` luis fernandes
2001-07-11 22:20 ` Harry Putnam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8766cx4ejh.church.of.emacs@cis.ohio-state.edu \
--to=walters@cis.ohio-state.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).