From unknown Thu Jun 19 14:13:05 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5324: 23.1.90; Selective display in Gnus summary broken Reply-To: Andreas Schwab , 5324@debbugs.gnu.org Mail-Followup-To: Andreas Schwab , 5324@debbugs.gnu.org Resent-From: Andreas Schwab Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jan 2010 20:42:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5324 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@debbugs.gnu.org id=B.126272411227345 (code B ref -1); Tue, 05 Jan 2010 20:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jan 2010 20:41:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSGDw-00076z-0C for submit@debbugs.gnu.org; Tue, 05 Jan 2010 15:41:52 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSGDu-00076u-0o for submit@debbugs.gnu.org; Tue, 05 Jan 2010 15:41:50 -0500 Received: from mx10.gnu.org ([199.232.76.166]:47155) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSGDp-0003tF-R1 for emacs-pretest-bug@gnu.org; Tue, 05 Jan 2010 15:41:45 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NSGDo-0005fk-An for emacs-pretest-bug@gnu.org; Tue, 05 Jan 2010 15:41:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from mail-out.m-online.net ([212.18.0.9]:40331) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSGDn-0005fQ-O0 for emacs-pretest-bug@gnu.org; Tue, 05 Jan 2010 15:41:44 -0500 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id 262741C15558; Tue, 5 Jan 2010 21:41:40 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id C2E2D90073; Tue, 5 Jan 2010 21:41:40 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.3.149]) by localhost (dynscan1.mnet-online.de [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id v2v9dG35fgwV; Tue, 5 Jan 2010 21:41:39 +0100 (CET) Received: from igel.home (DSL01.83.171.163.130.ip-pool.NEFkom.net [83.171.163.130]) by mail.mnet-online.de (Postfix) with ESMTP; Tue, 5 Jan 2010 21:41:39 +0100 (CET) Received: by igel.home (Postfix, from userid 501) id 9BFE4CA28C; Tue, 5 Jan 2010 21:41:39 +0100 (CET) From: Andreas Schwab To: emacs-pretest-bug@gnu.org References: X-Yow: I like the IMPUDENT NOSE on that car.. Are you a TEEN-AGER? Date: Tue, 05 Jan 2010 21:41:39 +0100 In-Reply-To: (Andreas Schwab's message of "Mon, 21 Dec 2009 17:59:17 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) Cc: ding@gnus.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) I have now checked this patch into the emacs repo to fix the bug. Andreas. 2010-01-05 Andreas Schwab * gnus-sum.el (gnus-forward-line-ignore-invisible): New function. (gnus-summary-recenter): Use it instead of forward-line. (Bug#5257) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-01-04 05:35:18 +0000 +++ lisp/gnus/gnus-sum.el 2010-01-05 20:29:46 +0000 @@ -6727,6 +6727,26 @@ Also do horizontal recentering." (put 'gnus-recenter 'isearch-scroll t) +(defun gnus-forward-line-ignore-invisible (n) + "Move N lines forward (backward if N is negative). +Like forward-line, but skip over (and don't count) invisible lines." + (let (done) + (while (and (> n 0) (not done)) + ;; If the following character is currently invisible, + ;; skip all characters with that same `invisible' property value. + (while (invisible-p (point)) + (goto-char (next-char-property-change (point)))) + (forward-line 1) + (if (eobp) + (setq done t) + (setq n (1- n)))) + (while (and (< n 0) (not done)) + (forward-line -1) + (if (bobp) (setq done t) + (setq n (1+ n)) + (while (and (not (bobp)) (invisible-p (1- (point)))) + (goto-char (previous-char-property-change (point)))))))) + (defun gnus-summary-recenter () "Center point in the summary window. If `gnus-auto-center-summary' is nil, or the article buffer isn't @@ -6742,16 +6762,19 @@ displayed, no centering will be performe gnus-auto-center-summary (/ (1- (window-height)) 2))))) (height (1- (window-height))) - (bottom (save-excursion (goto-char (point-max)) - (forward-line (- height)) - (point))) + (bottom (save-excursion + (goto-char (point-max)) + (gnus-forward-line-ignore-invisible (- height)) + (point))) (window (get-buffer-window (current-buffer)))) (when (get-buffer-window gnus-article-buffer) ;; Only do recentering when the article buffer is displayed, ;; Set the window start to either `bottom', which is the biggest ;; possible valid number, or the second line from the top, ;; whichever is the least. - (let ((top-pos (save-excursion (forward-line (- top)) (point)))) + (let ((top-pos (save-excursion + (gnus-forward-line-ignore-invisible (- top)) + (point)))) (if (> bottom top-pos) ;; Keep the second line from the top visible (set-window-start window top-pos) @@ -6760,12 +6783,12 @@ displayed, no centering will be performe ;; visible, or revert to using TOP-POS. (save-excursion (goto-char (point-max)) - (forward-line -1) + (gnus-forward-line-ignore-invisible -1) (let ((last-line-start (point))) (goto-char bottom) (set-window-start window (point) t) (when (not (pos-visible-in-window-p last-line-start window)) - (forward-line 1) + (gnus-forward-line-ignore-invisible 1) (set-window-start window (min (point) top-pos) t))))))) ;; Do horizontal recentering while we're at it. (when (and (get-buffer-window (current-buffer) t) -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 05 16:30:55 2010 Received: (at control) by debbugs.gnu.org; 5 Jan 2010 21:30:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSGzP-0007XU-2R for submit@debbugs.gnu.org; Tue, 05 Jan 2010 16:30:55 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSGzK-0007XN-UZ for control@debbugs.gnu.org; Tue, 05 Jan 2010 16:30:53 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NSGzF-00067j-Tb; Tue, 05 Jan 2010 16:30:45 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19267.44933.764310.727896@fencepost.gnu.org> Date: Tue, 5 Jan 2010 16:30:45 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: green X-Ran: 5I0?2@<++BQ._F"LVTdZn@'AqyRF}UU6wq^SHX>a]SdBebxGcOfov_CF|1rDIs"5V(fMAs X-Debbugs-No-Ack: yes X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.5 (----) merge 5257 5324 close 5257 severity 5307 wishlist severity 5278 wishlist reassign 5269 emacs,ns close 5263 close 5258 close 5254 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 05 19:13:55 2010 Received: (at control) by debbugs.gnu.org; 6 Jan 2010 00:13:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSJX9-0002U1-2V for submit@debbugs.gnu.org; Tue, 05 Jan 2010 19:13:55 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSJX7-0002Tw-Ud for control@debbugs.gnu.org; Tue, 05 Jan 2010 19:13:54 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NSJX3-0002lk-Q2; Tue, 05 Jan 2010 19:13:49 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19267.54717.570510.972224@fencepost.gnu.org> Date: Tue, 5 Jan 2010 19:13:49 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: green X-Ran: qI{%A|33'%h]#NntKKpQ7h}bhdGZ_iy0}l+#lkgo8$w(g(P(r?2@-i[E0R(_LQ}LMo-]=. X-Debbugs-No-Ack: yes X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) forcemerge 5257 5328 severity 5326 minor From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 12 18:10:09 2010 Received: (at control) by debbugs.gnu.org; 12 Jan 2010 23:10:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUps5-0002N4-5i for submit@debbugs.gnu.org; Tue, 12 Jan 2010 18:10:09 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NUps1-0002Mx-UI for control@debbugs.gnu.org; Tue, 12 Jan 2010 18:09:56 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NUpry-00007x-49; Tue, 12 Jan 2010 18:09:50 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19277.318.108123.756264@fencepost.gnu.org> Date: Tue, 12 Jan 2010 18:09:50 -0500 From: Glenn Morris To: control Subject: reapplying lost changes X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: green X-Ran: 9At,PG/,o:(5VZgnC(L}OT@w1fS`Rb2=alW*2d>bmhFMe5`LuP&T9iu(v':8cv|f\Aqy/b X-Debbugs-No-Ack: yes X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.0 (------) reassign 5257 emacs,gnus reassign 4958 emacs,erc stop reapplying lost changes from http://lists.gnu.org/archive/html/emacs-bug-tracker/2009-12/msg00036.html