From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: A patch for `pwd' - copying the current directory to the kill ring Date: Thu, 01 Feb 2018 22:08:55 +0100 Message-ID: <87y3kc1kpk.fsf@mbork.pl> References: <871sieozdg.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1517519427 6577 195.159.176.226 (1 Feb 2018 21:10:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 1 Feb 2018 21:10:27 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 27.0.50 Cc: emacs-devel To: Kaushal Modi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 01 22:10:22 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ehM7T-0000Vm-MS for ged-emacs-devel@m.gmane.org; Thu, 01 Feb 2018 22:10:07 +0100 Original-Received: from localhost ([::1]:35152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehM9S-0007P4-NS for ged-emacs-devel@m.gmane.org; Thu, 01 Feb 2018 16:12:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehM7g-0007Eo-Rv for emacs-devel@gnu.org; Thu, 01 Feb 2018 16:11:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehM6c-0008Lf-CI for emacs-devel@gnu.org; Thu, 01 Feb 2018 16:10:20 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:51605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehM6b-0008Kv-UJ for emacs-devel@gnu.org; Thu, 01 Feb 2018 16:09:14 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 033C7E66F7; Thu, 1 Feb 2018 22:09:13 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gCLNNMfXrGXt; Thu, 1 Feb 2018 22:09:09 +0100 (CET) Original-Received: from localhost (static-dwadziewiec-jedenpiec7.echostar.pl [109.232.29.157]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 3C7D5E669E; Thu, 1 Feb 2018 22:09:09 +0100 (CET) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222371 Archived-At: On 2018-01-25, at 14:44, Kaushal Modi wrote: > On Thu, Jan 25, 2018 at 8:13 AM Marcin Borkowski 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