From unknown Wed Jun 18 22:55:22 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#33423 <33423@debbugs.gnu.org> To: bug#33423 <33423@debbugs.gnu.org> Subject: Status: 27.0.50; Marking diary entries from included files Reply-To: bug#33423 <33423@debbugs.gnu.org> Date: Thu, 19 Jun 2025 05:55:22 +0000 retitle 33423 27.0.50; Marking diary entries from included files reassign 33423 emacs submitter 33423 Stephen Berman severity 33423 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 18 17:58:03 2018 Received: (at submit) by debbugs.gnu.org; 18 Nov 2018 22:58:03 +0000 Received: from localhost ([127.0.0.1]:59456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOW0x-0005u7-J4 for submit@debbugs.gnu.org; Sun, 18 Nov 2018 17:58:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55398) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gOW0w-0005td-3u for submit@debbugs.gnu.org; Sun, 18 Nov 2018 17:58:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOW0p-0007RV-Qj for submit@debbugs.gnu.org; Sun, 18 Nov 2018 17:57:56 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60039) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gOW0p-0007RL-NW for submit@debbugs.gnu.org; Sun, 18 Nov 2018 17:57:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gOW0o-0003xL-Mc for bug-gnu-emacs@gnu.org; Sun, 18 Nov 2018 17:57:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gOW0l-0007NF-D9 for bug-gnu-emacs@gnu.org; Sun, 18 Nov 2018 17:57:54 -0500 Received: from mout.gmx.net ([212.227.15.15]:41565) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gOW0l-0007Lj-4D for bug-gnu-emacs@gnu.org; Sun, 18 Nov 2018 17:57:51 -0500 Received: from rosalinde ([178.6.223.34]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LuOYx-1fQ33b2a9v-011hCd for ; Sun, 18 Nov 2018 23:57:48 +0100 From: Stephen Berman To: bug-gnu-emacs@gnu.org Subject: 27.0.50; Marking diary entries from included files Message-ID: <87tvke56zn.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Date: Sun, 18 Nov 2018 23:57:47 +0100 MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:REfOz9QRmQBe1RNbgcHloI0dYZLjzauiBGvS+ndcFYOjcIFPY0K EOJV60/zLoQMo+mov4kzb4uwgOpDpqmkdzfC2QgGP257frHRRtOrsAgo5Ugygzg9Xnjt41Q qYALgJbjAlEzae+Lo9S36JgjbeBBjZguIrtw+arWhNgFFcoM56fSfpMADpv0CQfQcSIKNCp tGRC1zcaZRgREPEI0Ot+Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:cB/Ol7zmu0c=:MiInsWlD7zvDNltM6gN8NW 7jadIvXnc6QRtRoWGE5JLRqA2cxv042f5ZabbnmmVN8VXWabt41a39rFjyes+lVsv0NHl8c1k H47qLqsF2msmCZxfx9SrRD9yZhH2vOEiBvD0GIA1EBzjWvIx7eWIg4QddMQYJGaZQFeP8ZqVd eLzoA3hp8u5Ex8FEsPGu+VjHI96vQlhJQimGNiKXoQ2q/y3vl6rM4GdPl0hXCnAyhFffvC+Ps MRogDoc4fapE+29aTVbH7VStq0GftNapwXHk52/ZSLcJD/haVAncFxWCPmMdfpBayFcSeZY7w oSme/z9Ia8zF6p5oValK7cojz6cs16gwNoECGT82N1a0th1KfQufYRramA6BmjVUeq94ZR/jX oBPkzVxz2EGwq71k6/gW+o4jewZp7rytZe5ATCGdEBRaeQLyKLZJ46ZjHjugK8p8VjB/ncO+G T9HeGCIw0K+BahQGGmqpngvpDwREUEZjNF4eowkWyq4XNXnuKxCToOIhgeCQM9enriXqoLXG3 sOcjSaY2hP+KN2WHEOdFfjljc3bt7ueVr+aaz/+/2jSHUbKGDRg4z2rPt2KXZvWcCtmjTeUzZ x17hZS4ZctsMmhV876Vx14F4ssZsry6gQ+meYOXyUzpYb2d0BGjdqr+fy9HT8jeMURglbncnp gVPjdDPwDq/J5wRPyvck/CDi0/z+/Wdxdx2NKaLsiWf0QMGArqcv2ytBrH+DTzrxk/qtiw6nh 15nqYdz4qg5oD0EKqBulnz2qkH+PgAxmD8i+Uv9e7mZcN3RN34rQEvUgdYJ8okPxvDSA+WIgA EEvdRXOUdH2vr/n7gLY5vCz5GHnPXdQw85MAFZsSlDDvGCGYc9/jbrNv7WdH6ILQNo6zvSOKI 9fU6com+XTLldqtXDfkiRSq/YvLq5zBKJEQLaVLkZPcOOCRq3P325NBxKpP6nRKTM2aZUuu5Q Mzftm/RxaZQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.1 (-----) 0. Save the following files (this can all be done from emacs -Q but this is easier and doesn't affect the bug): ~/.emacs with this content: ---------------------------------------------------------------- (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(calendar-mark-diary-entries-flag t) '(diary-mark-entries-hook '(diary-mark-included-diary-files)) ) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. ) ---------------------------------------------------------------- ~/.emacs.d/diary with this content: ---------------------------------------------------------------- #include "~/.emacs.d/todo/test.todo" Nov 16, 2018 test ---------------------------------------------------------------- ~/.emacs.d/todo/test.todo with this content: ---------------------------------------------------------------- (("cat1" . [1 0 0 0]) ("cat2" . [1 1 0 0])) --==-- cat1 [Nov 18, 2018] Not a diary item ==--== DONE --==-- cat2 * *, * Diary item ==--== DONE ---------------------------------------------------------------- 1. Start emacs without -Q 2. M-x calendar => The Calendar is displayed with all dates marked red as diary entries (using the default diary face), as it should be, since the file ~/.emacs.d/todo/test.todo is included as a diary file and in the todo item "* *, * Diary item" "* *, *" means this is diary item for every day. 3. M-x todo-show => The window the Calendar was displayed in now shows a Todo mode buffer displaying cat1 of the above file: [Nov 18, 2018] Not a diary item 4. M-x calendar => The same window now displays the Calendar again, but now only November 16, 2018 (the date of the item in ~/.emacs.d/diary) is marked as a diary entry, instead of every date. The reason is that diary-mark-entries does not take narrowing of included files into account (todo-mode files are narrowed to the current category: if after step 3 above you type `f' in the todo-mode buffer, it then displays the next category, and now doing step 4 does show the Calendar with all dates marked as diary items). The following patch fixes this. (Only nine years after bug#5093; better late than never. But I guess too late for 26.2?) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index acf4b20d77..1fa1aaacd3 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1412,13 +1412,15 @@ diary-mark-entries (setq file-glob-attrs (nth 1 (diary-pull-attrs nil '()))) (with-syntax-table diary-syntax-table (save-excursion - (diary-mark-entries-1 'calendar-mark-date-pattern) - (diary-mark-sexp-entries) - ;; Although it looks like mark-entries-hook runs every time, - ;; diary-mark-included-diary-files binds it to nil - ;; (essentially) when it runs in included files. - (run-hooks 'diary-nongregorian-marking-hook - 'diary-mark-entries-hook)))) + (save-restriction + (widen) + (diary-mark-entries-1 'calendar-mark-date-pattern) + (diary-mark-sexp-entries) + ;; Although it looks like mark-entries-hook runs every time, + ;; diary-mark-included-diary-files binds it to nil + ;; (essentially) when it runs in included files. + (run-hooks 'diary-nongregorian-marking-hook + 'diary-mark-entries-hook))))) (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff))) (or d-incp (message "Marking diary entries...done")))) In GNU Emacs 27.0.50 (build 13, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-11-18 built on rosalinde Repository revision: 5d140800398287c20230dda79162a7c40016d88e Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12001000 System Description: 8.3 From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 25 08:12:32 2018 Received: (at 33423) by debbugs.gnu.org; 25 Nov 2018 13:12:32 +0000 Received: from localhost ([127.0.0.1]:46108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQuD9-00039s-OE for submit@debbugs.gnu.org; Sun, 25 Nov 2018 08:12:31 -0500 Received: from mout.gmx.net ([212.227.15.15]:46195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gQuD7-00039e-Cr for 33423@debbugs.gnu.org; Sun, 25 Nov 2018 08:12:30 -0500 Received: from rosalinde ([178.6.221.215]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0LlUZz-1fsO4O0oVz-00bOOc for <33423@debbugs.gnu.org>; Sun, 25 Nov 2018 14:12:23 +0100 From: Stephen Berman To: 33423@debbugs.gnu.org Subject: Re: bug#33423: Acknowledgement (27.0.50; Marking diary entries from included files) References: <87tvke56zn.fsf@gmx.net> Date: Sun, 25 Nov 2018 14:12:22 +0100 In-Reply-To: (GNU bug Tracking System's message of "Sun, 18 Nov 2018 22:59:02 +0000") Message-ID: <87tvk5qp1l.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:w3qLnDSSgRhdi0Uv5Z5MkcmDTISi0PlYr3UKN7t1aTROW0lfXcb Z7HgeZ9LDFLee86nRrF1BMKF7XzEg2QoxASJ0ZJyoxljwGoyQO3NEQhK4j6eKe6AbiaW6qP SRJsr74SfjGbVPfOTW83pvJuPPzuWFq2Ue+TBP47M76zdeRMY7V2NJzOSyMwh3vGY47hHJd DxYaEas+rEtKG3PwWGviA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:wLI61tfZKhU=:ezKrIzCUms2XHzJGa8HM30 hBzviZrnxtSPcMflUcr1NyPOHcVkqDbsOzzcKOyHpwAMXhx8rta52fdgtNFr8+uvSJYf0rqC+ BD2xcZ+1PvrhR8DlJENPAal+P4PbYcUCENq1S/AnewQT82VWgR2VFaVdDsSBI2DQVy8QMNINH Vn/7sw6yjiUooZPQkOKzn6Q+IIqvA+pqLH0rWnHbuj1VtFHMDMDdNnjjpwhlu/ovhHdwfKaK+ tLJ1FDIezbnWm59RZg161Gvie7wZE2TypfRVkdL6iWdti4OkU8GCjyMemVa8DbkiRM/MpGJvC 2pzw/BxcJtpxR9Ai0/4Esng2WpBupKfcOye4dt4RY3eRsflAd7fEJQfWQEMw/eRROKSwJtQmC HfwU57g365oKOFoHakv1Bv/3Puwz080tJ48wTsnhQASZOdL6OEfH2FBOrMZnDPKkzAdR5u/nj fZL7YcTsyo5dsRHQxvusan6WhMiB2rkZhN7btyP1I3dN/UwAvRWQuAO7CdYpkVMB1EwHvlEZ8 tvel+ZMo2W8jfZBHfJEbfGmxmdCjTSbmmeMsRD9nQH8rpZRspNyGtIr+pJEXXztBBJ1Y1nkZb 8hpsX1ldBCewSnAo3HpDAUs79sg5Zc3gGR/QpDkA/60b4vWBrOdt8MBBp3vAwbAunZ4sz8qlO 6owIX8Ms7ZgkZZN90nz+r/ZfjW+oIQMDd9x6VrTk9mvPF40K6Bhi5azWxh0ZJ1drJxpliG6ji CHuwLCIva3auj8XO/I5rJUSNuIsNEjGU/e9O7riAm8upJlcj/mAGTBdNC/G90jT/1hZWkP7Xo PMru15qab5ntTW1VdYgTVxm0Fzb/9e141DV2ZhJtT3vkUA+61p5mHXQH7oXki3benJQUpw4Jp X1qbKlkehi9eu/+GGUVLVAXom1CU+lOpJTF4Yglp8odwd0q+xvIDNyZ71FCBu0 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 33423 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, 18 Nov 2018 23:57:32 +0100 Stephen Berman wrote: > The reason is that diary-mark-entries does not take narrowing of > included files into account (todo-mode files are narrowed to the current > category: if after step 3 above you type `f' in the todo-mode buffer, it > then displays the next category, and now doing step 4 does show the > Calendar with all dates marked as diary items). > > The following patch fixes this. (Only nine years after bug#5093; better > late than never. But I guess too late for 26.2?) I've seen no objections, so I committed this to master. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 27 20:17:57 2018 Received: (at control) by debbugs.gnu.org; 28 Nov 2018 01:17:57 +0000 Received: from localhost ([127.0.0.1]:52670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRoUH-0005Wk-2D for submit@debbugs.gnu.org; Tue, 27 Nov 2018 20:17:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:50951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRoUF-0005WX-H2 for control@debbugs.gnu.org; Tue, 27 Nov 2018 20:17:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRoU8-0002i0-E1 for control@debbugs.gnu.org; Tue, 27 Nov 2018 20:17:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRoU7-0002hD-Oo for control@debbugs.gnu.org; Tue, 27 Nov 2018 20:17:48 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gRoU7-00030B-Mq for control@debbugs.gnu.org; Tue, 27 Nov 2018 20:17:47 -0500 Subject: control message for bug 33423 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Tue, 27 Nov 2018 20:17:47 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) # 29ef7d1 close 33423 27.1 From unknown Wed Jun 18 22:55:22 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, 26 Dec 2018 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator