From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Francesco =?UTF-8?Q?Potort=C3=AC?= Newsgroups: gmane.emacs.bugs Subject: bug#53764: 27.1; shouldn't ~/diary be in diary-mode? Date: Mon, 07 Feb 2022 10:10:04 +0100 Organization: The GNU project Message-ID: <875ypravpv.fsf@tucano.isti.cnr.it> References: <87h79f8urg.fsf@tucano.isti.cnr.it> <87v8xtdcr4.fsf@gnus.org> <878rupbbll.fsf@tucano.isti.cnr.it> <87k0e9asjk.fsf@gnus.org> <877da8c3jn.fsf@tucano.isti.cnr.it> <8735kv61c1.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34658"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 53764@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 07 10:56:33 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nH0l6-0008rB-CG for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 10:56:32 +0100 Original-Received: from localhost ([::1]:43362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nH0l5-0005I3-DM for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 04:56:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nH034-0002yJ-TK for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 04:11:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nH034-0004rZ-JV for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 04:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nH034-00030Z-G2 for bug-gnu-emacs@gnu.org; Mon, 07 Feb 2022 04:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Feb 2022 09:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53764 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 53764-submit@debbugs.gnu.org id=B53764.164422501111500 (code B ref 53764); Mon, 07 Feb 2022 09:11:02 +0000 Original-Received: (at 53764) by debbugs.gnu.org; 7 Feb 2022 09:10:11 +0000 Original-Received: from localhost ([127.0.0.1]:40956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH02E-0002zO-Nl for submit@debbugs.gnu.org; Mon, 07 Feb 2022 04:10:11 -0500 Original-Received: from plesklin7.if1.ehiweb.it ([79.98.45.16]:44415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nH02C-0002zA-Uu for 53764@debbugs.gnu.org; Mon, 07 Feb 2022 04:10:09 -0500 Original-Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) by plesklin7.if1.ehiweb.it (Postfix) with ESMTPSA id 2ED49107432; Mon, 7 Feb 2022 10:10:05 +0100 (CET) In-Reply-To: <8735kv61c1.fsf@gnus.org> (larsi@gnus.org) X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 X-PPP-Message-ID: <20220207091005.25083.94849@plesklin7.if1.ehiweb.it> X-PPP-Vhost: potorti.it X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226231 Archived-At: >Francesco Potortì writes: >> If diary-file is already in the auto-mode-alist, we do nothing. No override. > >Do we have a convenience function that says whether we have a match in >auto-mode-alist? `set-auto-mode--apply-alist' seems to be the closest I >can find, and... it's not that close. :-/ But I guess it could be >refactored out of there. This one seems to do the job: (add-to-list 'auto-mode-alist (cons diary-file 'diary-mode) (lambda (a b) (equal (car a) (car b)))) >Michael Heerdegen writes: >> I vote "do it". People will rather change `diary-mode' than writing >> something own from scratch. The - not unuseful - mode is too hard to >> discover currently. That was my point, in fact. >We have a chicken/egg problem, though. Adding `diary-file' to >`auto-mode-alist' would be fine, but we calculate that in calendar.el, >so people not using the calendar won't get the mode. That would not do a complete job. I have used M-x diary for years before ever trying M-x calendar. Occasionally I suse calendar today, but mst of the time I add entries to diary by hand. I have (appt-activate t) in my .emacs. >We could move diary-file out of calendar.el and put it in... >bindings.el or something, though? I would add it to the mode alist just after diary-file's defcustom