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 16:44:53 +0200 Message-ID: <87msp3gftm.fsf@gmx.net> References: <8734qvifn0.fsf@gmx.net> <87le4n3wsq.fsf@yahoo.com> 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="24078"; 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 16:45:47 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 1s3zb8-00065Z-VM for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 16:45:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3zaS-0003hq-6B; Mon, 06 May 2024 10:45:04 -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 1s3zaP-0003hO-Q9 for help-gnu-emacs@gnu.org; Mon, 06 May 2024 10:45:02 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s3zaM-0001Ub-2V for help-gnu-emacs@gnu.org; Mon, 06 May 2024 10:45:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1715006694; x=1715611494; i=stephen.berman@gmx.net; bh=8PviSchMhtxF4lYoOC8IDXeFm9ftcUfBJ9c4nunAQuQ=; 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=WapfwiNDhO2v49U2KN2vjOyefc1z2qMJnY9Q7Pwle0ER5EHm+Sy7F4oNIgEmgIhZ mpdRvFe2oaZ2hCpHNAHGAoaj4+7TaZWPWTqpQDuaDFG9F9fEIUdt53Jj4qx/l8fxC P0t084Xk6Tfq/yZZFHl9a2KCyjvaX+CwNTqPFRZyyFrmY+/gT96B59vTcWOfcvWnK vi9tj5VW1FzyZeQzN3Yf7+6Ow/dST6uimgM/MjQNDsgmmqX/S99RJt5m1j6hLKj8s tzCPowE3ZzfgOFExIUgJILqKIAeUxnR8hCq9w8QFutBeS3FTpSyyj6uSoj0VypeBn U1+CwNL7C08TtyYJEg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from strobelfs ([94.134.95.165]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MpUUw-1sOisL3Eho-00pYcX; Mon, 06 May 2024 16:44:53 +0200 In-Reply-To: (Heime's message of "Mon, 06 May 2024 13:34:37 +0000") X-Provags-ID: V03:K1:C8hkluHZ1gGxyDdi+fXL2bR16sx4b0yGwzWEvcI6FOpqrwofqu3 kXDZpWQ7pf4jIht0i/6KwOPfv6139+KFr3IcLSrB9/lYR7Ff4EM4/Il1RleLjAYnajpQbJT akds9cAEIL3Zb/v3bO6PNSW0NHAfG0L9RehdWDfOigdD5eQXz2xUf3oPRigA2PyilkJlqTW esEOFZUYfLsYUt4lkC1bg== UI-OutboundReport: notjunk:1;M01:P0:C52EffSeFcc=;B+wjoAXTVp8jYiU7e5N4EHdKrUz boW65DAPRDKNaGqAK73L1CAnFBq8zik500x+e3WkmMopDYkNY8o75iTZLgz3lbl9oOFPklsBs K5vJ9DHm937b9re6nq5/5hOLIbtnoPQBUSgjhRcvlSIrHHjIdug8CdkWiP3ncw/SvhdkNah99 +1/kSnhltwmekFEkVr8du8zESzWVYSSw4LRvmOztY+dg8A+3OKLm9GSKR/T3k+Fp37IYA9SbY SpeBdDyST8ajuKNB4WxWk19fxuK+6la8DyPlNmCjZmhuP8jpB5Sz7344c0NuH6BhKFf04Zoum 6COoy0R5G7G2t2ZtbtboSkN0T5zbdNu2VyqBWT+fUYwnzwL2BT/iychoJMDN4N2pP9mmW2mTs g5bExJFTL3IWvQmJ+oLGtokd95IIhW6+yh8hijqZ9Ql64i2iSJB1pd/Tt2L7tiRYJwH4PKbFI FW34h3TW0Gord9aseQ88/BhKepFbQ53Q2otSAc6J9nwXDdYSeXI9GS6WLYfgnGRLNvjb0+MK7 BDAbuBZ1b/unFz1hkas/XBF4Es5U9nW/HtrK/EwzD2j+0/m7ZWWP2NZwQ36x9qb9PUVtQDEV8 Q1N6iNqXCn+1vdtkXpQx7nY5VloeZog2m2O/dSP1vsXllWFtUaIiJkuSLxfo0NW9zbhBwMpT2 6rPoZ6blCTR88JYURHaQVC1SdkPkGcVfR5Z9+arDeARHcuMSIaZ8TcXch7WmWZrUQWyupGC5x oWuwNBrleWX3/k373bC/FQ9vPj+WHLm5Q1FTvxn2s/sIuXzLD/v1AAE7ElBlFrTAphkBP0qx Received-SPF: pass client-ip=212.227.15.15; 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, RCVD_IN_MSPIKE_H2=-0.001, 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:146591 Archived-At: On Mon, 06 May 2024 13:34:37 +0000 Heime wrot= e: > On Tuesday, May 7th, 2024 at 1:16 AM, Po Lu wrote: > >> Stefan Monnier monnier@iro.umontreal.ca writes: >> >> > > > Then, no we don't have a command specifically dedicated to creati= ng new >> > > > empty files (contrary to the command line which has `touch` for t= hat). >> > > >> > > 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 their > own menu bar items in a convenient way. So then I can call the command > 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