[Top][All Lists]

[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:08:55 +0100
User-agent: mu4e 0.9.19; emacs 27.0.50

On 2018-01-25, at 14:44, Kaushal Modi <address@hidden> wrote:

> On Thu, Jan 25, 2018 at 8:13 AM Marcin Borkowski <address@hidden> wrote:
>> Hi all,
>> from time to time I have a need to insert the current directory name
>> somewhere.  Some time ago, I submitted a bug report suggesting that C-u
>> M-x pwd could insert the current dir at point.  Someone made that patch
>> a few years ago, and that is great.  However, it is not enough:
>> sometimes I want to be able to yank this dir to some other application
>> (usually the terminal - I want to cd to that dir).  I made a simple
>> patch that makes `pwd' copy the current dir to the kill ring (and - by
>> default - to the system clipboard) if prefixed with C-u C-u.  I attach
>> the patch.  WDYT?
> I wouldn't even mind copying the default-directory to kill ring by default.
> Then you don't need C-u C-u.

Fair enough.

> As a side, in your patch:
>> +  "Show the current default directory. With \\[universal-argument],
> insert
>> +the current default directory at point instead.  With
> \\[universal-argument] \\[universal-argument],
> M-x checkdoc would fail there.. the first visual line in a doc-string must
> be a complete sentence and end in a full-stop. In your patch, the first
> visual line is incomplete (ends in ", insert"). The older version, the one
> your patch is based on, did it correctly:
>> -  "Show the current default directory.
>> -With prefix argument INSERT, insert the current default directory

You're right, though sometimes it's difficult to satisfy checkdoc...


Marcin Borkowski

reply via email to

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