From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67524 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.gnus.general Subject: Re: Problem with gnus-article-hide-citation Date: Sat, 04 Oct 2008 15:51:10 +0200 Message-ID: <874p3scvu9.fsf@randomsample.de> References: <87y71eeav9.fsf@pcdesk.net> <87r675r1m3.fsf@engster.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1223128298 21627 80.91.229.12 (4 Oct 2008 13:51:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Oct 2008 13:51:38 +0000 (UTC) Cc: Tyler Spivey To: ding@gnus.org Original-X-From: ding-owner+M15975@lists.math.uh.edu Sat Oct 04 15:52:34 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1Km7Yg-0003A5-0n for ding-account@gmane.org; Sat, 04 Oct 2008 15:52:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Km7XW-0001lb-K1; Sat, 04 Oct 2008 08:51:22 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Km7XV-0001lL-8K for ding@lists.math.uh.edu; Sat, 04 Oct 2008 08:51:21 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1Km7XS-0000mg-3H for ding@lists.math.uh.edu; Sat, 04 Oct 2008 08:51:21 -0500 Original-Received: from m61s02.vlinux.de ([83.151.21.164]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1Km7XX-0005Et-00 for ; Sat, 04 Oct 2008 15:51:23 +0200 Original-Received: from dslc-082-082-186-011.pools.arcor-ip.net ([82.82.186.11] helo=honk) by m61s02.vlinux.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Km7YM-0005un-C9; Sat, 04 Oct 2008 15:52:14 +0200 Mail-Copies-To: never Mail-Followup-To: ding@gnus.org, Tyler Spivey In-Reply-To: (David Engster's message of "Mon, 29 Sep 2008 12:35:24 +0200") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.3 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67524 Archived-At: --=-=-= David Engster writes: > I agree that one place were this could be fixed is EmacsSpeak, but we > could also at least try to circumvent this problem by putting the > hidden text after the button, i.e. at the end of the line. Attached is a patch against current CVS which implements the above workaraound, so that hidden citations don't shadow the first character of the visible text. I'd appreciate if others could test if this patch breaks anything with hiding citations. Please note that I had to remove the explicit newlines at the end of gnus-cited-opened/closed-text-button-line-format; they will now be put there implicitly. This is an incompatible change, but I'd say a rather small (and only cosmetic) one. If no one objects in the next few days, I'd like to commit this. I will then also fix the doc string for gnus-article-toggle-cited-text. -David --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=cite-patch.diff ? cite-patch.diff Index: gnus-art.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-art.el,v retrieving revision 7.283 diff -u -r7.283 gnus-art.el --- gnus-art.el 3 Oct 2008 04:21:54 -0000 7.283 +++ gnus-art.el 4 Oct 2008 13:26:26 -0000 @@ -1679,9 +1679,9 @@ (gnus-treat-capitalize-sentences gnus-article-capitalize-sentences) (gnus-treat-wash-html gnus-article-wash-html) (gnus-treat-emphasize gnus-article-emphasize) + (gnus-treat-highlight-citation gnus-article-highlight-citation) (gnus-treat-hide-citation gnus-article-hide-citation) (gnus-treat-hide-citation-maybe gnus-article-hide-citation-maybe) - (gnus-treat-highlight-citation gnus-article-highlight-citation) (gnus-treat-body-boundary gnus-article-treat-body-boundary) (gnus-treat-play-sounds gnus-earcon-display))) Index: gnus-cite.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-cite.el,v retrieving revision 7.40 diff -u -r7.40 gnus-cite.el --- gnus-cite.el 19 May 2008 08:47:42 -0000 7.40 +++ gnus-cite.el 4 Oct 2008 13:26:26 -0000 @@ -42,12 +42,12 @@ :link '(custom-manual "(gnus)Article Highlighting") :group 'gnus-article) -(defcustom gnus-cited-opened-text-button-line-format "%(%{[-]%}%)\n" +(defcustom gnus-cited-opened-text-button-line-format "%(%{[-]%}%)" "Format of opened cited text buttons." :group 'gnus-cite :type 'string) -(defcustom gnus-cited-closed-text-button-line-format "%(%{[+]%}%)\n" +(defcustom gnus-cited-closed-text-button-line-format "%(%{[+]%}%)" "Format of closed cited text buttons." :group 'gnus-cite :type 'string) @@ -600,7 +600,8 @@ ;; We use markers for the end-points to facilitate later ;; wrapping and mangling of text. (setq beg (set-marker (make-marker) beg) - end (set-marker (make-marker) end)) + end (set-marker (make-marker) (1- end))) + (set-marker-insertion-type beg t) (gnus-add-text-properties-when 'article-type nil beg end props) (goto-char beg) (when (and gnus-cite-blank-line-after-header @@ -651,8 +652,8 @@ (let ((gnus-article-mime-handle-alist-1 gnus-article-mime-handle-alist)) (gnus-set-mode-line 'article)) (save-excursion + (delete-region start beg) (goto-char start) - (gnus-delete-line) (put-text-property (point) (progn @@ -666,7 +667,9 @@ `gnus-article-toggle-cited-text args) (point)) - 'article-type 'annotation))))) + 'article-type 'annotation) + (when hidden + (insert "\n")))))) (defun gnus-article-hide-citation-maybe (&optional arg force) "Toggle hiding of cited text that has an attribution line. --=-=-=--