emacs-devel
[Top][All Lists]
Advanced

[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: Marcin Borkowski
Subject: Re: A patch for `pwd' - copying the current directory to the kill ring
Date: Thu, 01 Feb 2018 22:11:16 +0100
User-agent: mu4e 0.9.19; emacs 27.0.50

On 2018-01-26, at 00:23, Stefan Monnier <address@hidden> wrote:

>> 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.

Could you give more examples of commands that would benefit from that?
Not that I think there aren't any, just I can't think of them right now.

Best,

-- 
Marcin Borkowski



reply via email to

[Prev in Thread] Current Thread [Next in Thread]