[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A patch for `pwd' - copying the current directory to the kill ring
From: |
Stefan Monnier |
Subject: |
Re: A patch for `pwd' - copying the current directory to the kill ring |
Date: |
Thu, 25 Jan 2018 18:23:38 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> I evaluated those two forms, and this one:
> (global-set-key [?\C-c ?p] #'copy-next-command-output)
Probably in a buffer not using lexical-binding.
This code (like most of the code I write) presumes lexical-binding.
> I think the generalisation is unwarranted in this case anyway. I bind
> C-c f to a command that puts the pwd on the kill ring, with a few
> tweaks to make it more useful to me (it optionally replaces "/" with
> "\", and if called in a buffer visiting a file, returns the file's
> name). It's more specialised, not more general. I use it a lot.
One doesn't oppose the other. I just think it's a fairly common request
to be able to insert the output of a command in the current buffer or
copy it to the clipboard, and rather than tweak each and every command
to add some clever way to do that, I think Emacs would benefit from
having a way to do it in general.
Stefan
Re: A patch for `pwd' - copying the current directory to the kill ring, Yuri Khan, 2018/01/25