From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alexander Klimov Newsgroups: gmane.emacs.devel Subject: Re: insert-file-name-into-minibuffer Date: Sat, 9 Feb 2019 22:19:35 +0000 Message-ID: <4b24dbec3ecedf09159344f588268145@5bd3166184dda72f5bd6289323991d158> References: <837ee9nhi6.fsf@gnu.org> <87bm3ky74i.fsf@mbork.pl> <87a7j4y66y.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="175066"; mail-complaints-to="usenet@blaine.gmane.org" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 09 23:20:32 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gsaz9-000jRN-AO for ged-emacs-devel@m.gmane.org; Sat, 09 Feb 2019 23:20:31 +0100 Original-Received: from localhost ([127.0.0.1]:50554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsaz8-0007b5-6O for ged-emacs-devel@m.gmane.org; Sat, 09 Feb 2019 17:20:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsayT-0007ax-UU for emacs-devel@gnu.org; Sat, 09 Feb 2019 17:19:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsayS-0007y8-10 for emacs-devel@gnu.org; Sat, 09 Feb 2019 17:19:49 -0500 Original-Received: from smtp21.mail.ru ([94.100.179.250]:42860) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsayQ-0007s4-P2 for emacs-devel@gnu.org; Sat, 09 Feb 2019 17:19:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=inbox.ru; s=mail; h=Content-Type:MIME-Version:References:Message-ID:In-Reply-To:Subject:To:From:Date; bh=invsVJ/l8/jpqETFjJzzmtdqq1olzZmXdA/JAk+wCxY=; b=ASr2poaIPdfqvNyBI2aXx3MlGLB57/4iuCPvwouHtWVi3zelB+Br4adv6D9cmUFgxN2ikY/7bT+bavoQu6NoHk6V51EcKs6baM8jt7hchVvqtRj+fjn6HeHUgqNuZhYsGmO4Jn5GSN36i8uUcpg3jTKzE5paxI++ONDhs/oDVl8=; Original-Received: by smtp21.mail.ru with esmtpa (envelope-from ) id 1gsayI-000064-4D for emacs-devel@gnu.org; Sun, 10 Feb 2019 01:19:38 +0300 In-Reply-To: <87a7j4y66y.fsf@mbork.pl> Authentication-Results: smtp21.mail.ru; auth=pass smtp.auth=alserkli@inbox.ru smtp.mailfrom=alserkli@inbox.ru X-77F55803: 260C666A7D66B36A5A78504BD2AC2941F7BEC2B511800C06AE022E753443F3B65C86D2CFDBD4FC31F9FDDC4C2774031A X-7FA49CB5: 0D63561A33F958A5B19219C678626CB7E28580DD4B78AF8DE83C48577E09B40F8941B15DA834481FA18204E546F3947CEDCF5861DED71B2F389733CBF5DBD5E9C8A9BA7A39EFB7666BA297DBC24807EA117882F44604297287769387670735209ECD01F8117BC8BEA471835C12D1D977C4224003CC8364767815B9869FA544D8D32BA5DBAC0009BE9E8FC8737B5C2249A83EE7D357862D6D3AA81AA40904B5D9CF19DD082D7633A0E7DDDDC251EA7DABD81D268191BDAD3D78DA827A17800CE768E75A379BAF682BB3661434B16C20ACE7DDDDC251EA7DABAAAE862A0553A39223F8577A6DFFEA7C99F2BD46DBBE4565816C53425862C9A8EFF80C71ABB335746BA297DBC24807EA27F269C8F02392CDCDCF839C8780CBD93C9F3DD0FB1AF5EB4E70A05D1297E1BBCB5012B2E24CD356 X-Mailru-Sender: 7A9A33E86992913287677A6A84364F8BD8CBB9468923F931AF06C3135C76D2E10E8F58CB380BC13FA7A2F54F497AA9E7B52423DB74AF18EAF4688292F5328C65EAB4BC95F72C04283CDA0F3B3F5B9367 X-Mras: OK X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 94.100.179.250 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233177 Archived-At: On Sat, 9 Feb 2019, Marcin Borkowski wrote: > > Yes (M-0 w), but opening Dired (BTW, dired-jump is not bound to C-x > > C-j in `emacs -Q') is likely even less direct. > > Of course, but I thought it might be useful for others reading this. I use (defun copy-buffer-file-name-as-kill (&optional nondirectory) (interactive "P") (let ((f (buffer-file-name))) (when nondirectory (setq f (file-name-nondirectory f))) (kill-new f) (message "%s" f))) IMO it would be nice to have something like this bound to some key in `emacs -Q'; as well as something like insert-file-name-into-minibuffer because it is common to recall that you need the buffer file name only once you already started typing the compilation command. Furthermore, M-n does not insert buffer file name in M-x compile. -- Regards, ASK