From unknown Sun Aug 17 09:09:43 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20451 <20451@debbugs.gnu.org> To: bug#20451 <20451@debbugs.gnu.org> Subject: Status: 25.0.50; [PATCH] Add prefix argument to `pwd' Reply-To: bug#20451 <20451@debbugs.gnu.org> Date: Sun, 17 Aug 2025 16:09:43 +0000 retitle 20451 25.0.50; [PATCH] Add prefix argument to `pwd' reassign 20451 emacs submitter 20451 Simen Heggest=C3=B8yl severity 20451 wishlist tag 20451 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 28 15:50:56 2015 Received: (at submit) by debbugs.gnu.org; 28 Apr 2015 19:50:56 +0000 Received: from localhost ([127.0.0.1]:43015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnBWw-0003Cx-D1 for submit@debbugs.gnu.org; Tue, 28 Apr 2015 15:50:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50403) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YnBWt-0003Cl-Ur for submit@debbugs.gnu.org; Tue, 28 Apr 2015 15:50:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnBWn-0002sv-MH for submit@debbugs.gnu.org; Tue, 28 Apr 2015 15:50:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnBWn-0002sr-J2 for submit@debbugs.gnu.org; Tue, 28 Apr 2015 15:50:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnBWm-0003tK-2u for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2015 15:50:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnBWi-0002rH-T7 for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2015 15:50:44 -0400 Received: from mail-la0-x230.google.com ([2a00:1450:4010:c03::230]:36356) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnBWi-0002r3-Ca for bug-gnu-emacs@gnu.org; Tue, 28 Apr 2015 15:50:40 -0400 Received: by lagv1 with SMTP id v1so4327848lag.3 for ; Tue, 28 Apr 2015 12:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:subject:to:message-id:mime-version:content-type; bh=xT7yzugESOOPepfiVahTt2gd/fdQ9GPyQmBYw0XyI3k=; b=oCU4WvOEBc7PmF2TYABfWrF6SthYtB10FtukcDLfiZppH7yzw6HVIxDYuHerta7WGh azB0agYuc9A7BmO1vw05KI5kumGyr4b0afrkZ9JOMSDX8HyqVKl95+e0Ie8JBYEj2R/i NKqzgXDFv09AgHqCngxABKl+N1LzyzNTHY1jWbaWXUJqaOoJlqPgb3DmLOqP0VGEQK6q tYiXT3BG/8r81gahtJSMC7UWSlFz4qfMO3O9068dMAakXA6m/18yrXxEtK3nqJomsK/x aMcTeNBvPI3YlPIzIpL0NGQEauXVWWD+pjVMRZebXzoRXJO//c+rXz+N+MAjZZy6yqLP DH7g== X-Received: by 10.112.145.136 with SMTP id su8mr15924008lbb.61.1430250639081; Tue, 28 Apr 2015 12:50:39 -0700 (PDT) Received: from [192.168.1.114] (cm-84.215.44.110.getinternet.no. [84.215.44.110]) by mx.google.com with ESMTPSA id oy3sm5810139lbb.1.2015.04.28.12.50.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Apr 2015 12:50:38 -0700 (PDT) Date: Tue, 28 Apr 2015 21:50:36 +0200 From: Simen =?iso-8859-1?q?Heggest=F8yl?= Subject: 25.0.50; [PATCH] Add prefix argument to `pwd' To: bug-gnu-emacs@gnu.org Message-Id: <1430250636.8717.0@smtp.gmail.com> X-Mailer: geary/0.8.3 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-SkPIuoFIubtzw3DAtZjo" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-SkPIuoFIubtzw3DAtZjo Content-Type: text/plain; charset=utf-8; format=flowed I often find myself doing `C-u M-x pwd RET', hoping that the current default directory will be inserted at point, but it doesn't. `pwd' doesn't currently act on a prefix argument, so why not let it do this? This matches how `shell-command', and newly also `quick-calc', treat prefix arguments. From 56c93aa20b19bebb5cb1afcf3894911355d23e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= Date: Tue, 28 Apr 2015 21:25:20 +0200 Subject: [PATCH] * lisp/files.el (pwd): When called with a prefix argument, insert the current default directory at point. --- etc/NEWS | 3 +++ lisp/files.el | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 5046d30..7497652 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -817,6 +817,9 @@ name. The variable `system-name' is now obsolete. +++ ** Function `write-region' no longer outputs "Wrote FILE" in batch mode. +** If `pwd' is called with a prefix argument, insert the current default +directory at point. + --- ** New utilities in subr-x.el: *** New macros `if-let' and `when-let' allow defining bindings and to diff --git a/lisp/files.el b/lisp/files.el index 045eeaf..ef6ac7b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -654,10 +654,14 @@ the value of `default-directory'." 'file-directory-p)) -(defun pwd () - "Show the current default directory." - (interactive nil) - (message "Directory %s" default-directory)) +(defun pwd (&optional insert) + "Show the current default directory. +With prefix argument INSERT, insert the current default directory +at point instead." + (interactive "P") + (if insert + (insert default-directory) + (message "Directory %s" default-directory))) (defvar cd-path nil "Value of the CDPATH environment variable, as a list. -- 2.1.4 --=-SkPIuoFIubtzw3DAtZjo Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
I often find myself doing `C-u M-x pwd RET', hoping that the current
default directory will be inserted at point, but it doesn't. `pwd'=
doesn't currently act on a prefix argument, so why not let it do= this?

