From: Alexander Klimov <alserkli@inbox.ru>
To: emacs-devel@gnu.org
Subject: Re: insert-file-name-into-minibuffer
Date: Sat, 9 Feb 2019 22:19:35 +0000 [thread overview]
Message-ID: <4b24dbec3ecedf09159344f588268145@5bd3166184dda72f5bd6289323991d158> (raw)
In-Reply-To: <87a7j4y66y.fsf@mbork.pl>
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
next prev parent reply other threads:[~2019-02-09 22:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-09 14:39 insert-file-name-into-minibuffer Alexander Klimov
2019-02-09 14:50 ` insert-file-name-into-minibuffer Eli Zaretskii
2019-02-09 21:30 ` insert-file-name-into-minibuffer Alexander Klimov
2019-02-09 21:38 ` insert-file-name-into-minibuffer Marcin Borkowski
2019-02-09 21:50 ` insert-file-name-into-minibuffer Alexander Klimov
2019-02-09 21:59 ` insert-file-name-into-minibuffer Marcin Borkowski
2019-02-09 22:19 ` Alexander Klimov [this message]
2019-02-13 18:49 ` insert-file-name-into-minibuffer Marcin Borkowski
2019-02-17 7:09 ` insert-file-name-into-minibuffer Marcin Borkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b24dbec3ecedf09159344f588268145@5bd3166184dda72f5bd6289323991d158 \
--to=alserkli@inbox.ru \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).