From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.help Subject: Re: Making new files Date: Mon, 06 May 2024 19:00:49 +0200 Message-ID: <87a5l2ho3i.fsf@gmx.net> References: <8734qvifn0.fsf@gmx.net> <87le4n3wsq.fsf@yahoo.com> <87msp3gftm.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31646"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stefan Monnier via Users list for the GNU Emacs text editor To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 06 19:01:48 2024 Return-path: Envelope-to: geh-help-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 1s41il-00084h-43 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 19:01:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s41i2-0001Ys-7l; Mon, 06 May 2024 13:01:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s41hx-0001Xa-Nv for help-gnu-emacs@gnu.org; Mon, 06 May 2024 13:00:58 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s41hv-0007SV-2f for help-gnu-emacs@gnu.org; Mon, 06 May 2024 13:00:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1715014850; x=1715619650; i=stephen.berman@gmx.net; bh=cRemjfJ1H81TbhCHnoJXOAvyXAM3xHDs2hScM52cqEM=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=gpFxLYf7pfxU2osRoVaOPHM7s34xSKq9ka2JSFxyZWX9OZLhhFDP7A2EUZQ2iVEc do//xJRmhNvugZwcrYWtj1s2VXg+f92xYwAd+qTTV+ZVyb6ZBbCJe4SiTzdhuJSEa f69nVptCkfPDa6GcFE9y22yj3PlSI15rRQBoVBnCh3REAygmB79Hj3/8IDlNNjqC6 f23JMo/yHNYPTkpEdrMntY5VIMHUXRSzdmPoZqq07MLRRsXuHXZ0CDojL/XVJiIeC 4wi5w/zL1BLSKLpOdrcpKY+CefuIXbnU/qSORFrODw3wmUjxcm5eHhs/dbOd/bxYi rrufjWffVeMnt4luog== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([94.134.95.165]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MqaxU-1sQDJq0jKa-00oGSf; Mon, 06 May 2024 19:00:50 +0200 In-Reply-To: (Heime's message of "Mon, 06 May 2024 16:43:59 +0000") X-Provags-ID: V03:K1:NW9coYvg3j7S+uw/JhZalsqu2XyrHRsJRPghnTG15CD6pDNWJWe BudNnbbMXTnhb64lVT0BZ8gpS1VlFkr3qIFkjz1GwDfofkYL5nxUt+tIhYulclgHfnULG1R YrkAt7sgNMbWDR1LsZsdxc8DVzg20N/5i4C1jHPQPv6RQx1UZEsHN6w1B24nEIUX7hkOuoX ItZ7d4klNDuSB0eF0HOVQ== UI-OutboundReport: notjunk:1;M01:P0:G194jv/7wQY=;aknr4/MzJbJ8FV+WHK4U57TbWpC N4fAZDe/XFv0BRi1pYwgGQT8e7LmFbG48Bf6BcGAuihoViPPkoGuiLGXZvxqiPb4y2MlbJVRG CESBYmafDLbXv3fZ+iK8HqD+9nGdg7hygZ36Vfk76u8U0+sAvVoDmJVsB9DuoPvKOX9oAcHwE BuF0CjKrRvyQgqQdGxnQ8g5l1Vr8Ht6hLkRPpSE7GAX6YKJDcq+iPudxb0PRQB0iqu1FbmJGq NY3C0YzErIjF5FxQ+Ph6+ZGEbWLeNq6o0/pxmOSuiOUHSG515yltNA9FYFxaEu8ZG/wpe/BNB hdyLkq4jQa5DLLPXIV6CKtHMhlSQLhlb0dS5P9tM2p6u2WenldPccfm4TubZrjxyXVKvxL7PS oqIBtWoz9QJB1q4vUYNPEKrh+Zqu+fXGfXn9ffklkDeWf5EwBid8mZoZKPjtdI211DyJ5ov5f BI9vQrRzBAmJYi35PdCuvvl/ss7wCIcTnp3FQYb17CI0i9Sd6fTsjFvwA/fPfuzHyepxa4CS5 Ip586vtUMfsetwrectcBqoLNkoe/AjOg4yvhKYX1R+HjkdUQzwvedRtcxSdchPPdxMRUAQ8zE vuXW9dvSVW0b7mOhRZMtvZ+L4Q0k1eRp5syOwB4Rqu70vassH2WIp5w1PcdXf1w3ziC23zyvm G5gPajereBSTWmdldSAdZ9fXPONO3IqalVMYJRLictTDjzjzVxE5aEMk4zeEYs2oJf0wU5AfC L+WRorN0Ultv9meKA9Pd8oqdhKOVZDBVxyNknES5dNnSGLKezVDHTsjGQxIIquWSSUOvTJ/N Received-SPF: pass client-ip=212.227.17.20; envelope-from=stephen.berman@gmx.net; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146595 Archived-At: On Mon, 06 May 2024 16:43:59 +0000 Heime wrot= e: > On Tuesday, May 7th, 2024 at 2:44 AM, Stephen Berman wrote: > >> On Mon, 06 May 2024 13:34:37 +0000 Heime heimeborgia@protonmail.com wro= te: >> >> > On Tuesday, May 7th, 2024 at 1:16 AM, Po Lu luangruo@yahoo.com wrote: >> > >> > > Stefan Monnier monnier@iro.umontreal.ca writes: >> > > >> > > > > > Then, no we don't have a command specifically dedicated to cr= eating new >> > > > > > empty files (contrary to the command line which has `touch` f= or that). >> > > > > >> > > > > There's `dired-create-empty-file'... >> > > > >> > > > Well, I'll be damned! >> > > > >> > > > Thanks, Steve! >> > > >> > > There was always "M-! touch", as well. >> > >> > A great thing to have is the ability to allow people to introduce the= ir >> > own menu bar items in a convenient way. So then I can call the comman= d >> > you wrote for me. That would assist a lot of people. >> >> >> It's pretty convenient with `easy-menu-define': (defun heime-new-file (= ) >> "Open a new empty file using` dired-create-empty-file'." >> (interactive) >> (require 'dired-aux) >> (call-interactively #'dired-create-empty-file)) >> >> (easy-menu-define heime-menu global-map >> "Heime's very own menu." >> '("Heime" >> ("File" >> ["New File" heime-new-file t]))) >> >> Steve Berman > > > Why don't you allow others to add to the existing menus rather than > our own separate menus. (keymap-set-after menu-bar-file-menu "" '("New Empty File" . heime-new-file) 'new-file) Steve Berman