From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/36901 Path: main.gmane.org!not-for-mail From: Colin Walters Newsgroups: gmane.emacs.gnus.general Subject: Re: emacs-21 and gnus Date: Fri, 13 Jul 2001 00:51:46 -0400 Organization: The Ohio State University Dept. of Computer and Info. Science Message-ID: <8766cx4ejh.church.of.emacs@cis.ohio-state.edu> References: <87g0c3cjni.church.of.emacs@cis.ohio-state.edu> <87y9pu9djn.church.of.emacs@cis.ohio-state.edu> <87u20hubh4.church.of.emacs@cis.ohio-state.edu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035172409 11022 80.91.224.250 (21 Oct 2002 03:53:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:53:29 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 15265 invoked from network); 13 Jul 2001 04:57:35 -0000 Original-Received: from mail.cis.ohio-state.edu (HELO cis.ohio-state.edu) (root@164.107.115.5) by gnus.org with SMTP; 13 Jul 2001 04:57:35 -0000 Original-Received: from verbum.org (root@gold.cis.ohio-state.edu [164.107.112.16]) by cis.ohio-state.edu (8.9.1/8.9.1) with ESMTP id AAA03257 for ; Fri, 13 Jul 2001 00:57:34 -0400 (EDT) Original-Received: from space-ghost (space-ghost.verbum.org [192.168.5.90]) by verbum.org (Postfix (Debian/GNU)) with ESMTP id 11921723B for ; Fri, 13 Jul 2001 00:52:07 -0400 (EDT) Original-Received: by space-ghost (Postfix (Debian/GNU), from userid 1000) id 2BBA2622F57; Fri, 13 Jul 2001 00:51:47 -0400 (EDT) Original-To: ding@gnus.org X-Attribution: Colin X-Face: %'w-_>8Mj2_'=;I$myE#]G"'D>x3CY_rk,K06:mXFUvWy>;3I"BW3_-MAiUby{O(mn"wV@m dd`)Vk[27^^Sa 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: > 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 * 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)))