From unknown Fri Aug 15 17:57:03 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5477 <5477@debbugs.gnu.org> To: bug#5477 <5477@debbugs.gnu.org> Subject: Status: 23.1.91; diary-unhide-everything sometimes doesn't Reply-To: bug#5477 <5477@debbugs.gnu.org> Date: Sat, 16 Aug 2025 00:57:03 +0000 retitle 5477 23.1.91; diary-unhide-everything sometimes doesn't reassign 5477 emacs submitter 5477 Stephen Berman severity 5477 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 17:09:16 2010 Received: (at submit) by debbugs.gnu.org; 25 Jan 2010 22:09:17 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZX7T-0005gw-NM for submit@debbugs.gnu.org; Mon, 25 Jan 2010 17:09:16 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZX7O-0005gl-HQ for submit@debbugs.gnu.org; Mon, 25 Jan 2010 17:09:13 -0500 Received: from mx10.gnu.org ([199.232.76.166]:50240) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZX7K-00082R-K0 for submit@debbugs.gnu.org; Mon, 25 Jan 2010 17:09:06 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NZX7I-0003a7-Uq for submit@debbugs.gnu.org; Mon, 25 Jan 2010 17:09:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:44795) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NZX7I-0003a1-Ob for submit@debbugs.gnu.org; Mon, 25 Jan 2010 17:09:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZX7I-00072e-7T for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2010 17:09:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZX7D-0006yN-8Z for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2010 17:09:03 -0500 Received: from [199.232.76.173] (port=45685 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZX7D-0006yD-66 for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2010 17:08:59 -0500 Received: from mail.gmx.net ([213.165.64.20]:47661) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NZX7C-0003Xm-NM for bug-gnu-emacs@gnu.org; Mon, 25 Jan 2010 17:08:59 -0500 Received: (qmail invoked by alias); 25 Jan 2010 21:38:36 -0000 Received: from i59F57D74.versanet.de (EHLO escher.home) [89.245.125.116] by mail.gmx.net (mp065) with SMTP; 25 Jan 2010 22:38:36 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+4lytO65O4g9H6Xu+Yiq8KR+23SsgiLm2xDYycip YAHCwaWgygdgTX Received: by escher.home (Postfix, from userid 1000) id 23AB71032F; Mon, 25 Jan 2010 22:38:32 +0100 (CET) From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 23.1.91; diary-unhide-everything sometimes doesn't Date: Mon, 25 Jan 2010 22:38:31 +0100 Message-ID: <87fx5tuap4.fsf@escher.home> 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-Y-GMX-Trusted: 0 X-FuHaFi: 0.46999999999999997 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: submit 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: -5.0 (-----) If diary-list-entries applies to a narrowed buffer, it widens it before making it invisible (due to bug#5093). However, it can happen that narrowing is restored before diary-unhide-everything applies, with the result that only the narrowed portion of the buffer becomes visible again. The simplest reproducible recipe I could find may seem contrived, but it makes strictly legitimate use of Emacs libraries (I have more complex local changes to Todo mode that also suffer from it): 1. Save the following text as ~/.todo-do: -*- mode: todo; todo-categories: ("test" "Todo"); -*- --- test January 25, 2010 19:47 steve: another item --- End --------------------------------------------------------------------------- --- Todo January 25, 2010 19:48 steve: todo item --- End --------------------------------------------------------------------------- What matters is that there are at least two Todo categories and todo-prefix is not interpretable by diary-lib, e.g. here it is just the empty string (the following space is required by Todo mode). 2. emacs -Q 3. M-x todo-show, answer y to apply the local variable list. A "search failed" error occurs because the value of todo-prefix is (still) the default "*/*". So kill the Todo buffer, do M-x customize-variable RET todo-prefix, make it match the string in the above ~/.todo-do file (the empty string), save for the current session, and call todo-show again. The Todo buffer shows the item in category "test", and pressing + or - will show the item in category "Todo". 4. Save the following as ~/diary: #include "~/.todo-do" Jan 25, 2010 diary item 5. M-: (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) 6. M-x calendar, then type `d' on Jan 25 (the actual date is probably irrelevant). => Now todo-show only displays one category (whichever was current before doing the step 6), the other category is invisible. The patch below fixes this bug. In GNU Emacs 23.1.91.2 (i686-pc-linux-gnu, GTK+ Version 2.18.1) of 2010-01-25 on escher Windowing system distributor `The X.Org Foundation', version 11.0.10605000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t 2010-01-25 Stephen Berman * diary-lib.el (diary-unhide-everything): Widen before removing overlays (bug#XXXX). *** /tmp/ediff16825Y0s 2010-01-25 22:16:53.000000000 +0100 --- /data/steve/bzr/emacs/quickfixes/lisp/calendar/diary-lib.el 2010-01-25 22:13:51.000000000 +0100 *************** *** 804,810 **** (defun diary-unhide-everything () "Show all invisible text in the diary." (kill-local-variable 'diary-selective-display) ! (remove-overlays (point-min) (point-max) 'invisible 'diary) (kill-local-variable 'mode-line-format)) (defvar original-date) ; bound in diary-list-entries --- 804,813 ---- (defun diary-unhide-everything () "Show all invisible text in the diary." (kill-local-variable 'diary-selective-display) ! (save-excursion ! (save-restriction ! (widen) ! (remove-overlays (point-min) (point-max) 'invisible 'diary))) (kill-local-variable 'mode-line-format)) (defvar original-date) ; bound in diary-list-entries From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 15:21:39 2010 Received: (at 5477) by debbugs.gnu.org; 26 Jan 2010 20:21:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZrus-0004kX-QI for submit@debbugs.gnu.org; Tue, 26 Jan 2010 15:21:38 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZrur-0004kQ-GW for 5477@debbugs.gnu.org; Tue, 26 Jan 2010 15:21:37 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NZrum-0006oS-7W; Tue, 26 Jan 2010 15:21:32 -0500 To: Stephen Berman Subject: Re: bug#5477: 23.1.91; diary-unhide-everything sometimes doesn't References: <87fx5tuap4.fsf@escher.home> From: Glenn Morris X-Spook: Ft. Meade Al-Qaeda STARLAN Plame anarchy Rand Corporation X-Ran: oa4w7+ySy2j\2g!:@++j,%>hSKeL`9aRMW_y7pVlTIA3*d|mr$f={Sh]YW{|5pw^%>`ji0 X-Hue: magenta X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 26 Jan 2010 15:21:32 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 5477 Cc: 5477@debbugs.gnu.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.0 (------) Stephen Berman wrote: > (defun diary-unhide-everything () > "Show all invisible text in the diary." > (kill-local-variable 'diary-selective-display) > ! (save-excursion > ! (save-restriction > ! (widen) > ! (remove-overlays (point-min) (point-max) 'invisible 'diary))) > (kill-local-variable 'mode-line-format)) This seems fine. Is your save-excursion really necessary? From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 16:05:44 2010 Received: (at 5477) by debbugs.gnu.org; 26 Jan 2010 21:05:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZsbY-0005Il-7x for submit@debbugs.gnu.org; Tue, 26 Jan 2010 16:05:44 -0500 Received: from mail.gmx.net ([213.165.64.20]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1NZsbV-0005Ib-W2 for 5477@debbugs.gnu.org; Tue, 26 Jan 2010 16:05:43 -0500 Received: (qmail invoked by alias); 26 Jan 2010 21:05:22 -0000 Received: from i59F559EF.versanet.de (EHLO escher.home) [89.245.89.239] by mail.gmx.net (mp009) with SMTP; 26 Jan 2010 22:05:22 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1+hwIsqmVmhdEuK4i+lsG4oSCcT2F7NTFkjIvERz3 OdgcadgSP2lLdz Received: by escher.home (Postfix, from userid 1000) id A6D8B10348; Tue, 26 Jan 2010 22:05:00 +0100 (CET) From: Stephen Berman To: Glenn Morris Subject: Re: bug#5477: 23.1.91; diary-unhide-everything sometimes doesn't References: <87fx5tuap4.fsf@escher.home> Date: Tue, 26 Jan 2010 22:05:00 +0100 In-Reply-To: (Glenn Morris's message of "Tue, 26 Jan 2010 15:21:32 -0500") Message-ID: <87fx5s60hv.fsf@escher.home> 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-Y-GMX-Trusted: 0 X-FuHaFi: 0.59999999999999998 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 5477 Cc: 5477@debbugs.gnu.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: -3.3 (---) On Tue, 26 Jan 2010 15:21:32 -0500 Glenn Morris wrote: > Stephen Berman wrote: > >> (defun diary-unhide-everything () >> "Show all invisible text in the diary." >> (kill-local-variable 'diary-selective-display) >> ! (save-excursion >> ! (save-restriction >> ! (widen) >> ! (remove-overlays (point-min) (point-max) 'invisible 'diary))) >> (kill-local-variable 'mode-line-format)) > > This seems fine. Is your save-excursion really necessary? No, it's superfluous, sorry. That nesting is so common, I didn't stop to think. Thanks for the heads up. Steve Berman *** /tmp/ediff3766uVW 2010-01-26 21:56:24.000000000 +0100 --- /home/steve/bzr/emacs/quickfixes/lisp/calendar/diary-lib.el 2010-01-26 21:55:19.000000000 +0100 *************** *** 804,810 **** (defun diary-unhide-everything () "Show all invisible text in the diary." (kill-local-variable 'diary-selective-display) ! (remove-overlays (point-min) (point-max) 'invisible 'diary) (kill-local-variable 'mode-line-format)) (defvar original-date) ; bound in diary-list-entries --- 804,812 ---- (defun diary-unhide-everything () "Show all invisible text in the diary." (kill-local-variable 'diary-selective-display) ! (save-restriction ! (widen) ! (remove-overlays (point-min) (point-max) 'invisible 'diary)) (kill-local-variable 'mode-line-format)) (defvar original-date) ; bound in diary-list-entries From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 16:14:14 2010 Received: (at 5477-done) by debbugs.gnu.org; 26 Jan 2010 21:14:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZsjm-0005Nc-N6 for submit@debbugs.gnu.org; Tue, 26 Jan 2010 16:14:14 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NZsjl-0005NW-Ro for 5477-done@debbugs.gnu.org; Tue, 26 Jan 2010 16:14:14 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NZsjh-00016x-NT; Tue, 26 Jan 2010 16:14:09 -0500 To: 5477-done@debbugs.gnu.org Subject: Re: bug#5477: 23.1.91; diary-unhide-everything sometimes doesn't References: <87fx5tuap4.fsf@escher.home> <87fx5s60hv.fsf@escher.home> From: Glenn Morris X-Spook: Aladdin USDOJ Mena computer terrorism Guantanamo bce kibo X-Ran: [GpQd@#y*Q?57HDl/kLeSg{Z[f1Bnn)4q7=O#Hy%0Qgh]i5||E0-,2W[$)!CJD,eTD!w&3 X-Hue: white X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 26 Jan 2010 16:14:09 -0500 In-Reply-To: <87fx5s60hv.fsf@escher.home> (Stephen Berman's message of "Tue\, 26 Jan 2010 22\:05\:00 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 5477-done 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 (------) Thanks, I will install this later. I'm closing this now to test some debbugs changes I have made. From unknown Fri Aug 15 17:57:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 24 Feb 2010 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator