unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: A patch for `pwd' - copying the current directory to the kill ring
Date: Thu, 01 Feb 2018 22:08:55 +0100	[thread overview]
Message-ID: <87y3kc1kpk.fsf@mbork.pl> (raw)
In-Reply-To: <CAFyQvY0QmbSdGSf4k1MxaQ1JtEL2oeG9DHD954o=+1yXWaXmqQ@mail.gmail.com>


On 2018-01-25, at 14:44, Kaushal Modi <kaushal.modi@gmail.com> wrote:

> On Thu, Jan 25, 2018 at 8:13 AM Marcin Borkowski <mbork@mbork.pl> 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...

Thanks,

-- 
Marcin Borkowski



  parent reply	other threads:[~2018-02-01 21:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 13:13 A patch for `pwd' - copying the current directory to the kill ring Marcin Borkowski
2018-01-25 13:44 ` Kaushal Modi
2018-01-25 14:36   ` Stefan Monnier
2018-01-25 20:13     ` Stefan Monnier
2018-01-25 23:05       ` Richard Copley
2018-01-25 23:23         ` Stefan Monnier
2018-02-01 21:11           ` Marcin Borkowski
2018-02-01 22:03             ` Alexis
2018-02-02  1:59             ` Stefan Monnier
2018-02-02  8:51               ` Eli Zaretskii
2018-02-02 17:29                 ` Stefan Monnier
2018-02-03  0:02                   ` Richard Copley
2018-02-02 23:59                 ` Richard Copley
2018-02-06 21:03               ` Marcin Borkowski
2018-01-26  7:55       ` Eli Zaretskii
2018-01-26 14:40         ` Stefan Monnier
2018-01-26 15:40           ` Eli Zaretskii
2018-02-01 21:09     ` Marcin Borkowski
2018-02-01 21:08   ` Marcin Borkowski [this message]
2018-01-25 15:47 ` Yuri Khan

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=87y3kc1kpk.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.com \
    /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).