This matches how `shell-command', and newly= also `quick-calc', treat
prefix arguments.

<= div>
From 56c93aa20b19bebb5cb1afcf3894911355d23e30 Mon S= ep 17 00:00:00 2001
From: =3D?UTF-8?q?Simen=3D20Heggest=3DC3=3DB8= yl?=3D <simenheg@gmail.com>
Date: Tue, 28 Apr 2015 21:25:20= +0200
Subject: [PATCH] * lisp/files.el (pwd):

When called with a prefix argument, insert the current default
=
directory at point.
---
 etc/NEWS   &nbs= p;  |  3 +++
 lisp/files.el | 12 ++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 5046d30..74976= 52 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -8= 17,6 +817,9 @@ name.  The variable `system-name' is now obsolete.
 +++
 ** Function `write-region' no longer output= s "Wrote FILE" in batch mode.
 
+** If `pwd' is ca= lled with a prefix argument, insert the current default
+director= y at point.
+
 ---
 ** New utilitie= s in subr-x.el:
 *** New macros `if-let' and `when-let' allo= w defining bindings and to
diff --git a/lisp/files.el b/lisp/file= s.el
index 045eeaf..ef6ac7b 100644
--- a/lisp/files.el<= /div>
+++ b/lisp/files.el
@@ -654,10 +654,14 @@ the value of = `default-directory'."
   'file-directory-p))
 
 =0C
-(defun pwd ()
-  "Show the cur= rent default directory."
-  (interactive nil)
- &n= bsp;(message "Directory %s" default-directory))
+(defun pwd (&= ;optional insert)
+  "Show the current default directory.
+With prefix argument INSERT, insert the current default directory<= /div>
+at point instead."
+  (interactive "P")
+  (if insert
+      (insert default-directo= ry)
+    (message "Directory %s" default-directory)))
 
 (defvar cd-path nil
   = "Value of the CDPATH environment variable, as a list.
-- 
2.1.4
= --=-SkPIuoFIubtzw3DAtZjo-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 30 18:38:06 2015 Received: (at 20451) by debbugs.gnu.org; 30 Apr 2015 22:38:06 +0000 Received: from localhost ([127.0.0.1]:57864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ynx5p-0007Yv-Jv for submit@debbugs.gnu.org; Thu, 30 Apr 2015 18:38:05 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:7015) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Ynx5o-0007YG-9a for 20451@debbugs.gnu.org; Thu, 30 Apr 2015 18:38:04 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnEFAGvvdVS4rw4V/2dsb2JhbAA3gVOfQYIugQiBdQEBBAFWIwULCzQSFBgNJIgTohGMbQECAQKDPgMDg20Eo2OEWA X-IPAS-Result: AnEFAGvvdVS4rw4V/2dsb2JhbAA3gVOfQYIugQiBdQEBBAFWIwULCzQSFBgNJIgTohGMbQECAQKDPgMDg20Eo2OEWA X-IronPort-AV: E=Sophos;i="5.11,557,1422939600"; d="scan'208";a="117934935" Received: from 184-175-14-21.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([184.175.14.21]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Apr 2015 18:37:58 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id B4814AE0BD; Thu, 30 Apr 2015 18:37:58 -0400 (EDT) From: Stefan Monnier To: Simen =?windows-1252?Q?Heggest=F8yl?= Subject: Re: bug#20451: 25.0.50; [PATCH] Add prefix argument to `pwd' Message-ID: References: <1430250636.8717.0@smtp.gmail.com> Date: Thu, 30 Apr 2015 18:37:58 -0400 In-Reply-To: <1430250636.8717.0@smtp.gmail.com> ("Simen =?windows-1252?Q?H?= =?windows-1252?Q?eggest=F8yl=22's?= message of "Tue, 28 Apr 2015 21:50:36 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20451 Cc: 20451@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I often find myself doing `C-u M-x pwd RET', hoping that the current > default directory will be inserted at point, but it doesn't. `pwd' > doesn't currently act on a prefix argument, so why not let it do this? > This matches how `shell-command', and newly also `quick-calc', treat > prefix arguments. Looks OK, thank you, Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri May 01 17:28:16 2015 Received: (at 20451-done) by debbugs.gnu.org; 1 May 2015 21:28:17 +0000 Received: from localhost ([127.0.0.1]:58987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YoITo-0001mq-DL for submit@debbugs.gnu.org; Fri, 01 May 2015 17:28:16 -0400 Received: from mail-lb0-f170.google.com ([209.85.217.170]:36208) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YoITm-0001md-Co for 20451-done@debbugs.gnu.org; Fri, 01 May 2015 17:28:15 -0400 Received: by lbbqq2 with SMTP id qq2so71928081lbb.3 for <20451-done@debbugs.gnu.org>; Fri, 01 May 2015 14:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:subject:to:cc:message-id:in-reply-to:references :mime-version:content-type; bh=RhTNbsGfex61sTJLmNRvrmRC+DmmUh5Pdy54BpW7yBw=; b=L8GStNB5BRmA+1WZXwP338/mYUpdd/7XM+GvwfEB3lZbYc84bXflfmsCrLirEwsxTW r7PQzbsCgZtKzzks3U9jMx1UBKcz8HdJFQQN+v+rPNRDUrRU/TEC0Nu54ydwtM3L+Q+f ZlmCGZ68lKFrZ5ggJAMmG8XEbPm2rL8Ufcz84L3WOMebWPrEUNUlWUtnlpL7lR1Q9Cmw IcrsZV8DRfMK4m5tVP+6X9CBKGcXjg+ip0fWFTPLXeqLItX/ZF8i4zOcgh+ddvE2p3Hx eZu6eoVtglzobZKiX/DCAK0zJSDrGsKHkx38E+lW5fPnKJpnFW0tOF5bKes9plY6ZlbX wMDA== X-Received: by 10.152.206.75 with SMTP id lm11mr9570014lac.41.1430515688516; Fri, 01 May 2015 14:28:08 -0700 (PDT) Received: from [192.168.100.11] (cm-84.210.143.4.getinternet.no. [84.210.143.4]) by mx.google.com with ESMTPSA id t8sm1581273lby.24.2015.05.01.14.28.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 May 2015 14:28:07 -0700 (PDT) Date: Fri, 01 May 2015 23:28:05 +0200 From: Simen =?iso-8859-1?q?Heggest=F8yl?= Subject: Re: bug#20451: 25.0.50; [PATCH] Add prefix argument to `pwd' To: Stefan Monnier Message-Id: <1430515685.2719.0@smtp.gmail.com> In-Reply-To: References: X-Mailer: geary/0.8.3 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=-5VcO+pKbB0FLQ9aV3HO3" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20451-done Cc: 20451-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-5VcO+pKbB0FLQ9aV3HO3 Content-Type: text/plain; charset=utf-8; format=flowed On Fri, May 1, 2015 at 12:37 AM, Stefan Monnier wrote: > Looks OK, thank you, Thanks, landed. -- Simen --=-5VcO+pKbB0FLQ9aV3HO3 Content-Type: text/html; charset=utf-8 On Fri, May 1, 2015 at 12:37 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
Looks OK, thank you,

Thanks, landed.

-- Simen
--=-5VcO+pKbB0FLQ9aV3HO3-- From unknown Sun Aug 17 09:09:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 30 May 2015 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator