From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: juri@linkov.net, dgutov@yandex.ru, bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 06:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 42210@debbugs.gnu.org Cc: juri@linkov.net, dgutov@yandex.ru X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: juri@linkov.net, dgutov@yandex.ru Received: via spool by submit@debbugs.gnu.org id=B.159392964819597 (code B ref -1); Sun, 05 Jul 2020 06:15:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jul 2020 06:14:08 +0000 Received: from localhost ([127.0.0.1]:59924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrxuh-00055z-Oi for submit@debbugs.gnu.org; Sun, 05 Jul 2020 02:14:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:55466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrxuf-00055r-EZ for submit@debbugs.gnu.org; Sun, 05 Jul 2020 02:14:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrxuf-0001kY-9M for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 02:14:05 -0400 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:60695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrxud-0004J1-0h for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 02:14:04 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id C4BBFB61 for ; Sun, 5 Jul 2020 02:13:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 05 Jul 2020 02:13:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=rw8ixvYeHzCGzTjnspoVzJkRIj JWuacy8KiPHdlQH2I=; b=HwzoRh6Izwj+sPhZZAH+Q3eP+8x+okzBBS9DZyWCeP ZV13GHiB7eoQUQg6BhRMLqMbJFInSREXN7W/YfCaNShtDRW+MVJvE6fs48JG7+9m 1cx2XlVrVuYf1FoUZLaCu8q9prIUWmMJi3IMPCKYreF5TDH9tWcHEM7f1RifRrn4 /DiMaek6tUOeHYS/a+yJDjitWwdiXyi0Cvqa98ajw0B/Oro65BPM65uMSy+T2bQT 57v0FZ0XYr3CfMdcJVDp4Sf6hAmk5Vy83DA/kWkt4yNyFlx34ez1I7N4nLTLoGfz XGzoYktARU45auXXHK7ecyVY3PGq1MXbGKfj16pAFKkA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=rw8ixv YeHzCGzTjnspoVzJkRIjJWuacy8KiPHdlQH2I=; b=QTdbREuRn4vRZ7rUk3JfW4 Iuempwcg8uWARWYE2rlvNp19SV0Q65zAD4FRlCyG1oyOMVOUZ1QO0uL3PLLKla+8 MRUmeuGFNmkvIiukwyIWlWZPdH7UxIOMG5xPBdkuejd2rxZTAsBRcoeMDqK8LX2F AtEX+z8XmEXGaFbaHQVKIMAqXZT2dAMcWoT1yuiZABagnsDtYQjOzmXbnAVoFulw ahdmjnM8WgyoRWXEo92u/XMZQ7EG59cj0Teug7jRoR5HD40d/zNWdBnfZ0EqCOuZ jamwCQV6eBN3SD8MaWZpQCApxUi3mTn7faDLE+QoIUXDLV8b8DWCYRgGsAe9/Opw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddtgddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuogfhohhrsghiugguvghnufhorhhtjfgurhculdehtd dtmdenucfjughrpefhvffujghffffkgggtsehmtderredttddtnecuhfhrohhmpefuvggr nhcuhghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg eqnecuggftrfgrthhtvghrnhepieffhfffudfhjefgfeeuleeutdevtdektdehiefgieet leevveekgeduhedtudefnecuhfhorhgsihguuggvnhfuohhrthfjughrpeffhffkuffvgg gjtghfsehmtderredttddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <87blkw5cd3.fsf@iris.silentflame.com> References: <87blkw5cd3.fsf@iris.silentflame.com> Date: Sat, 04 Jul 2020 23:13:58 -0700 Message-ID: <87tuymh4k9.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=64.147.123.26; envelope-from=spwhitton@spwhitton.name; helo=wnew1-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/05 02:14:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.6 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.6 (--) --=-=-= Content-Type: text/plain Hello, On Fri 03 Jul 2020 at 05:54PM -07, Sean Whitton wrote: > It seems like it would be a good idea to have > > C-x 4 p f > be like > C-x 4 4 C-x p f > > C-x 5 p e > be like > C-x 5 5 C-x p e > > etc., since many of the commands in project-prefix-map involve switching > to another buffer. Certainly project-switch-project, project-find-file > and project-switch-to-buffer would be wanted. Here is a patch implementing commands under C-x 4 p. If the approach is thought sound I can also prepare patches for C-x 5 p and C-x t p. I have tested the attached change except for the autoload cookies which I am not sure will work with my new macro. And I'm not sure I should be doing this with a macro instead of a function which calls fset -- please advise. If you want me to do copyright assignment before investing time giving me feedback on my patch, I would be happy to. -- Sean Whitton --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-define-other-window-command-and-project-other-wi.patch >From bc52db3611612fc595793fd5f2aebd4a7d9bdb59 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 4 Jul 2020 22:40:36 -0700 Subject: [PATCH] Add define-other-window-command and project-other-window-prefix-map * lisp/progmodes/project.el: Add project-other-window-prefix-map, bind to C-x 4 p, and use define-other-window-command to define the map's commands. * lisp/window.el: Add define-other-window-command. --- lisp/progmodes/project.el | 28 ++++++++++++++++++++++++++++ lisp/window.el | 17 +++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 0a15939d24..3a0034b24a 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -512,6 +512,19 @@ project-prefix-map ;;;###autoload (define-key ctl-x-map "p" project-prefix-map) +;;;###autoload +(defvar project-other-window-prefix-map + (let ((map (make-sparse-keymap))) + (define-key map "f" 'project-find-file-other-window) + (define-key map "b" 'project-switch-to-buffer-other-window) + (define-key map "d" 'project-dired-other-window) + (define-key map "e" 'project-eshell-other-window) + (define-key map "p" 'project-switch-project-other-window) + map) + "Keymap for -other-window project commands.") + +;;;###autoload (define-key ctl-x-4-map "p" project-other-window-prefix-map) + (defun project--value-in-dir (var dir) (with-temp-buffer (setq default-directory dir) @@ -864,6 +877,21 @@ project-kill-buffers (length bufs) (project-root pr))) (mapc #'kill-buffer bufs)))) +;;;###autoload +(define-other-window-command project-find-file) + +;;;###autoload +(define-other-window-command project-switch-to-buffer) + +;;;###autoload +(define-other-window-command project-dired) + +;;;###autoload +(define-other-window-command project-eshell) + +;;;###autoload +(define-other-window-command project-switch-project) + ;;; Project list diff --git a/lisp/window.el b/lisp/window.el index 675aff041b..519e15ac79 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4042,6 +4042,23 @@ same-window-prefix 'reuse))) (message "Display next command buffer in the same window...")) +(defmacro define-other-window-command (function) + "Define a version of FUNCTION which displays its buffer in another window. + +The new function will be named 'FUNCTION-other-window'." + (let ((other-window-function + (intern (concat (symbol-name function) "-other-window")))) + `(defun ,other-window-function (&rest args) + ,(concat "Like `" (symbol-name function) + "' but prefer to display resultant buffer in another window.") + ,@(if (commandp function) '((interactive)) '()) + (let ((display-buffer-overriding-action + '((display-buffer-pop-up-window) + (inhibit-same-window . t)))) + (if (called-interactively-p) + (call-interactively ',function) + (apply ',function args)))))) + ;; This should probably return non-nil when the selected window is part ;; of an atomic window whose root is the frame's root window. (defun one-window-p (&optional nomini all-frames) -- 2.26.2 --=-=-=-- From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 14:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: juri@linkov.net, 42210@debbugs.gnu.org, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159396009518005 (code B ref 42210); Sun, 05 Jul 2020 14:42:01 +0000 Received: (at 42210) by debbugs.gnu.org; 5 Jul 2020 14:41:35 +0000 Received: from localhost ([127.0.0.1]:32849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js5pn-0004gK-FN for submit@debbugs.gnu.org; Sun, 05 Jul 2020 10:41:35 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js5pl-0004g6-MX for 42210@debbugs.gnu.org; Sun, 05 Jul 2020 10:41:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33492) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1js5pe-00087Q-Ko; Sun, 05 Jul 2020 10:41:26 -0400 Received: from [176.228.60.248] (port=2174 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1js5pd-0002h5-Ro; Sun, 05 Jul 2020 10:41:26 -0400 Date: Sun, 05 Jul 2020 17:41:32 +0300 Message-Id: <83blkut46b.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87tuymh4k9.fsf@iris.silentflame.com> (message from Sean Whitton on Sat, 04 Jul 2020 23:13:58 -0700) References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > From: Sean Whitton > Date: Sat, 04 Jul 2020 23:13:58 -0700 > Cc: dgutov@yandex.ru, juri@linkov.net > > Here is a patch implementing commands under C-x 4 p. If the approach is > thought sound I can also prepare patches for C-x 5 p and C-x t p. Thanks. Please accompany these changes with suitable changes to NEWS and the user manual. > If you want me to do copyright assignment before investing time giving > me feedback on my patch, I would be happy to. Form sent off-list. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 18:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , 42210@debbugs.gnu.org Cc: juri@linkov.net, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.15939742787673 (code B ref 42210); Sun, 05 Jul 2020 18:38:02 +0000 Received: (at 42210) by debbugs.gnu.org; 5 Jul 2020 18:37:58 +0000 Received: from localhost ([127.0.0.1]:33017 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js9WY-0001zg-HM for submit@debbugs.gnu.org; Sun, 05 Jul 2020 14:37:58 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:52730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1js9WV-0001zR-Ub for 42210@debbugs.gnu.org; Sun, 05 Jul 2020 14:37:56 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 065IauuF172253; Sun, 5 Jul 2020 18:37:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=ji8qEqlIWjiUNtmrtexzidAbdX78hghsu4kvXGubIKc=; b=vPNC/0CQMSY3ZkPBiWQUiBek4mjw07Py3ALt9+j3+CC7sYrrPd+zBg4cAS38ipX8xtA5 eOjf2+vTqipkDGXfh4EJ6o0hIAycDW4Ltp1AnKOwY2caZGB/G1/ptMJLDyLoEFTM0eLh TQSRmD1+g2G7BdKkR0bi34LhGVFFfRfnm1KShReYl6wAGlBkPd4FaJCwsYP0l+LX5eQP 2jI62n3Gu8i3iSJHHM2zGA6nhO2bVo2pYDUddIGyL7qMaWQmh1qENhbr9omC6GGyG79y ItMbCpy23osqsS+xhd3iv9+xhx5CKMifWjeZ/Nsprt8hpm9vBuMLrwGPtFSa5eIu0tJu AA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 322kv633sf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 05 Jul 2020 18:37:48 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 065IJ0NZ141214; Sun, 5 Jul 2020 18:35:48 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 3233nwycv1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 05 Jul 2020 18:35:48 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 065IZevg012631; Sun, 5 Jul 2020 18:35:41 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 5 Jul 2020 11:35:39 -0700 (PDT) From: Drew Adams References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> In-Reply-To: <87tuymh4k9.fsf@iris.silentflame.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5017.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9673 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 bulkscore=0 malwarescore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007050141 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9673 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 phishscore=0 spamscore=0 priorityscore=1501 clxscore=1011 impostorscore=0 mlxscore=0 adultscore=0 cotscore=-2147483648 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007050142 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) 1. I disagree with calling the macro `define-other-window-command'. My disagreement is this: Defining an other-window command should do just that. It should not define a command that only "prefers" to display in another window. It should define a command that actually displays in another window. And your doc string in fact says the latter, though the behavior is, I guess, only the former. Please consider renaming the macro and fixing the doc string, to make clear that it's NOT other-window but only maybe-other-window. 2. Why "resultant buffer". What does the buffer result from? It's about whatever FUNCTION displays, no? 3. Presumably FUNCTION must be a _command_. If so, the arg should be called COMMAND, and the doc adjusted accordingly. #2 and #3 are minor. I'm more concerned about #1. Emacs has many commands that are _really_ other-window. They generally use `pop-to-buffer' or `switch-to-buffer-other-window'. If this macro produces commands that only "prefer" to use another window, then the name and doc string are false advertising. 4. Why not have a macro that _really_ provides an other-window command? From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Jul 2020 20:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Drew Adams , 42210@debbugs.gnu.org Cc: juri@linkov.net, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159398072417532 (code B ref 42210); Sun, 05 Jul 2020 20:26:01 +0000 Received: (at 42210) by debbugs.gnu.org; 5 Jul 2020 20:25:24 +0000 Received: from localhost ([127.0.0.1]:33038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsBCW-0004Yh-Iu for submit@debbugs.gnu.org; Sun, 05 Jul 2020 16:25:24 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsBCS-0004YP-5l for 42210@debbugs.gnu.org; Sun, 05 Jul 2020 16:25:22 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 90CF65C0086; Sun, 5 Jul 2020 16:25:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 05 Jul 2020 16:25:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=xC/ImioXdAj08VScDAOZxbj57Z k8VjvE6QBU9Vj6Tp0=; b=vf1hiUWkjEspvqFK9QxTS4zcsgpLhnGDpn9QMoTJVW SUeQLppPdz8ET45NzOdlA5h0h69ZoL8XmlOtv32aRja/ej04rYkJYTPWam/3RYxF y+ES+VHJkZUqLqXZs1rYlU5ah4Fy2w/wVdc4SoETVNlrz9SOh6hSBpeFN0tU2DaE oKL+nMMR9x06xxvBBqt+45Syv6IO4QaSjaidGXR7dQQUCUNKEpNFiievoNM4WUEA 3a/YTlXXRwBxPH+1QPNb5xykDkInr2g5U+Zbd/Ld+P4GQDA2oJvdL30V0SXNOkMb 0d4uRx+gUlklq3MjebafNfBNh5UTF2opgi6gd5pwxXcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=xC/Imi oXdAj08VScDAOZxbj57Zk8VjvE6QBU9Vj6Tp0=; b=Q8jjIPODhilsFZYhqnWlrQ S64P/w9e2cx24i03d+XFQGwnSEk3vfI/blWvw7gE0bX6hOG+aDZWBhLuUxqazk+n lwah4VBh2WtYEFd7AQO71S1NE7zOH4/f7jSnPvOyGB8Kjft3uuIonVIS6hMQ8FN/ 1q8/C/DWgngCOkufRebNNU1GPtnnHcQ8kgQjv6zmRukVHTnbDVRp2RiHtRjRhMSC 1OSeKelJsfg6JIeD6xn1MD+dVhNDkT+QetWNNI2o/R7pWDRJ/tu1CflzuIFld4yZ GRXabh1fuIKBx/AzM0VKXSqASdcUO1RFnHrjBA6G2Shu/FbGPmU656mkEyRIYRIg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddugdduhedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepufgvrghnucgh hhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenuc ggtffrrghtthgvrhhnpeegtddvheegfffhffdvfeefhffgjefflefhteevffffkeetgfdt jedtiedvtdevheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: From: Sean Whitton In-Reply-To: References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> Date: Sun, 05 Jul 2020 13:25:13 -0700 Message-ID: <875zb1hfpy.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello, On Sun 05 Jul 2020 at 11:35AM -07, Drew Adams wrote: > 1. I disagree with calling the macro `define-other-window-command'. > > My disagreement is this: Defining an other-window command > should do just that. It should not define a command that > only "prefers" to display in another window. It should > define a command that actually displays in another window. > > And your doc string in fact says the latter, though the > behavior is, I guess, only the former. Please consider > renaming the macro and fixing the doc string, to make clear > that it's NOT other-window but only maybe-other-window. Hmm, but doesn't pop-to-buffer-other-window also only prefer to use another window, and ultimately defers to the display-buffer-alist machinery? > 2. Why "resultant buffer". What does the buffer result > from? It's about whatever FUNCTION displays, no? Please feel free to suggest alternative phrasing that will be short enough to fit in one line, which I understand to be required. > 3. Presumably FUNCTION must be a _command_. If so, > the arg should be called COMMAND, and the doc adjusted > accordingly. No, it can just be a function too. -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 00:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , 42210@debbugs.gnu.org Cc: juri@linkov.net, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.15939936254597 (code B ref 42210); Mon, 06 Jul 2020 00:01:01 +0000 Received: (at 42210) by debbugs.gnu.org; 6 Jul 2020 00:00:25 +0000 Received: from localhost ([127.0.0.1]:33119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsEYb-0001C4-Ew for submit@debbugs.gnu.org; Sun, 05 Jul 2020 20:00:25 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:36024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsEYZ-0001Bp-9V for 42210@debbugs.gnu.org; Sun, 05 Jul 2020 20:00:24 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 065NqwRn027906; Mon, 6 Jul 2020 00:00:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=7+X2AfKkuzUwA9de5lVTboFeOlLfLWfW3azckyrZnS0=; b=mN/8nBNBpMzq1eSjv4byhLIppVgUzKs8mb2E3zIXTqt0rAzvvS08XEY34G8LJ8LuGO5L pZhzO0zjSciMY6DGI35HuwErsxYc+s93fVGnqLrcVKjNISifcejnUKkjMvmHpIXAUjk0 wmNfwq+GQXy+Et7/cqugBNAa5ImelnKTbdUZ3pF0cSgIqS6JlqShhnAIyGeAxBq7qCRf t5al97myMK28C2elC1A4wdz6xd6LaluQBXOd95xsuuThX7tQKrXLvtCgmwnKylvudssW pNYOColuFdO6RJGlfyZ27oc4dpuRqqdHfMKFksu5qg8IG8gradk6CZvgKl1cMER14xLO rA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 322kv63eqe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 06 Jul 2020 00:00:17 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 065Ns52S073676; Mon, 6 Jul 2020 00:00:16 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 3233pue922-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jul 2020 00:00:16 +0000 Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 06600B6e007781; Mon, 6 Jul 2020 00:00:11 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 5 Jul 2020 17:00:10 -0700 (PDT) From: Drew Adams References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> <875zb1hfpy.fsf@iris.silentflame.com> In-Reply-To: <875zb1hfpy.fsf@iris.silentflame.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5017.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9673 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 adultscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007050186 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9673 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 phishscore=0 spamscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 mlxscore=0 adultscore=0 cotscore=-2147483648 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2007050186 X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > > 1. I disagree with calling the macro `define-other-window-command'. > > > > My disagreement is this: Defining an other-window command > > should do just that. It should not define a command that > > only "prefers" to display in another window. It should > > define a command that actually displays in another window. > > > > And your doc string in fact says the latter, though the > > behavior is, I guess, only the former. Please consider > > renaming the macro and fixing the doc string, to make clear > > that it's NOT other-window but only maybe-other-window. >=20 > Hmm, but doesn't pop-to-buffer-other-window also only prefer to use > another window, and ultimately defers to the display-buffer-alist > machinery? 1. (There is no `pop-to-buffer-other-window', is there?) The doc of `pop-to-buffer' goes out of its way to tell about its relation with `display-buffer' - because it passes its arg to it. =20 The doc of `switch-to-buffer-other-window' just says directly that it selects the buffer in another window. Only at its very end does it mention the possibility that `display-buffer' can alter behavior: This uses the function `display-buffer' as a subroutine; see its documentation for additional customization information. What's not so good is to (a) not say what THIS function is for: other-window and (b) not mention `display-buffer', while suggesting some other behavior than other-window. 2. I suppose `display-buffer(-alist)' can override anything now. If that's all that's meant then I think it shouldn't be put that way. It's OK (but might not be needed or appropriate) to add some mention of it at the end. But I don't think the behavior of the command should be described that way. The point of the resulting function is (presumably) to use another window. The point of any additional `display-buffer*' shenanigans - or other Lisp code that might have an effect on things - could be just about anything. This doc should be about what the resulting function intends to do, not whatever some other code might make it do instead. If you want to go the other route, then make the relation explicit, as does the doc of `pop-to-buffer' and `switch-to-buffer-other-window'. > > 2. Why "resultant buffer". What does the buffer result > > from? It's about whatever FUNCTION displays, no? >=20 > Please feel free to suggest alternative phrasing that will be short > enough to fit in one line, which I understand to be required. Define an other-window version of FUNCTION. or Define a function like FUNCTION that outputs to another window. or Define a function like FUNCTION but that outputs to another window. > > 3. Presumably FUNCTION must be a _command_. If so, > > the arg should be called COMMAND, and the doc adjusted > > accordingly. >=20 > No, it can just be a function too. You're right; I was wrong about that. However, isn't the real purpose of this macro to define commands, which you can bind to keys to get other-window behavior? Is there really some other expected use case? Would anyone use it for a non-interactive function? If you want to be exact then yes, FUNCTION. But in that case I think the doc should say that FUNCTION is typically a command, i.e., give the use case that's the raison d'etre for the macro. BTW, this part of your patch doesn't seem right: (called-interactively-p). Argument KIND is optional (should it really be?), but the behavior of calling the function without KIND is not documented, and it always just returns nil. (I filed bug #42222 about KIND being optional etc.) From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands In-Reply-To: <87tuymh4k9.fsf@iris.silentflame.com> Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 00:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 42210@debbugs.gnu.org, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.15939969349679 (code B ref 42210); Mon, 06 Jul 2020 00:56:01 +0000 Received: (at 42210) by debbugs.gnu.org; 6 Jul 2020 00:55:34 +0000 Received: from localhost ([127.0.0.1]:33148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsFPy-0002W0-8b for submit@debbugs.gnu.org; Sun, 05 Jul 2020 20:55:34 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:43553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsFPw-0002Vg-In for 42210@debbugs.gnu.org; Sun, 05 Jul 2020 20:55:33 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 8C63360002; Mon, 6 Jul 2020 00:55:24 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> Date: Mon, 06 Jul 2020 03:19:16 +0300 Message-ID: <87k0zhv6kb.fsf@linkov.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) > Here is a patch implementing commands under C-x 4 p. If the approach is > thought sound I can also prepare patches for C-x 5 p and C-x t p. > > I have tested the attached change except for the autoload cookies which > I am not sure will work with my new macro. And I'm not sure I should be > doing this with a macro instead of a function which calls fset -- please > advise. Thanks for the patch. On emacs-devel you said that rather than add definitions of project-find-file-other-window, etc. display-buffer-override-next-command could be used. But there is no display-buffer-override-next-command in your patch, and definitions of project-find-file-other-window etc. are still added (with the help of macro). Would it be possible to define the 'C-x 4 p' map the same way as 'C-x p p' is defined? There is a patch in https://debbugs.gnu.org/41890#127 to use the default project keymap 'C-x p' in 'C-x p p'. You could try to use the same keymap in 'C-x 4 p', and wrap the command call with display-buffer-override-next-command. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 01:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 42210@debbugs.gnu.org, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159400071015489 (code B ref 42210); Mon, 06 Jul 2020 01:59:01 +0000 Received: (at 42210) by debbugs.gnu.org; 6 Jul 2020 01:58:30 +0000 Received: from localhost ([127.0.0.1]:33189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsGOr-00041l-Lv for submit@debbugs.gnu.org; Sun, 05 Jul 2020 21:58:29 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:52721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsGOm-00041V-PG for 42210@debbugs.gnu.org; Sun, 05 Jul 2020 21:58:28 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 496175C00A9; Sun, 5 Jul 2020 21:58:19 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 05 Jul 2020 21:58:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=4IT3ubfEdrm80dnuTsuK0tTOuq YNb1OTmNhG1ivp8t0=; b=P/C9kn7cQkyzqXCTEntWxfcJBhU37Z1eqK3sjz1DHX otxC3/+A9+m9Yu11gYVQBo/rYQ/aD5apsZljyWE8y56LjSljoxRcXqLOIXvmSVTW Bv0MiT8c0LV4oeHIya55p1DZpPiX62CQa45IZA46ZdQ5PDc6tD9bx+0drooofqE0 g1SLcrbyZV72xSQ8lE5tQOjFvmq5/pjCaCBwniNMH1aEGD7oA+QyJ9yHAEiUAkUj 7ej6hsRhB8pWb0Z3yOS3ieV0FiWyBYGrwPZLiCxb6er7aWijmJdk1GjNzDcrQcT7 wdO7JpXa+7GmVyRvf7oNl1EbH8qitma1z2laKDt3TaeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=4IT3ub fEdrm80dnuTsuK0tTOuqYNb1OTmNhG1ivp8t0=; b=BCqtmlCoObLCqcLO7yM2PC E0iD7VYSf4pSdnTzsOThDU6Ct0K+dl+JilpAzGnDtSiqquK5MMgbYVambZTf++dE J/qEePB/ghonESW10dJM18GEmPgUNJQLUZU4q2Wmlz/ybDOoubAM7MzrcSKzp3tv 7zcHFCaEUaJOlOH4fBuyxLiYdnoTe9JuLydnaGYHA5uKk8GZI1Bpaucsl4GyPaz6 nFKuqsmrPtITrM8iK0N8iI2Q/fSZWL8xkng1J7KrC7E41/b2JP3W+DkfKzb+tU8Z 2zdAhiKfHPFWKZR0hQ/fVKljKvYn3qNBEKFlZyJR1eZjdqiURUEe5keouNM44ijQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddvgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgeetfffgtdeuveduveekteejuddugeevvdevheeggefhgeeifeef hfdtffevvdejnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhihht thhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <87k0zhv6kb.fsf@linkov.net> References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> <87k0zhv6kb.fsf@linkov.net> Date: Sun, 05 Jul 2020 18:58:17 -0700 Message-ID: <87wo3hflqe.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello Juri, Thanks for taking a look. On Mon 06 Jul 2020 at 03:19AM +03, Juri Linkov wrote: >> Here is a patch implementing commands under C-x 4 p. If the approach is >> thought sound I can also prepare patches for C-x 5 p and C-x t p. >> >> I have tested the attached change except for the autoload cookies which >> I am not sure will work with my new macro. And I'm not sure I should be >> doing this with a macro instead of a function which calls fset -- please >> advise. > > Thanks for the patch. On emacs-devel you said that rather than add > definitions of project-find-file-other-window, etc. > display-buffer-override-next-command could be used. But there is no > display-buffer-override-next-command in your patch, and definitions of > project-find-file-other-window etc. are still added (with the help of macro). Yeah. After thinking about it a bit more I thought that this would be more consistent with both the way the other C-x 4 commands work and how the C-x p subcommands work -- i.e., it's just an ordinary keymap. Additionally, my approach means that the -other-window functions are available to be called from lisp, just as switch-to-buffer-other-window and find-file-other-window already are, which might be useful. >From my perspective, the use of define-other-window-command is sufficient to resolve my concerns (posted to emacs-devel) about having to define all the functions. And I think that the macro could be useful in user init files and maybe elsewhere. > Would it be possible to define the 'C-x 4 p' map the same way as > 'C-x p p' is defined? There is a patch in https://debbugs.gnu.org/41890#127 > to use the default project keymap 'C-x p' in 'C-x p p'. You could try to > use the same keymap in 'C-x 4 p', and wrap the command call with > display-buffer-override-next-command. I could give it a shot, but wouldn't it be less useful, since the -other-window functions would no longer be available to be called from lisp? As I say, I think the concerns about having to define the functions is resolved by define-other-window-command (or whatever it ends up called). Maybe you could explain why you think doing it like C-x p p would be better. Thanks again. -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Jul 2020 23:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 42210@debbugs.gnu.org, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159407736418576 (code B ref 42210); Mon, 06 Jul 2020 23:17:02 +0000 Received: (at 42210) by debbugs.gnu.org; 6 Jul 2020 23:16:04 +0000 Received: from localhost ([127.0.0.1]:35101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsaLE-0004pY-8p for submit@debbugs.gnu.org; Mon, 06 Jul 2020 19:16:04 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jsaL9-0004on-Os for 42210@debbugs.gnu.org; Mon, 06 Jul 2020 19:16:03 -0400 X-Originating-IP: 91.129.96.187 Received: from mail.gandi.net (m91-129-96-187.cust.tele2.ee [91.129.96.187]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id E34931BF207; Mon, 6 Jul 2020 23:15:51 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> <87k0zhv6kb.fsf@linkov.net> <87wo3hflqe.fsf@iris.silentflame.com> Date: Tue, 07 Jul 2020 01:59:25 +0300 In-Reply-To: <87wo3hflqe.fsf@iris.silentflame.com> (Sean Whitton's message of "Sun, 05 Jul 2020 18:58:17 -0700") Message-ID: <87mu4cs0ly.fsf@linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >> Thanks for the patch. On emacs-devel you said that rather than add >> definitions of project-find-file-other-window, etc. >> display-buffer-override-next-command could be used. But there is no >> display-buffer-override-next-command in your patch, and definitions of >> project-find-file-other-window etc. are still added (with the help of macro). > > Yeah. After thinking about it a bit more I thought that this would be > more consistent with both the way the other C-x 4 commands work and how > the C-x p subcommands work -- i.e., it's just an ordinary keymap. > > Additionally, my approach means that the -other-window functions are > available to be called from lisp, just as switch-to-buffer-other-window > and find-file-other-window already are, which might be useful. Actually, keeping consistency with existing C-x 4 commands is not a requirement. It's quite possible that existing commands will be declared deprecated as currently is discussed on emacs-devel. >> Would it be possible to define the 'C-x 4 p' map the same way as >> 'C-x p p' is defined? There is a patch in https://debbugs.gnu.org/41890#127 >> to use the default project keymap 'C-x p' in 'C-x p p'. You could try to >> use the same keymap in 'C-x 4 p', and wrap the command call with >> display-buffer-override-next-command. > > I could give it a shot, but wouldn't it be less useful, since the > -other-window functions would no longer be available to be called from > lisp? I see it as an advantage that makes the namespace cleaner - there will be no more such useless duplicates as switch-to-buffer switch-to-buffer-other-frame switch-to-buffer-other-tab switch-to-buffer-other-window and similarly for dozens of other commands. When browsing command names e.g. in command completions of M-x or C-h f this will reduce the mess. For a rare case when the users might want to bind an other-window command directly to a non-prefix key in an init file, then maybe it's possible to provide a macro or better a wrapper function that could be used like (global-set-key (kbd "C-x w b") (with-other-window 'switch-to-buffer)) > Maybe you could explain why you think doing it like C-x p p would be > better. Thanks again. Let's see what the emacs-devel discussion will bring, maybe C-x 4 will be bound to a command like C-x p p is implemented in https://debbugs.gnu.org/41890#50 From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Jul 2020 06:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 42210@debbugs.gnu.org, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159418966522335 (code B ref 42210); Wed, 08 Jul 2020 06:28:02 +0000 Received: (at 42210) by debbugs.gnu.org; 8 Jul 2020 06:27:45 +0000 Received: from localhost ([127.0.0.1]:37318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jt3YW-0005oB-Ts for submit@debbugs.gnu.org; Wed, 08 Jul 2020 02:27:45 -0400 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:41343) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jt3YU-0005nx-Rv for 42210@debbugs.gnu.org; Wed, 08 Jul 2020 02:27:43 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id F0C132D2; Wed, 8 Jul 2020 02:27:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 08 Jul 2020 02:27:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=YraOdR2NnxqdiRaTeR6eelOrWc y6DOibFFRBdzEUufY=; b=jFIiQC1+PAlw62lwIfY3kHFmYhxWzRr0Gox/ggOYdr 8jnXGYbPjQYKjp7wfiQjFAOC6Ql92qH/Bu/C3WzrpjZYv56tDDAbdhFFA3Mx9o4k 5mf3eFHUe1PTNbkqZ9NdoeKfkoRa45mY4g0AwlM+Ibor3SpJd1Hpdq2gT6p7KSG7 s9mL3gbiazS3LnwEA8U0pSa+mwKDY/459DAnky0b3rEfIRI6XPkbxsfwzAd3dPvK Ib2L/x5OKto/P9Vv03n22JNZaqoiZduObxE+mxBjlJpq9Aq/loEYtfs+VWcbzn5n 6EWjo3Kt4zvbrxRwjF0K2bQX5Rac8nPZmc1r2NEIT8Hw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=YraOdR 2NnxqdiRaTeR6eelOrWcy6DOibFFRBdzEUufY=; b=e/R17MBsEKcEgglgfKHVel hHoyBF0gOXdSxy5BPk/keRr2m1b/8cfNZcfDpMrfpGJwiJOd9AYYqUSvSz2tasIO 8ytMtB5Rgmwqg0SQrFYPBgf+lPfwLLSinEaI/78ZxEPnxPL8YpKHwthA1rXAFbJk DB49h/pWUFcZnGJ6UTZuMiBKE2z6PXCwj1L3yfymk7z7xpYpkBg8tM9p+OF9gD3U 5f+9qe2eVub8krTXdHcM2cypNpiSkRp92Kq6ZLXfEw2EOzmiemGhJpZ1TEp6hot5 U7+kSdMEm1Z0yANOs6P5BphwUI87c6i4ObOU8VUqxYlQXznzX8S6U82/FkMFpZgQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudeigdduuddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepufgvrghnucgh hhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenuc ggtffrrghtthgvrhhnpeegteffgfdtueevudevkeetjeduudegvedvveehgeeghfegieef fefhtdffvedvjeenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsphifhhhi thhtohhnrdhnrghmvg X-ME-Proxy: From: Sean Whitton In-Reply-To: <87mu4cs0ly.fsf@linkov.net> References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> <87k0zhv6kb.fsf@linkov.net> <87wo3hflqe.fsf@iris.silentflame.com> <87mu4cs0ly.fsf@linkov.net> Date: Tue, 07 Jul 2020 23:27:35 -0700 Message-ID: <87pn96ed2g.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello Juri, On Tue 07 Jul 2020 at 01:59AM +03, Juri Linkov wrote: > Actually, keeping consistency with existing C-x 4 commands > is not a requirement. It's quite possible that existing commands > will be declared deprecated as currently is discussed on emacs-devel. Okay. >>> Would it be possible to define the 'C-x 4 p' map the same way as >>> 'C-x p p' is defined? There is a patch in https://debbugs.gnu.org/41890#127 >>> to use the default project keymap 'C-x p' in 'C-x p p'. You could try to >>> use the same keymap in 'C-x 4 p', and wrap the command call with >>> display-buffer-override-next-command. I'm not completely clear on the changes you're planning to C-x 4 -- do they interact with my proposal, such that I should wait to reroll my patch, or can I go ahead and try something equivalent to the patch in #41890 you linked to? -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jul 2020 00:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 42210@debbugs.gnu.org, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159425453528347 (code B ref 42210); Thu, 09 Jul 2020 00:29:01 +0000 Received: (at 42210) by debbugs.gnu.org; 9 Jul 2020 00:28:55 +0000 Received: from localhost ([127.0.0.1]:39451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtKQp-0007N8-1M for submit@debbugs.gnu.org; Wed, 08 Jul 2020 20:28:55 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:55609) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jtKQm-0007Mu-JF for 42210@debbugs.gnu.org; Wed, 08 Jul 2020 20:28:53 -0400 X-Originating-IP: 91.129.103.18 Received: from mail.gandi.net (m91-129-103-18.cust.tele2.ee [91.129.103.18]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id C9F291C0003; Thu, 9 Jul 2020 00:28:44 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> <87k0zhv6kb.fsf@linkov.net> <87wo3hflqe.fsf@iris.silentflame.com> <87mu4cs0ly.fsf@linkov.net> <87pn96ed2g.fsf@iris.silentflame.com> Date: Thu, 09 Jul 2020 03:10:31 +0300 In-Reply-To: <87pn96ed2g.fsf@iris.silentflame.com> (Sean Whitton's message of "Tue, 07 Jul 2020 23:27:35 -0700") Message-ID: <87wo3d35a4.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >>>> Would it be possible to define the 'C-x 4 p' map the same way as >>>> 'C-x p p' is defined? There is a patch in https://debbugs.gnu.org/41890#127 >>>> to use the default project keymap 'C-x p' in 'C-x p p'. You could try to >>>> use the same keymap in 'C-x 4 p', and wrap the command call with >>>> display-buffer-override-next-command. > > I'm not completely clear on the changes you're planning to C-x 4 -- do > they interact with my proposal, such that I should wait to reroll my > patch, or can I go ahead and try something equivalent to the patch in > #41890 you linked to? While it's still unclear whether the global keymap ‘C-x 4’ will be replaced by a command, if you want, feel free to try implementing the same to a more localized keymap ‘C-x 4 p’ based on patches in bug#41890 and on the ELPA package ‘other-frame-window’. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: Add -other-window variants of project-prefix-map commands Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Jul 2020 17:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: 42210@debbugs.gnu.org, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.15944873534420 (code B ref 42210); Sat, 11 Jul 2020 17:10:02 +0000 Received: (at 42210) by debbugs.gnu.org; 11 Jul 2020 17:09:13 +0000 Received: from localhost ([127.0.0.1]:44860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juIzx-00019E-Eq for submit@debbugs.gnu.org; Sat, 11 Jul 2020 13:09:13 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:46017) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juIzw-00018z-As for 42210@debbugs.gnu.org; Sat, 11 Jul 2020 13:09:12 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 6D5C5DAA; Sat, 11 Jul 2020 13:09:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 11 Jul 2020 13:09:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm3; bh= 003T0s7Wk2FN4MrXqUB8x82phAMBSuUJBm3K7e6LkQg=; b=lRxcrt+fCLxaBW50 AIKOggsQ+8xa/jKiZt6uW6DB0q9UTMC9ZisOSR3oFwuQ7ANNNKbcofmALGrzMl1Z 4oGXTFQQdxAxi5FbyDEB3IlDJOambU/joV45ozpmvYIZczfZ4YEy3JPyH6M04x+4 kkJBTNqBNvlZf5lrZxUky4C17RURjB2qWW29FPh0ETWKSuR4LGT/H7Q506XRZzE3 3HqJB7DwFQgqXUmwJpEI14YdkI8rX9CxWrRt+0boeL7QjDnwY5xbL1vMaCXubePH ItMQuvKIfxCS4jPYADD06OI96GBhLXFSbdpaovOggEuutwWVfxl4twmfZfKYGZ5u XGeCUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=003T0s7Wk2FN4MrXqUB8x82phAMBSuUJBm3K7e6Lk Qg=; b=bOHEyV657lUEjrhGIgiQze1JvSeEz6FjjEx2eKnJef6UVTWmjyPBoutTl 2N/aHZjwIfjh21uVuLae/2seAcguLI/x7KNMMG5x5EivZSKJV5Jm4V6pfL0E7bM5 MdXNkMbiS3rYHoQQoVqDWHze5yQO2muucqecXr67tkYPAxBkYFQKIoI5047kmpZK Yp0XmvB0Tvkwwj2BkZtbjbJj2LidOzCEz4MqKQ98Wy4YDSbWwEJhY7HiTGbgQssH kvQGLzxAUi7/vObj5WN9tpnqyiI4OvozGZK0y/gzF9975LG6C1GgnexyG3DRRSzu R9DiptVSGjE/l/FKItQ4Vbn8OOuTg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrvdefgdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhffkfggtgfgsehtqhertddttdejnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepvdfgkeevtdetvedvhffhgeevleelfeekveeuveehffduvdei udfhgeelvefghfehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <87wo3d35a4.fsf@mail.linkov.net> References: <87blkw5cd3.fsf@iris.silentflame.com> <87tuymh4k9.fsf@iris.silentflame.com> <87k0zhv6kb.fsf@linkov.net> <87wo3hflqe.fsf@iris.silentflame.com> <87mu4cs0ly.fsf@linkov.net> <87pn96ed2g.fsf@iris.silentflame.com> <87wo3d35a4.fsf@mail.linkov.net> Date: Sat, 11 Jul 2020 10:09:04 -0700 Message-ID: <87lfjqt1vz.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello Juri, On Thu 09 Jul 2020 at 03:10AM +03, Juri Linkov wrote: > While it's still unclear whether the global keymap =E2=80=98C-x 4=E2=80= =99 will be replaced > by a command, if you want, feel free to try implementing the same to a mo= re > localized keymap =E2=80=98C-x 4 p=E2=80=99 based on patches in bug#41890 = and on the ELPA > package =E2=80=98other-frame-window=E2=80=99. Have taken a look at this and I think it's a good idea. I've posted to #41890 to ask about the status of that patch since my work will interact with it. --=20 Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Jul 2020 16:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , "Philip K." , "Basil L. Contovounesios" Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159508839616500 (code B ref 42210); Sat, 18 Jul 2020 16:07:02 +0000 Received: (at 42210) by debbugs.gnu.org; 18 Jul 2020 16:06:36 +0000 Received: from localhost ([127.0.0.1]:59232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwpMB-0004Hz-KX for submit@debbugs.gnu.org; Sat, 18 Jul 2020 12:06:36 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:57129) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jwpM8-0004He-O2; Sat, 18 Jul 2020 12:06:34 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 76F7F5809BE; Sat, 18 Jul 2020 12:06:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 18 Jul 2020 12:06:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=7PLsnE35wnNAk0su08Gl2/3ERF DxqZxfH3bu7zZMYXM=; b=ozkqTbmyYDhkuwT2kVMNha8q6V6PSX1+9yN3VwCgiW +n7kY4ArUdH5d9+1TU7FS8q7gnhAvsVYpLT+rFnsP+o55QqRuDvdZa5uiEJeqbpe fknKt6RxzYApahQ1KUY/hcfRY+aTXWvrKFOFIhUfspP2+195toOWHK1qjCX+AH7X p5A/XdIMK4FpN7IwJAC9wB2ASsCSS+Zrz6HY3xnFoglVlwbNZdD20cRuemYW/hC+ PTsytHmaW5m0N4NXXBPL1b1W+/pMNFlrqo0TpNXNzUMziK7/aUW8SXYRCQw2XC8u yWpsPcQiL60/MkbcjPw3YT8PvxZ7YCiRWwrUSP5FWr3A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=7PLsnE 35wnNAk0su08Gl2/3ERFDxqZxfH3bu7zZMYXM=; b=C6JcWZ0mq8tIUHPbPG/k6Y jXYwQVB0w/vYk58bW6gZhJ80JhBpaSP+osUAD7asnBqBwn8J02wLOqRbqQldLR30 cN2azeM5KLtkY2E2FuYHPBa9uouY9bjF7rSvlGh4ElBrvqhw/fyfBgbJHkNPgGkT WAsp0C79tmwA59DeFb9I0TIpxj8zOCEmxbxfhLZNqbPxcRpOxFHIlMmcuqOJIYvr MkOHygsWrOZuClUA9eDoeC45ZFJGRrAAecONzb4oNjwdZcIU2U68bN1ZjvMVzoYJ azIIKSrSJZt/WK8Pl974/O737FlaSlLbt/gFX6TP4V3gS3/9gStjzK+gXo2+r43Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrfeelgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fhohhrsghiugguvghnufhorhhtjfgurhculdehtddtmdenucfjughrpefhvffujghffffk gggtsehmtderredttddtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhh hithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepieff hfffudfhjefgfeeuleeutdevtdektdehiefgieetleevveekgeduhedtudefnecuhfhorh gsihguuggvnhfuohhrthfjughrpeffhffkuffvgggjtghfsehmtderredttddtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtth honhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> Date: Sat, 18 Jul 2020 09:06:25 -0700 Message-ID: <87y2ngg64e.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) --=-=-= Content-Type: text/plain Hello Dmitry and others, On Sun 12 Jul 2020 at 11:12PM +03, Dmitry Gutov wrote: > There's no decision indeed. I'd like to know what people think, and if > there's no strong opinion, how the proposal would look in practice. > > So unless you're strapped for time, a prototype patch would help. Okay, here's a prototype. I had to rebase Philip's patch so I thought I might as well attach my version of that too. I have been wanting the new C-x 4 p bindings all week as C-x p f with fido-mode has replaced a lot of my use of C-x C-f, so I hope I can replace my use of C-x 4 f with C-x 4 p f soon :) -- Sean Whitton --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Use-same-keys-in-project-switch-project-as-in-projec.patch >From c9f20a5a547631ab12cd3cf8da2ca51b71cfb28e Mon Sep 17 00:00:00 2001 From: Philip K Date: Thu, 18 Jun 2020 16:06:19 +0200 Subject: [PATCH 1/2] Use same keys in project-switch-project as in project-prefix-map * project.el (project-switch-commands): Convert to user option and change structure. (project-switch-use-entire-map): Add new option. (project--keymap-prompt): Adapt to change in project-switch-commands (project-switch-project): Use project-prefix-map instead of project-switch-commands to query valid commands. --- lisp/progmodes/project.el | 63 +++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 67ce3dc7d9..4f0233c8b7 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -974,27 +974,46 @@ project-known-project-roots ;;; Project switching ;;;###autoload -(defvar project-switch-commands - '((?f "Find file" project-find-file) - (?g "Find regexp" project-find-regexp) - (?d "Dired" project-dired) - (?v "VC-Dir" project-vc-dir) - (?e "Eshell" project-eshell)) - "Alist mapping keys to project switching menu entries. +(defcustom project-switch-commands + '((project-find-file . "Find file") + (project-find-regexp . "Find regexp") + (project-dired . "Dired") + (project-vc-dir . "VC-Dir") + (project-shell . "Shell") + (project-eshell . "Eshell")) + "Alist mapping commands to descriptions. Used by `project-switch-project' to construct a dispatch menu of commands available upon \"switching\" to another project. -Each element is of the form (KEY LABEL COMMAND), where COMMAND is the -command to run when KEY is pressed. LABEL is used to distinguish -the menu entries in the dispatch menu.") +Each element looks like (COMMAND LABEL), where COMMAND should be +bound in `project-prefix-map'. LABEL is used to distinguish the +choice in the dispatch menu." + :type '(alist :key-type function + :value-type string) + :options (mapcan (lambda (ent) + (and (commandp (cdr ent)) + (list (cdr ent)))) + (cdr project-prefix-map)) + :version "28.1") + +(defcustom project-switch-use-entire-map t + "Make `project-switch-project' use entire `project-prefix-map'. +If nil, `project-switch-project' will only recognize commands +listed in `project-switch-commands', and signal an error when +others are invoked. Otherwise, all keys in +`project-switch-commands', are legal even if they aren't listed +in the minibuffer." + :type 'bool + :version "28.1") (defun project--keymap-prompt () "Return a prompt for the project swithing dispatch menu." (mapconcat - (pcase-lambda (`(,key ,label)) - (format "[%s] %s" - (propertize (key-description `(,key)) 'face 'bold) - label)) + (pcase-lambda (`(,cmd . ,label)) + (let ((key (where-is-internal cmd project-prefix-map t))) + (format "[%s] %s" + (propertize (key-description key) 'face 'bold) + label))) project-switch-commands " ")) @@ -1004,14 +1023,14 @@ project-switch-project The available commands are presented as a dispatch menu made from `project-switch-commands'." (interactive) - (let ((dir (project-prompt-project-dir)) - (choice nil)) - (while (not choice) - (setq choice (assq (read-event (project--keymap-prompt)) - project-switch-commands))) - (let ((default-directory dir) - (project-current-inhibit-prompt t)) - (call-interactively (nth 2 choice))))) + (let* ((default-directory (project-prompt-project-dir)) + (project-current-inhibit-prompt t) + (key (read-key-sequence-vector (project--keymap-prompt))) + (cmd (lookup-key project-prefix-map key))) + (if (and cmd (or project-switch-use-entire-map + (assq cmd project-switch-commands))) + (call-interactively cmd) + (user-error "%s is undefined" (key-description key))))) (provide 'project) ;;; project.el ends here -- 2.27.0 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-WIP-Add-project-other-place-commands-and-functions-w.patch >From 37bc752289bd101ceb725446b425944630971f61 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 18 Jul 2020 08:59:19 -0700 Subject: [PATCH 2/2] WIP: Add project-other-place-commands and functions which use it --- lisp/progmodes/project.el | 51 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 4f0233c8b7..f67698ac96 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -985,6 +985,36 @@ project-switch-commands Used by `project-switch-project' to construct a dispatch menu of commands available upon \"switching\" to another project. +Each element looks like (COMMAND LABEL), where COMMAND should be +bound in `project-prefix-map'. LABEL is used to distinguish the +choice in the dispatch menu." + :type '(alist :key-type function + :value-type string) + :options (mapcan (lambda (ent) + (and (commandp (cdr ent)) + (list (cdr ent)))) + (cdr project-prefix-map)) + :version "28.1") + +;; "other-place" because non-prototype patch will also add an entry +;; in ctl-x-5-map and under C-x t p +(defcustom project-other-place-commands + '((project-find-file . "Find file") + (project-switch-to-buffer . "Switch to buffer") + (project-dired . "Dired") + ;; Eshell uses the current window by default, but Shell defaults + ;; to using the other window. If a user has added an entry to + ;; `display-buffer-alist' for Shell, they probably want to add an + ;; entry here, too + (project-eshell . "Eshell") + (project-switch-project . "Switch project")) + "Alist mapping commands to descriptions. +Used by `project-other-window-command' to construct a dispatch menu of +commands available to be displayed in another window. + +Commands in this list should be ones which normally display their +buffer in the current window. + Each element looks like (COMMAND LABEL), where COMMAND should be bound in `project-prefix-map'. LABEL is used to distinguish the choice in the dispatch menu." @@ -1006,7 +1036,7 @@ project-switch-use-entire-map :type 'bool :version "28.1") -(defun project--keymap-prompt () +(defun project--keymap-prompt (cmds) "Return a prompt for the project swithing dispatch menu." (mapconcat (pcase-lambda (`(,cmd . ,label)) @@ -1014,7 +1044,7 @@ project--keymap-prompt (format "[%s] %s" (propertize (key-description key) 'face 'bold) label))) - project-switch-commands + cmds " ")) ;;;###autoload @@ -1025,12 +1055,27 @@ project-switch-project (interactive) (let* ((default-directory (project-prompt-project-dir)) (project-current-inhibit-prompt t) - (key (read-key-sequence-vector (project--keymap-prompt))) + (key (read-key-sequence-vector + (project--keymap-prompt project-switch-commands))) (cmd (lookup-key project-prefix-map key))) (if (and cmd (or project-switch-use-entire-map (assq cmd project-switch-commands))) (call-interactively cmd) (user-error "%s is undefined" (key-description key))))) +(defun project-other-window-command () + (interactive) + (let* ((key (read-key-sequence-vector + (project--keymap-prompt project-other-place-commands))) + (cmd (lookup-key project-prefix-map key))) + (if (and cmd (assq cmd project-other-place-commands)) + (let ((display-buffer-overriding-action + '((display-buffer-pop-up-window) + (inhibit-same-window . t)))) + (call-interactively cmd)) + (user-error "%s is undefined" (key-description key))))) + +;;;###autoload (define-key ctl-x-4-map "p" 'project-other-window-command) + (provide 'project) ;;; project.el ends here -- 2.27.0 --=-=-=-- From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Jul 2020 23:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , "Philip K." , "Basil L. Contovounesios" Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159520242219602 (code B ref 42210); Sun, 19 Jul 2020 23:48:02 +0000 Received: (at 42210) by debbugs.gnu.org; 19 Jul 2020 23:47:02 +0000 Received: from localhost ([127.0.0.1]:33260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxJ1K-000564-Gf for submit@debbugs.gnu.org; Sun, 19 Jul 2020 19:47:02 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:46721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxJ1I-00055V-5L; Sun, 19 Jul 2020 19:47:01 -0400 Received: by mail-ed1-f46.google.com with SMTP id dm19so11498722edb.13; Sun, 19 Jul 2020 16:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Z/39zvZQs9Xkx174wkHbuc/q3LQtZFMhEAKAC0sV8j4=; b=ta5k3Vf35d9xOGUeTGphyHo9a96+3ljXH5vQZ9aNfi7DJ40fRjVzzrcqYKuXdxIFeV F56h09Tv7esxCq8dfalBL9YO/2yI0KU3h1KnS189+1caR1I/lSuaVgMYYV8Gxx0JNf1x mpTo+xkxL/6RlW1mQaydIJd/S32vibZFJ9bDT9waPkvuPN3EslDC8f8Jy0cpKzL/HsRC LU+xc45hjH05NHKVd/yQdzaWqownteaty2UO3azWjVh3flhFWPJgq7WyiuJtttHcvd0G Hli6zexb37WSoBk5Cv5m4uE6C8cilY2Ekguw3jKat2AfINCvfW06My/OpskvVm+0vP+F q76A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Z/39zvZQs9Xkx174wkHbuc/q3LQtZFMhEAKAC0sV8j4=; b=ZX3i6jXlhuOJQqTnrfCWvBjwQw6GoySrBLKwWwrYRH/k/inxepmRotFonmmpaWkPcW 7sr5R68ck/FD7pBfQE9pmwkKUY7T1flUQgttNYMK+NKr+h7AXK1pUZ1y84WPqACHIMaS 0Vo7O07LmSj1ikCgSdVPeoP3CTQfQF9lEQTWoM2JBtabpw1wq7aaSnMoWUOT0OMr7WV+ 5xVqhPNLW0WHoCS5sKasEkYKlOb868g2ehKoFEMs8s9VgepeJHApnlJeOhABsGp9G88n f52QgkiWv/viO2PGTr+ZDHDhiPy14fbIEzAwudPZR1MPm+e38aDdzEEkXGUeJyhaShBF pagQ== X-Gm-Message-State: AOAM530AmyVrqE+ZpZcOH4V9V8rwb9lNwIBaD9qbWLXe/JPqSqpo9DBF a7VPeC3m9N3ZUBhJJIPUHxs= X-Google-Smtp-Source: ABdhPJzQ3hSyr5hxxMBRRBEG1o6GY3uGJycPojo1+Vt8sb9jM5TDwmA61tn2FLflNkUMFHLr4ZXH+w== X-Received: by 2002:a50:ee01:: with SMTP id g1mr18534412eds.264.1595202414275; Sun, 19 Jul 2020 16:46:54 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id cq7sm14164771edb.66.2020.07.19.16.46.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Jul 2020 16:46:53 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> From: Dmitry Gutov Message-ID: <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> Date: Mon, 20 Jul 2020 02:46:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87y2ngg64e.fsf@iris.silentflame.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 18.07.2020 19:06, Sean Whitton wrote: > Okay, here's a prototype. I had to rebase Philip's patch so I thought I > might as well attach my version of that too. The code LGTM, but I still wonder whether we do need the prompt in this case. The downsides are that we'll need to keep the list up-to-date, and at some point (maybe) it will grow too big to fit in the prompt. Will we need a variable project-other-place-use-entire-map too? Juri, did you have this particular approach in mind, or something different? > I have been wanting the new C-x 4 p bindings all week as C-x p f with > fido-mode has replaced a lot of my use of C-x C-f, so I hope I can > replace my use of C-x 4 f with C-x 4 p f soon:) I'm happy to hear that. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 00:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Sean Whitton Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159520556024586 (code B ref 42210); Mon, 20 Jul 2020 00:40:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 00:39:20 +0000 Received: from localhost ([127.0.0.1]:33307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxJpw-0006OO-3t for submit@debbugs.gnu.org; Sun, 19 Jul 2020 20:39:20 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:60207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxJpu-0006O5-7X; Sun, 19 Jul 2020 20:39:18 -0400 X-Originating-IP: 91.129.108.250 Received: from mail.gandi.net (m91-129-108-250.cust.tele2.ee [91.129.108.250]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 0E643C0002; Mon, 20 Jul 2020 00:39:08 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> Date: Mon, 20 Jul 2020 03:30:54 +0300 In-Reply-To: <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> (Dmitry Gutov's message of "Mon, 20 Jul 2020 02:46:52 +0300") Message-ID: <87wo2zjadd.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >> Okay, here's a prototype. I had to rebase Philip's patch so I thought I >> might as well attach my version of that too. > > The code LGTM, but I still wonder whether we do need the prompt in this > case. The downsides are that we'll need to keep the list up-to-date, and > at some point (maybe) it will grow too big to fit in the prompt. Will we > need a variable project-other-place-use-entire-map too? > > Juri, did you have this particular approach in mind, or something different? Indeed, this approach. I think it's a step forward. Actually two steps forward. Both patches improve this part of project functionality greatly. Regarding project-other-place-use-entire-map, I don't know, first need to try using new commands for some time to see what's missing. Currently to open a new project in a new tab I have to type: ‘C-x t t C-x p p’ then a project dir and some key e.g. ‘v’. When Sean will turn the prototype into the final patch, then the key sequence will be much shorter: ‘C-x t p v’. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 01:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Sean Whitton Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159520708726965 (code B ref 42210); Mon, 20 Jul 2020 01:05:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 01:04:47 +0000 Received: from localhost ([127.0.0.1]:33322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxKEZ-00070q-Da for submit@debbugs.gnu.org; Sun, 19 Jul 2020 21:04:47 -0400 Received: from mail-ej1-f47.google.com ([209.85.218.47]:33043) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxKEW-00070Z-LU; Sun, 19 Jul 2020 21:04:46 -0400 Received: by mail-ej1-f47.google.com with SMTP id n26so16402593ejx.0; Sun, 19 Jul 2020 18:04:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ClVkgfYXrBqBGpQ0nA32EFk5WGXkPGIxD1uLI22shfc=; b=Qchfo6gu158nWVjsjWNrpzroLAsHbeBtrukQNqqVNJiu0rh7giWMMhE4iNYjM5G7fg 5ZZtrh6Idirp8gv6VlHv1XazR4Tx4uaXqW13A5GpQFW3JrVplMX8qsRKASVqEp/yaYz+ 6StYkL50tsM6OkyuNsvoezzU3rqxKcGRefvX3nuPyboTJddgp6Zy6Cr8XSDyC/hp2Dhq cCNII3iylt1Z2Q+gwQX0ZMkP9CIvNITI/tk9DcaL2StBi69M9+mTsMHDWXdzztTfcc/R i+QMfyjjjVwYeU/7/Q3LW5LpS+Juks2AT4cdTESwMtvvKyFEEPNIE334pbD6emTyk9br 4d3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ClVkgfYXrBqBGpQ0nA32EFk5WGXkPGIxD1uLI22shfc=; b=NjEWypQHzTfRBdy8PgRR/0n0MICcu1WT+WLAFBqWdAMUYxw8F8VddzFrda2nfm1WR7 czcLT2JtlGt85Hm0lZrJcnx4IeQvJ0hY8WKBZbW4eZMPPpAUrBXFFGhNNjH6lwyPwoZp yJiKD2hD84+8HTrpdJO0ygfZqvCQX8eKqvsEcSt1ndiTe+H7CdycoQk3DHyIR98A8GyV fnRh2dZh+GOczqDcxZdcyFlKFAq+S4UFZ85g4Vb8hJe8jrCGNWMgcLATJcODs8l/U4WT 7sP4YmboWViCLSjRKr0c/mXQb+3XWpKOOguST8brLAln6iKYcYH7F7+sfXed/uOFVXJB Vh+w== X-Gm-Message-State: AOAM533YjZsdWIBH5oaUnpcds1STJ/xqrU3XfLSLWYfhInqh7e+RsVGF a/OV9SdmaUfnMegxHezENfc= X-Google-Smtp-Source: ABdhPJw6WvtivUPRfzmrTi/tZDfNnt4T03bHlZkVIgk4eRowFURki+cqqzndWs6yGpwTZVcEc0NPIA== X-Received: by 2002:a17:906:4e87:: with SMTP id v7mr18368052eju.242.1595207078852; Sun, 19 Jul 2020 18:04:38 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id cb7sm13791006ejb.12.2020.07.19.18.04.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Jul 2020 18:04:38 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <87wo2zjadd.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Mon, 20 Jul 2020 04:04:36 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87wo2zjadd.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 20.07.2020 03:30, Juri Linkov wrote: > Indeed, this approach. I think it's a step forward. Actually two steps forward. > Both patches improve this part of project functionality greatly. > > Regarding project-other-place-use-entire-map, I don't know, first need > to try using new commands for some time to see what's missing. OK then, here's a question: Should project-other-place-commands include an entry for project-or-external-find-file? > Currently to open a new project in a new tab I have to type: > ‘C-x t t C-x p p’ then a project dir and some key e.g. ‘v’. > When Sean will turn the prototype into the final patch, > then the key sequence will be much shorter: > ‘C-x t p v’. Sounds neat. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 10:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 41890@debbugs.gnu.org, juri@linkov.net, "Philip K." , 42210@debbugs.gnu.org, Dmitry Gutov Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159524049716620 (code B ref 42210); Mon, 20 Jul 2020 10:22:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 10:21:37 +0000 Received: from localhost ([127.0.0.1]:33933 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxSvR-0004K0-C3 for submit@debbugs.gnu.org; Mon, 20 Jul 2020 06:21:37 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:37468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxSvL-0004JX-Ud for 42210@debbugs.gnu.org; Mon, 20 Jul 2020 06:21:34 -0400 Received: by mail-wr1-f44.google.com with SMTP id a6so17274723wrm.4 for <42210@debbugs.gnu.org>; Mon, 20 Jul 2020 03:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7vquCWRl+rwWff6GIy8ltCV6GrS/j1qrcu0mk0QXkIs=; b=UTuA8ualP8njPvzS/XkbX5dRs3IedRxkskjlM0xhu9iuGyu4373nlUP+Nl1wL+okul xxi0QNaR0HoSyJBmSd1H5Ktr0uaBZAH/9Tvw4CsiqZ/DqyTb3shpReNxX4KPuvTKNtEr BlNp2CehXj9oX0JVT+DpsvvFhOO/ev6aUtuk/h03iZJTINDRx5ZtDe7JJH1iBrjMJ/Vc Zmcs3tpq8QvkHFQqxSBxukox75uIa8j3lllhwl/6HmPVwBye8IUTOWz+hJg0mS+0M0jI rH6I64PTGKsS+/Pk3VzKiwF8OOHqIxmm+mhYaUEch4q2FPruETRT+XcwubiLJq/k8Iho 4qbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7vquCWRl+rwWff6GIy8ltCV6GrS/j1qrcu0mk0QXkIs=; b=kdM39kSZVzCDFBl4mshxQP7FJmbBOHSDVVY1CoetG54ivoZasma9nM/nQRWBRAZKGJ 8bIhcudCqP8oVjhQ18yu7w0WcYChHSc+vI6IUURqeDoHmlpbKE++hgo06ibl0VA1arG8 V9Zp7F3h8WKRrcBsU8KI9jNSIthkcOMEWCfyC/iTT8AwQr5tSmWviREtoqEO7mifb/96 MgoiYyIv32wEp1kcjN4N39D0b+Wr/xAcQo4j8Jl34II5gjjDzulQYruv983JJfclhsfw gXKKfq8UhVlneK08KbDbd2bQmXB8JLgDATZ62bYzMqCPvaEB6CTDrCF/ATsT3EOa61Yl sTFA== X-Gm-Message-State: AOAM531DsKVIfThfuem9PDn7XSQ6jnhOOCxngAUIeHv4NIPkDSBGEcNk Nw955+8R9YD1P8RPgNyd9M/Euw== X-Google-Smtp-Source: ABdhPJxTHtRMafeDX3+aDvXuHa/v2aLtD3hkoL13OKEP4HSI8SLtL3bK4eGbiWAqqhtjhFUC/xUCNw== X-Received: by 2002:adf:f74f:: with SMTP id z15mr20302914wrp.233.1595240485978; Mon, 20 Jul 2020 03:21:25 -0700 (PDT) Received: from localhost ([80.233.38.38]) by smtp.gmail.com with ESMTPSA id c7sm33132608wrq.58.2020.07.20.03.21.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2020 03:21:24 -0700 (PDT) From: "Basil L. Contovounesios" References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> Date: Mon, 20 Jul 2020 13:21:22 +0300 In-Reply-To: <87y2ngg64e.fsf@iris.silentflame.com> (Sean Whitton's message of "Sat, 18 Jul 2020 09:06:25 -0700") Message-ID: <878sfe5vx9.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) Sean Whitton writes: > +(defcustom project-switch-use-entire-map t > + "Make `project-switch-project' use entire `project-prefix-map'. > +If nil, `project-switch-project' will only recognize commands > +listed in `project-switch-commands', and signal an error when > +others are invoked. Otherwise, all keys in > +`project-switch-commands', are legal even if they aren't listed ^^^ superfluous comma > +in the minibuffer." > + :type 'bool ^^^ ean > + :version "28.1") [...] > +;; "other-place" because non-prototype patch will also add an entry > +;; in ctl-x-5-map and under C-x t p > +(defcustom project-other-place-commands > + '((project-find-file . "Find file") > + (project-switch-to-buffer . "Switch to buffer") > + (project-dired . "Dired") > + ;; Eshell uses the current window by default, but Shell defaults > + ;; to using the other window. If a user has added an entry to > + ;; `display-buffer-alist' for Shell, they probably want to add an > + ;; entry here, too ^^ missing full stop > + (project-eshell . "Eshell") > + (project-switch-project . "Switch project")) > + "Alist mapping commands to descriptions. > +Used by `project-other-window-command' to construct a dispatch menu of > +commands available to be displayed in another window. > + > +Commands in this list should be ones which normally display their > +buffer in the current window. > + > Each element looks like (COMMAND LABEL), where COMMAND should be > bound in `project-prefix-map'. LABEL is used to distinguish the > choice in the dispatch menu." Thanks, -- Basil From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 14:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Basil L. Contovounesios" Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net, philip@warpmail.net, dgutov@yandex.ru, spwhitton@spwhitton.name Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.15952563383695 (code B ref 42210); Mon, 20 Jul 2020 14:46:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 14:45:38 +0000 Received: from localhost ([127.0.0.1]:35816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxX2q-0000xR-Mg for submit@debbugs.gnu.org; Mon, 20 Jul 2020 10:45:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxX2p-0000x6-2C; Mon, 20 Jul 2020 10:45:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35822) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jxX2h-0006xn-WE; Mon, 20 Jul 2020 10:45:24 -0400 Received: from [176.228.60.248] (port=1650 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jxX2h-0003D5-1Z; Mon, 20 Jul 2020 10:45:23 -0400 Date: Mon, 20 Jul 2020 17:45:17 +0300 Message-Id: <83mu3ugs8y.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <878sfe5vx9.fsf@tcd.ie> (contovob@tcd.ie) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <878sfe5vx9.fsf@tcd.ie> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) > From: "Basil L. Contovounesios" > Date: Mon, 20 Jul 2020 13:21:22 +0300 > Cc: "Philip K." , 41890@debbugs.gnu.org, > 42210@debbugs.gnu.org, Dmitry Gutov , juri@linkov.net > > Sean Whitton writes: > > > +(defcustom project-switch-use-entire-map t > > + "Make `project-switch-project' use entire `project-prefix-map'. > > +If nil, `project-switch-project' will only recognize commands > > +listed in `project-switch-commands', and signal an error when > > +others are invoked. Otherwise, all keys in > > +`project-switch-commands', are legal even if they aren't listed > ^^^ > superfluous comma Also, GNU standards frown on using "legal" when you actually mean "valid". "Legal" and "illegal" should be reserved to describing issues pertaining to laws and breaking the laws. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 16:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , "Philip K." , "Basil L. Contovounesios" Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159526375215611 (code B ref 42210); Mon, 20 Jul 2020 16:50:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 16:49:12 +0000 Received: from localhost ([127.0.0.1]:35947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxYyW-00043e-Dd for submit@debbugs.gnu.org; Mon, 20 Jul 2020 12:49:12 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:46687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxYyT-00043J-IB; Mon, 20 Jul 2020 12:49:11 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 51FDD5C01E6; Mon, 20 Jul 2020 12:49:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 20 Jul 2020 12:49:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=9Erm/FBl892fGlnnW3a9S+dgUt caHcKtzCXDfoGXOa4=; b=d6kAPWu5n9PZxqVfHoQgrJ4W5GA+Kx0BhBqR1DRWlI egDvy3zqQ6BJrmCTpkd/fXe9nTNW427xbGasqxii3Pg75BfalDgHONQ2oyX2d6t1 ocfaAz901OmoECM6h6j3liOMKtiMkSYjUX3kPNQrU/QvzJgodrqhwK3uErLGDdUT QrEN5oK9RBP9i/oGfvj8UCJF6bFjFOZqMG8tce+PDqLU4rbKFD0BLGSQXVobCk3O q/rEB77btLRlwy0/9u/I5x91g8um+vyPP9A3vh4uX9HI6G4Oe45mf+12rznhQIXr mLzU5gN3GvqewvB4N/N2cwVncZQ93mAAX5UmazmzoBgw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=9Erm/F Bl892fGlnnW3a9S+dgUtcaHcKtzCXDfoGXOa4=; b=qLgZau78h9GivcViK6Zyyk f6ibcU/ejwkxoTG///dJV0YOrFwlxGH+IrBeyaox33ofNnbw9OqYU2H9+0O/uB9/ E4IRWXNb/l1IqFSKpOgHVJeBWF0s7oaUTRBGhYG8KVTPe8kIrVJj2XAvLa9YeEjY m4OADspKFKRUmCLSgziZRHwhe3dzdR0zNQE/y6/DcOrOpgOprGuNMxSPIPte4wcF ae0aUmWD9jA/0nWNMotBy4gLFY96lk5nRV4d7X3+9RC/OR/C0KWluxKzeoZc+7b1 99t2uuIioHQqqRLABFI0XDg9ZNlHaiJjWpCQou3CEk4erS0OUCmQDNAJjClCpnog == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeeggdekudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgedtvdehgeffhfffvdeffefhgfejffelhfetveffffektefgtdej tdeivddtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> Date: Mon, 20 Jul 2020 09:49:02 -0700 Message-ID: <871rl6gmip.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello, On Mon 20 Jul 2020 at 02:46AM +03, Dmitry Gutov wrote: > On 18.07.2020 19:06, Sean Whitton wrote: >> Okay, here's a prototype. I had to rebase Philip's patch so I thought I >> might as well attach my version of that too. > > The code LGTM, but I still wonder whether we do need the prompt in this > case. The downsides are that we'll need to keep the list up-to-date, and > at some point (maybe) it will grow too big to fit in the prompt. Will we > need a variable project-other-place-use-entire-map too? If all one has in mind is C-x 4, then it doesn't seem like this is a big danger -- many commands display in the other window by default, such as project-find-regexp, and it reasonable to guess that a good proportion of new commands which get added will also be like this. However, if you have C-x 5 and C-x t in mind as well, then it starts to seem like we'll want project-other-place-use-entire-map. How about having a project-other-window-commands defcustom for C-x 4 p, and using the entirety of project-prefix-map for C-x 5 p and C-x t t? C-x 4 p can prompt as per my patch, and C-x 5 p and C-x t t could just put a static message in the minibuffer like other-frame-prefix and other-tab-prefix do at present. >> I have been wanting the new C-x 4 p bindings all week as C-x p f with >> fido-mode has replaced a lot of my use of C-x C-f, so I hope I can >> replace my use of C-x 4 f with C-x 4 p f soon:) > > I'm happy to hear that. I intended to say a bit more: C-x p f has replaced a lot of my use of C-x b too. It is very nice not to have to guess whether something is already visited and just complete across all the project's files. I use C-x 4 b a lot so I'm looking forward to C-x 4 p f. -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 20:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Dmitry Gutov Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159527857515418 (code B ref 42210); Mon, 20 Jul 2020 20:57:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 20:56:15 +0000 Received: from localhost ([127.0.0.1]:36383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxcpa-00040W-M9 for submit@debbugs.gnu.org; Mon, 20 Jul 2020 16:56:15 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:42755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxcpX-0003zt-Ky; Mon, 20 Jul 2020 16:56:12 -0400 X-Originating-IP: 91.129.108.250 Received: from mail.gandi.net (m91-129-108-250.cust.tele2.ee [91.129.108.250]) (Authenticated sender: juri@linkov.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 4FBAC60005; Mon, 20 Jul 2020 20:56:01 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> Date: Mon, 20 Jul 2020 23:41:54 +0300 In-Reply-To: <871rl6gmip.fsf@iris.silentflame.com> (Sean Whitton's message of "Mon, 20 Jul 2020 09:49:02 -0700") Message-ID: <87365mdj2d.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) > How about having a project-other-window-commands defcustom for C-x 4 p, > and using the entirety of project-prefix-map for C-x 5 p and C-x t t? > C-x 4 p can prompt as per my patch, and C-x 5 p and C-x t t could just > put a static message in the minibuffer like other-frame-prefix and > other-tab-prefix do at present. Currently there are separate key sequences ‘C-x p’ and ‘C-x p p’ followed by almost the same list of possibles suffixes, where e.g. ‘C-x p f’ visits a file of the current project, whereas ‘C-x p p f’ prompts for another project and visits its file. Should the same distinction be preserved in other-place commands? Then ‘C-x 4 p f’ will visit a file of the current project in another window, whereas ‘C-x 4 p p f’ will prompt for another project and visit its file in another window. The same distinction could apply also to ‘C-x 5 p f’ / ‘C-x 5 p p f’ and ‘C-x t p f’ / ‘C-x t p p f’. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 20:57:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Sean Whitton Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159527858115454 (code B ref 42210); Mon, 20 Jul 2020 20:57:03 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 20:56:21 +0000 Received: from localhost ([127.0.0.1]:36388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxcph-00041C-8k for submit@debbugs.gnu.org; Mon, 20 Jul 2020 16:56:21 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:48203) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxcpb-00040B-HO; Mon, 20 Jul 2020 16:56:16 -0400 Received: from mail.gandi.net (m91-129-108-250.cust.tele2.ee [91.129.108.250]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id C5982240004; Mon, 20 Jul 2020 20:56:06 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <87wo2zjadd.fsf@mail.linkov.net> Date: Mon, 20 Jul 2020 23:47:22 +0300 In-Reply-To: (Dmitry Gutov's message of "Mon, 20 Jul 2020 04:04:36 +0300") Message-ID: <87blk9dit9.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) > OK then, here's a question: > > Should project-other-place-commands include an entry for > project-or-external-find-file? I don't see why someone might want to use such commands as project-or-external-find-file or project-or-external-find-regexp. These commands operate on some obscure directories (copied from the output of '(project-external-roots (project-current t))'): "/usr/local/share/emacs/site-lisp/" "/usr/share/emacs/site-lisp/autoconf/" "/usr/share/emacs/site-lisp/gtk-doc-tools/" ... I don't know why the user might want to find files or search in such non-project directories as /usr/share/emacs/site-lisp/gtk-doc-tools/. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 21:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Sean Whitton Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159527886416121 (code B ref 42210); Mon, 20 Jul 2020 21:02:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 21:01:04 +0000 Received: from localhost ([127.0.0.1]:36445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxcuG-0004Bw-GC for submit@debbugs.gnu.org; Mon, 20 Jul 2020 17:01:04 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]:44685) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxcuE-0004BF-3A; Mon, 20 Jul 2020 17:01:02 -0400 Received: by mail-ej1-f53.google.com with SMTP id ga4so19470395ejb.11; Mon, 20 Jul 2020 14:01:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=qbq9UzwspDD8P42I1ZVxpJtvB6Z7Q+ikB03SWgf0wTY=; b=BhpbHC+DWNGZyN6AWckQj2IK3MmHpAQRcqhA2d0EGa66tQdoJKBtMInrCPvRizJJjV P1PM2IIVx32Zd6tVgQice/WEOZzd4KCLubVxc71ppEwYxVyN3KkAg7BxnEjgbggiUBxC e7PW3kgbbbOB3KXWxE7jQczAcAl2Bjekw7u1/yydiss0FmKEYMjpXbsNL1ZuOmkzX163 PzcmMJAv5P7qTv1Qk4IuE1ZLQ2SJPjR0iOL6YZY+2K3gBpe3NCN0NkmELyXc7Yr8n8Bx 4CYVKgKr3/uv/1mcgYwO3A0GJyaQJvDT8Tf6qPE7PSMFcD82zXYCTOgaWejdTsl3VhvD yK/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qbq9UzwspDD8P42I1ZVxpJtvB6Z7Q+ikB03SWgf0wTY=; b=cfi/Pmm8rL3eolQUoQmlaj0GJL6EGYTsFWFj/XEG7WqVla4gMPDkqvgdFaACXSHjyp 1KgE76Hb0r/Y6QvRtD8uF06n47HhOzCtCtvJT3ECIoCdBqKv+inH7p9cCjPSJdm3Y3Lh FnFti/+V4jarskP6Bhto4NMKo/25WCclOdX574dKuXKgn1F0edkKMcwrR7ZUf85rPaHe nWNV0UJwYvi/G9WCSR1jEQtPoqLPpObKITRF1pLSWw8pwKLAUYsacgGDuirst/H5mmQe D/uwOBEVYilxGdPPzkRfucLocxrGQxD3xdjTUAl2nPHdtvWxInuxjr2bFwhTEbPSOnSt efeQ== X-Gm-Message-State: AOAM532rVnShbK65s9CzL4E+6DPsYV1irrlzjDQbBcMm2vOLAubjZl6z uQEvgw2Wz9qPqVMEOPb3fpU= X-Google-Smtp-Source: ABdhPJz+R10G1nAl+DuXk1CHb3Evtv3v/bIWGjN5Wwz3x9anr+Kq+8roSKlNFZOFqkldYBZRbtiwdQ== X-Received: by 2002:a17:906:35cd:: with SMTP id p13mr22203188ejb.172.1595278856226; Mon, 20 Jul 2020 14:00:56 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id t20sm15270408ejd.124.2020.07.20.14.00.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2020 14:00:55 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <87wo2zjadd.fsf@mail.linkov.net> <87blk9dit9.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Tue, 21 Jul 2020 00:00:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87blk9dit9.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 20.07.2020 23:47, Juri Linkov wrote: > I don't know why the user might want to find files or search in such > non-project directories as/usr/share/emacs/site-lisp/gtk-doc-tools/ Apparently these directories are in your load-path. I think it makes sense to search for files across your load path sometimes. Or if you have multiple tag files loaded, it would search across directories containing those files. And that's just with the built-in backend. Other projects can have other examples of what constitutes external roots. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 21:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , Sean Whitton Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159527898716329 (code B ref 42210); Mon, 20 Jul 2020 21:04:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 21:03:07 +0000 Received: from localhost ([127.0.0.1]:36452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxcwF-0004FH-1z for submit@debbugs.gnu.org; Mon, 20 Jul 2020 17:03:07 -0400 Received: from mail-ej1-f53.google.com ([209.85.218.53]:35801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxcwD-0004Ek-EJ; Mon, 20 Jul 2020 17:03:05 -0400 Received: by mail-ej1-f53.google.com with SMTP id rk21so19515173ejb.2; Mon, 20 Jul 2020 14:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ItkclD6NDoRX7HmYNL1s3+9anLTqMgM0/gXMdvLLlvw=; b=k5oeE7jUp8EXNu/jgvK3NIM9oVYu5Tk/KWgrG+FTmFtODh3Tq6C0v0e6WGuR38ZHUC b2yKx2YIkZqMscrpiM6KqYxbEbgVN0G1XYmNKEs6OXMNSyqpMzXURlHy7ouW+2ncBky+ V8G42uTK4N8eyyirm5sIZ+qHrv9Q4KhaC/ClIqpB+JzQG3dRTOA7A+f04Cedzd0ZajX8 BNJfLyCqtPd7rY0vWlOVnpEykkyipXTVyh4FSPiLE1m+eVTLciakUMth0PS/quQLcA4p F8N3lMfuKCCBvnKSUjrnnvOaEY90qrOiICCC+o9cEnxqj+hh5jQi2Sw2zTCEgfVMqd+o 3MiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ItkclD6NDoRX7HmYNL1s3+9anLTqMgM0/gXMdvLLlvw=; b=jN3DPYp/32LQU06YlfN3XoAmFhixkCuERsquGEfKP6tGCylHwY9d7hQwuMjfvxCBy7 jUmCLF53Gl27wE7eDnf5bG0jHVXC+5AeT5PeumQ1I5MnihKyHjoMi5Z0IudZANvsRRfF y1TwyE3ejHAXGUSKjMTS7fafsYLgqIIonQ1e7WhKfEqC8xslUFMFIBBXwx2Y36Mxs64Y FZyDU90g4xuY68cK+xx126RF+hmArVo/AxW5S4NMrB75Cys8NYZR4AjaBFXsx7FMo5ak vfDXGyYlKlcU6kx8JYNlSZom8grTzD0wlLERJY9mQBdf9CYeNUYn8mF4kon5Kqi5fe7Z S78g== X-Gm-Message-State: AOAM531PMeO+uCv4fr2UycFWFlwLtatTox8MHK5cZKcbtGQABl1DcAbS eOg/jJaZDavy9m9vnZ4/AOEFcK/3 X-Google-Smtp-Source: ABdhPJzehray/Uz79mLX3hZynndohz1LAMCMAzKrBZJoMTQD88TQRgkBIJjdXM3wxupcsZqalnIFeQ== X-Received: by 2002:a17:906:6847:: with SMTP id a7mr21911798ejs.306.1595278979561; Mon, 20 Jul 2020 14:02:59 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id 23sm16239254edw.63.2020.07.20.14.02.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2020 14:02:58 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <87365mdj2d.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: <79669bad-5c46-239b-b72d-c37f68acd77b@yandex.ru> Date: Tue, 21 Jul 2020 00:02:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87365mdj2d.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 20.07.2020 23:41, Juri Linkov wrote: > Should the same distinction be preserved in other-place commands? > Then ‘C-x 4 p f’ will visit a file of the current project in another > window, whereas ‘C-x 4 p p f’ will prompt for another project and visit > its file in another window. Sure. Doesn't this work with the latest proposed patch? From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 21:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Dmitry Gutov Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159528029218507 (code B ref 42210); Mon, 20 Jul 2020 21:25:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 21:24:52 +0000 Received: from localhost ([127.0.0.1]:36527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxdHI-0004oK-7F for submit@debbugs.gnu.org; Mon, 20 Jul 2020 17:24:52 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:45105) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxdHF-0004nr-US; Mon, 20 Jul 2020 17:24:50 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9FDA65C0124; Mon, 20 Jul 2020 17:24:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 20 Jul 2020 17:24:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm3; bh= qNROtPs/ols/aZ3vSNQQXivI+GvveI0zcGnzpJsVF+M=; b=MmKM9tow3zQpZeRJ ByQ1plqFcRnwDallIZIubDUQesPsRrYm1Dt9NVbL3f3Hylj0BZQBjjZI4VBR9bkR tL7YOGsVGLSfbp2cvfUfq8/e/AshQrDbAVaJfrUta0w0Xrm+e11Y/6VKLInEfV3V m2D2fh9x55Aazjs7SpdjY8VFt3XpLvM058WP4ME7ZBIZByvAr5+rib17trmooOjn E4X6Cda84devO3odoJXwS2HNMDJsMiXcFRddGPlpq+XXivSVGrQf2sYz3pQVdRBX YFgxTfqWsDz8njDbFHuByvgcbNBRrZt4+eiKUmgBMva4OyIGTwiWLA16Qb7cyLbz KPor5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=qNROtPs/ols/aZ3vSNQQXivI+GvveI0zcGnzpJsVF +M=; b=BiFCaMtsX/9J7T10I6oEStQvcUP52bQXV5HddHbTsoyaD8DGThpIAJl/k SDKJ++UP5qrOOWg2o2tmHKCPmQ+LhT7KVQ85kbDJhbdZW9vzT6oVvXBjFD8zWOPa m190ZTQ+ePIlRE7Mui5sZ0Uac+LjSHzqPAahUZ0Yh6/gkEhAIJxv+cmGzjNw9Yc+ IAv8sM7AqQKsyEUWVYyIi4nA3Yp6V8wfaixo7D9jNzLYp7+cFV7VB8XaP3CkrDy6 xSqzej1JjCPqTCdr0+yj9uRKqpBO8M8DX2OWJMJ4luttEZ+h7xjgMtEEPKU+kIH9 ZvBPRbxKmQQpbdAJF3n0V0cGyH2RQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeeggddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhffkfggtgfgsehtqhertddttdejnecuhfhrohhmpefuvggrnhcu hghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqne cuggftrfgrthhtvghrnhepvdfgkeevtdetvedvhffhgeevleelfeekveeuveehffduvdei udfhgeelvefghfehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <87365mdj2d.fsf@mail.linkov.net> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <87365mdj2d.fsf@mail.linkov.net> Date: Mon, 20 Jul 2020 14:24:42 -0700 Message-ID: <87ft9ldgmd.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello Juri, On Mon 20 Jul 2020 at 11:41PM +03, Juri Linkov wrote: >> How about having a project-other-window-commands defcustom for C-x 4 p, >> and using the entirety of project-prefix-map for C-x 5 p and C-x t t? >> C-x 4 p can prompt as per my patch, and C-x 5 p and C-x t t could just >> put a static message in the minibuffer like other-frame-prefix and >> other-tab-prefix do at present. > > Currently there are separate key sequences =E2=80=98C-x p=E2=80=99 and = =E2=80=98C-x p p=E2=80=99 > followed by almost the same list of possibles suffixes, where e.g. > =E2=80=98C-x p f=E2=80=99 visits a file of the current project, whereas = =E2=80=98C-x p p f=E2=80=99 > prompts for another project and visits its file. > > Should the same distinction be preserved in other-place commands? > Then =E2=80=98C-x 4 p f=E2=80=99 will visit a file of the current project= in another > window, whereas =E2=80=98C-x 4 p p f=E2=80=99 will prompt for another pro= ject and visit > its file in another window. The same distinction could apply also to > =E2=80=98C-x 5 p f=E2=80=99 / =E2=80=98C-x 5 p p f=E2=80=99 and =E2=80=98= C-x t p f=E2=80=99 / =E2=80=98C-x t p p f=E2=80=99. Yes, I think so, but I'm not sure how that directly addresses the suggestion of mine you quote. --=20 Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jul 2020 22:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , "Philip K." , "Basil L. Contovounesios" Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159528241622975 (code B ref 42210); Mon, 20 Jul 2020 22:01:02 +0000 Received: (at 42210) by debbugs.gnu.org; 20 Jul 2020 22:00:16 +0000 Received: from localhost ([127.0.0.1]:36580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxdpY-0005yA-7A for submit@debbugs.gnu.org; Mon, 20 Jul 2020 18:00:16 -0400 Received: from mail-ej1-f44.google.com ([209.85.218.44]:46121) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxdpT-0005ml-Lm; Mon, 20 Jul 2020 18:00:14 -0400 Received: by mail-ej1-f44.google.com with SMTP id l4so3383010ejd.13; Mon, 20 Jul 2020 15:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ajKd2N0/O9efJKjxCWOdNbzCtbWXb2i5VpFoWSanIlk=; b=LwiZuXS1Usi9a8el9iFR2RdheN3u2efqgqCR5KeJZ1yHX9eRG549LbYuqvM5nEIpS4 sqjLHSbPff0dnrjpONxL3cA+j2HwoA/tmpnc2tMIyk1uCxoLupeFheWdyFwX6LOmB51k hI20zXeYwgfIDdVd2dnKTQpS9fd8yJO44eCcnZ1jkmC+Aw+V1NYAeBEHAJbhJDEmtaOC JVpsR2tMveiUBcU1KcVGQXwHx8nJ+dND7itzWswsbQtJUOIW1D6G0OlxAuNLajJr4Sto qlVcT5gBBAuTYqTaHlakH8e9v6sA2ffGouPpl2DCy7CQ728PDI38uRW+UZXoJ2ObdbEJ CwQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ajKd2N0/O9efJKjxCWOdNbzCtbWXb2i5VpFoWSanIlk=; b=ONxqsX9ARWKUFZqGu5rqEMEY/PSgBp785xaDD5Z6Jf3WDcpCCuSvG29WH8HDPZ5RSX KcfltzebSZmaJ8IBgD/1ggK3ZPyu9JLsHFjp/YROAAoESQC4c90X+K/mCPSA6o1Trq7T Ty7g35/u7C8QoQdkJeObnKhJ6mc3SfSigSQGw4UrTXItDNx3KC8nd2eSoJ7GAEo09BPx rXyjWCjbcahQFb1PS6lMWqcvLm93ZpGUm0JQ9bEXBaTIVVoFvo9/cod0LPvcKUZ+CNPH hc4LQ8KO7hvltKzYI4MH52V17zoxapYtI6F4/S/K+GnOBSLmcaHqt/Mz0LZX9rQAPsat uWMg== X-Gm-Message-State: AOAM531XnVRLj3Bxq8caYYyWHiTu+Gdz4cyImOnh3Ra/eDpVwg39Y31b VoqRn6PKqQngTLuJKZXDLUw= X-Google-Smtp-Source: ABdhPJylD4RQwGAqEDzT4BFz1P7LWbh00xeYdHXE/8dNqXUXNHA9DFEmEIwGUTMEMU1Ru0XFtlnHDw== X-Received: by 2002:a17:906:140e:: with SMTP id p14mr22885042ejc.430.1595282405628; Mon, 20 Jul 2020 15:00:05 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id ce15sm15531692ejc.86.2020.07.20.15.00.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2020 15:00:04 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> From: Dmitry Gutov Message-ID: Date: Tue, 21 Jul 2020 01:00:03 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <871rl6gmip.fsf@iris.silentflame.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 20.07.2020 19:49, Sean Whitton wrote: > How about having a project-other-window-commands defcustom for C-x 4 p, > and using the entirety of project-prefix-map for C-x 5 p and C-x t t? > C-x 4 p can prompt as per my patch, and C-x 5 p and C-x t t could just > put a static message in the minibuffer like other-frame-prefix and > other-tab-prefix do at present. Just to clarify: are you proposing this because you really like how the prompt works, yet can't find a good way to incorporate it for the two other prefixes? > I intended to say a bit more: C-x p f has replaced a lot of my use of > C-x b too. It is very nice not to have to guess whether something is > already visited and just complete across all the project's files. I use > C-x 4 b a lot so I'm looking forward to C-x 4 p f. Right! That mirrors my experience: it's often handy to just search across the project files because you're guaranteed to find the needed file, and because there is no ambiguity caused by having only the base name available. One can also "guess" the eventual file name based on the partial matches in its name and in its parent directories' names. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jul 2020 00:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , "Philip K." , "Basil L. Contovounesios" Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159529159712419 (code B ref 42210); Tue, 21 Jul 2020 00:34:02 +0000 Received: (at 42210) by debbugs.gnu.org; 21 Jul 2020 00:33:17 +0000 Received: from localhost ([127.0.0.1]:36839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxgDd-0003E9-Km for submit@debbugs.gnu.org; Mon, 20 Jul 2020 20:33:17 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:47281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxgDY-0003Dg-K5; Mon, 20 Jul 2020 20:33:16 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 985F75C0113; Mon, 20 Jul 2020 20:33:06 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 20 Jul 2020 20:33:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=4H8B4G2BKZN+kJz8te0pBEDSsK Z0/g2Qu3BRJbAWANk=; b=KnPJhbAvBcZ8wS/9NE1vXS0W8II6DLJP1B9Kg2Sf83 JCd0EAmRE/8n3peljw4aNWltvOQ5gGZQl/fcbKUypt61Agjza4/U8hl/lLT1/BfM t8H1wpOAfWfUUaYO7AsJ0J0zPzQAMXsxTUQVP3NaO4cjRctDTdYHs1CiRKuK7kGR cEuaQHZpIbsE7vV04HotZNiFylkLlI/ETy1yqoWkKjo9pK/j+N5+G0vqv/wZw/o6 eXWZTQ+4xNWvDZg1w5GYRCjKTJPFCWSRP2nyJ+Pi7TeZIVD3rvXxElqA/MTYYg+y OkGGOX6vQwCKu/OyLGYBIbMDwTpmTqGUVao/MlK7sPPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=4H8B4G 2BKZN+kJz8te0pBEDSsKZ0/g2Qu3BRJbAWANk=; b=lgCOV8yGOOqRCjDjP5ESV/ UKcFSWe5KrOpzlXt8XIddJDJq75yywv3Ykm9YYAvS0jA8ntL2BBQXGf5oOLiS/pj RfN+musKAHXoIVZh9hSGc7mjMVjS2VHAootOh0JRHBM/1pzjzmChKzjAdDhpcuRd QlRms5/KS3QeK64L9Jc9x/qlFe5qGFPm8oExvNFXtFIGZ5XZYo5pWTHaOvQtfhDv LySY0lmGlZjuzNetMlnhbThnuFlGkJVsOHPPsSkoGUzBJXytOc+ifttwJT9yRfs9 LMZ0zBkkvP5PFMVg7b2xhGWeoCryXXngC4g4GeUItoOei7inDDrOqXS+zA+w3/9Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeehgdeffecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgedtvdehgeffhfffvdeffefhgfejffelhfetveffffektefgtdej tdeivddtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> Date: Mon, 20 Jul 2020 17:33:04 -0700 Message-ID: <874kq1d7wf.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello, On Tue 21 Jul 2020 at 01:00AM +03, Dmitry Gutov wrote: > On 20.07.2020 19:49, Sean Whitton wrote: > >> How about having a project-other-window-commands defcustom for C-x 4 p, >> and using the entirety of project-prefix-map for C-x 5 p and C-x t t? >> C-x 4 p can prompt as per my patch, and C-x 5 p and C-x t t could just >> put a static message in the minibuffer like other-frame-prefix and >> other-tab-prefix do at present. > > Just to clarify: are you proposing this because you really like how the > prompt works, yet can't find a good way to incorporate it for the two > other prefixes? I wouldn't say that I really like the prompt, but it could be useful to someone to see the bindings available to them, when we're sure it's going to fit. I do think we should avoid binding commands under C-x 4 where the versions under C-x p would already display in another window -- I think it is potentially quite confusing to have bindings with identical behaviour under both C-x 4 p and C-x p. But that means we need the defcustom, because a user could use display-buffer-alist to change which commands under C-x p will use another window. -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Jul 2020 23:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Dmitry Gutov Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159537483718794 (code B ref 42210); Tue, 21 Jul 2020 23:41:02 +0000 Received: (at 42210) by debbugs.gnu.org; 21 Jul 2020 23:40:37 +0000 Received: from localhost ([127.0.0.1]:40668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jy1sC-0004t0-Qs for submit@debbugs.gnu.org; Tue, 21 Jul 2020 19:40:37 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:35407) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jy1s9-0004sc-7Y; Tue, 21 Jul 2020 19:40:35 -0400 X-Originating-IP: 91.129.108.250 Received: from mail.gandi.net (m91-129-108-250.cust.tele2.ee [91.129.108.250]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 3ABB0C0002; Tue, 21 Jul 2020 23:40:23 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> Date: Wed, 22 Jul 2020 02:38:52 +0300 In-Reply-To: <874kq1d7wf.fsf@iris.silentflame.com> (Sean Whitton's message of "Mon, 20 Jul 2020 17:33:04 -0700") Message-ID: <87zh7s8mlv.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >>> How about having a project-other-window-commands defcustom for C-x 4 p, >>> and using the entirety of project-prefix-map for C-x 5 p and C-x t t? >>> C-x 4 p can prompt as per my patch, and C-x 5 p and C-x t t could just >>> put a static message in the minibuffer like other-frame-prefix and >>> other-tab-prefix do at present. >> >> Just to clarify: are you proposing this because you really like how the >> prompt works, yet can't find a good way to incorporate it for the two >> other prefixes? > > I wouldn't say that I really like the prompt, but it could be useful to > someone to see the bindings available to them, when we're sure it's > going to fit. While the prompt is active, the key '?' and 'C-h' could (and I think should) display a list of *ALL* available key bindings from the project keymap in the *Help* buffer (like e.g. 'query-replace' does after typing 'C-h'). > I do think we should avoid binding commands under C-x 4 where the > versions under C-x p would already display in another window -- I think > it is potentially quite confusing to have bindings with identical > behaviour under both C-x 4 p and C-x p. Shouldn't some key sequence force displaying the project buffer in the same window (when a version under C-x p displays it in another window)? > But that means we need the defcustom, because a user could use > display-buffer-alist to change which commands under C-x p will use > another window. I now understand that your top message above implies that a user could customize display-buffer-alist to display a buffer in another window, but usually users don't customize display-buffer-alist to display a buffer in another frame/tab? From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Jul 2020 00:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov , Sean Whitton Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159537831724834 (code B ref 42210); Wed, 22 Jul 2020 00:39:02 +0000 Received: (at 42210) by debbugs.gnu.org; 22 Jul 2020 00:38:37 +0000 Received: from localhost ([127.0.0.1]:40755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jy2mL-0006ST-9j for submit@debbugs.gnu.org; Tue, 21 Jul 2020 20:38:37 -0400 Received: from mail-ej1-f51.google.com ([209.85.218.51]:38077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jy2mI-0006S6-4P; Tue, 21 Jul 2020 20:38:36 -0400 Received: by mail-ej1-f51.google.com with SMTP id br7so360383ejb.5; Tue, 21 Jul 2020 17:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=joGSbz88cFMAFeu+VCIRo4GF0ozbNIJ5rrsNp5gExpw=; b=tUoq2m3VAk9heVPh6+T8jTvjaaJGFTW+2nber9AHsU6Q57gOXVbEnMFgC8iRlGCvpp ll4lq9BfbnfblUmTdNTNbAy9Z6EMzeAfbuj39E6fYvsRIDlcNWqmRx8sHwMQooIj+9Q2 mRHq0RMls7/yptoBHj98b13/9bHEkI5BkAioGDeXVg3p29mYUU0xDTDy5diyRruvUYyV Uk55LH20/Zed6YxxX4VZLTV3ycuHNu9p6rwoeynpeTaPtHB8JWHrtfYG01j/L2QSn1EO 8kTCxLp8aFPJQuXggVC+T/MiPMZ8pUKoMNcDFm1A0VCjykoIrhdTPjOhAyu3dKk3hANt w4OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=joGSbz88cFMAFeu+VCIRo4GF0ozbNIJ5rrsNp5gExpw=; b=ZAunGLho+V3ux8cwBNjBo7Jxdf5Mrm9Dd1BEAzrFhEdikcZZz04Fns5FEmYjop6Jop EN18/woeNFs9C3fcMmbwjhkd86B4JluP8nfuIR9CJ8kG+n8Peqesa7wmB2m2Ay0FcH6u Egrw8n4FHJx2EGsvjocFgbwrnrBPDtbhUTCjT/bie4ARv8IEmLQHby2H9kmT8DnvUAH9 ebtdw2DF/5lzvanPeULzRTTdfXH9zG38XrQ5qsgebnoL31UuOOugPmbnotBgDdFD8FmZ w8iOOJ9rQ9KgvNUYIHGl55FrtPKGKqU99Tm0bFKY1M07qe1W/AhmaO3YEHvQVxuOlSCl 4GCw== X-Gm-Message-State: AOAM533zlOUVzlznKbj+PaErHleQvkLnFKhY+C+XCaIRERnnR7kUe7ve Y1Dr7Rs4JEZANDjQB1Ojz7EQyfmV X-Google-Smtp-Source: ABdhPJwmavh3srBctDWofTxEXykjLLr2OA5+Fmj4Qh5haQgTC9N7m4zEVQC1Lcu1ocXJEdsIu5eNfA== X-Received: by 2002:a17:906:248a:: with SMTP id e10mr25859182ejb.454.1595378307949; Tue, 21 Jul 2020 17:38:27 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id u60sm18626001edc.59.2020.07.21.17.38.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2020 17:38:26 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> From: Dmitry Gutov Message-ID: Date: Wed, 22 Jul 2020 03:38:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87zh7s8mlv.fsf@mail.linkov.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) On 22.07.2020 02:38, Juri Linkov wrote: >>> Just to clarify: are you proposing this because you really like how the >>> prompt works, yet can't find a good way to incorporate it for the two >>> other prefixes? >> >> I wouldn't say that I really like the prompt, but it could be useful to >> someone to see the bindings available to them, when we're sure it's >> going to fit. That's a valid benefit. There is also a package called 'which-key', but I think it's incompatible with the implementation strategy here. > While the prompt is active, the key '?' and 'C-h' could (and I think should) > display a list of *ALL* available key bindings from the project keymap > in the *Help* buffer (like e.g. 'query-replace' does after typing 'C-h'). If we're using the prompt, it shows all allowed bindings already. > Shouldn't some key sequence force displaying the project buffer in the > same window (when a version under C-x p displays it in another window)? At the moment, there's none. >> But that means we need the defcustom, because a user could use >> display-buffer-alist to change which commands under C-x p will use >> another window. > > I now understand that your top message above implies that a user > could customize display-buffer-alist to display a buffer in another window, > but usually users don't customize display-buffer-alist to display a buffer > in another frame/tab? Either way, I think the concern that someone could type 'C-x p 4 g' and see that the search results are *still* displayed in another window (gasp), is not too significant. Like, there's no other behavior that should result from key sequence, and if someone wanted to make doubly sure the resulting buffer will be displayed in the other window, why not let them. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Jul 2020 01:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Dmitry Gutov Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159538150130887 (code B ref 42210); Wed, 22 Jul 2020 01:32:02 +0000 Received: (at 42210) by debbugs.gnu.org; 22 Jul 2020 01:31:41 +0000 Received: from localhost ([127.0.0.1]:40787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jy3bh-000821-Bs for submit@debbugs.gnu.org; Tue, 21 Jul 2020 21:31:41 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:55743) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jy3be-00081j-S7; Tue, 21 Jul 2020 21:31:39 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9DA025C0057; Tue, 21 Jul 2020 21:31:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 21 Jul 2020 21:31:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=BDAWUu8Di5GkRhUILsLWgTNXhY dqMpftyrTUkzM1o3A=; b=fEcd1VOfNhLvUgy/Sh/4necRjX1x7B5UrqDvY57OWv qa1jvUwQ+Q6GerNA6VhHhz+C2X7rPIqYT1nDTtKO0dzI3ItGOXia876TQBUEYHDh iM7BRH9KeIdDXgI/ORLVMM7alAVUmL6DnjE8fckfjMkf3WB2UfCkdJa48sSfjL5L 3/HXg7zFvYZwbnztgSisAdibkFuDPZGxh7Zn7hcURt4/cUNaqRcn29YkX3Y+GAi9 7NbvbfN/yMAq2kVqycQTopzCdOo6wl9g5mv/Ga1UYyxvthmTlPZ3wjqEXLd8S0bL mF1P6h5w8AfigWqGaAlKgyKYKJxSeqglw+hYl/dJaymQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=BDAWUu 8Di5GkRhUILsLWgTNXhYdqMpftyrTUkzM1o3A=; b=Nz1y9EnYvolEg+cTI/V6bY jjOiSkiP4kHkbeODbq0MDj8vFwG6n/DzlRkMVQHZzRSsVghPXwCR2xCpoaF3K5+6 Z/BORM1JnaIN4b4Wjk5jTf2hu/VC3G/vyS/r7NLbkeltRTsfbS07ZgLjGZ1WD+Xv RDB0IEI+4cwjCkPe3mDxXr4h1QxUxxCVQnxNxLjTxmJt2Wc6dz2E5ghtPe1b/svw V91KCe8z6aSLXq7tERNo0ooWX28Hk7I/jr8UoEBtUeb8biPx9r78alVX4z8bCorF ivRK1Key/8JJJRbRi1XxWrsSHdslsmqcEylleGa3+lEhByHfYuywKXUNDx9evfyg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeekgdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgedtvdehgeffhfffvdeffefhgfejffelhfetveffffektefgtdej tdeivddtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <87zh7s8mlv.fsf@mail.linkov.net> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> Date: Tue, 21 Jul 2020 18:31:31 -0700 Message-ID: <87eep449os.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello, On Wed 22 Jul 2020 at 02:38AM +03, Juri Linkov wrote: > While the prompt is active, the key '?' and 'C-h' could (and I think should) > display a list of *ALL* available key bindings from the project keymap > in the *Help* buffer (like e.g. 'query-replace' does after typing 'C-h'). What would determine which of the bindings get shown in the prompt, then, supposing there were too many to fit them all? >> I do think we should avoid binding commands under C-x 4 where the >> versions under C-x p would already display in another window -- I think >> it is potentially quite confusing to have bindings with identical >> behaviour under both C-x 4 p and C-x p. > > Shouldn't some key sequence force displaying the project buffer in the > same window (when a version under C-x p displays it in another window)? It's hard to know what key sequence to use. >> But that means we need the defcustom, because a user could use >> display-buffer-alist to change which commands under C-x p will use >> another window. > > I now understand that your top message above implies that a user > could customize display-buffer-alist to display a buffer in another window, > but usually users don't customize display-buffer-alist to display a buffer > in another frame/tab? I exclusively use it to display buffers in other windows :) -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Jul 2020 01:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159538162031095 (code B ref 42210); Wed, 22 Jul 2020 01:34:02 +0000 Received: (at 42210) by debbugs.gnu.org; 22 Jul 2020 01:33:40 +0000 Received: from localhost ([127.0.0.1]:40797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jy3dc-00085O-0z for submit@debbugs.gnu.org; Tue, 21 Jul 2020 21:33:40 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:60213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jy3dZ-000855-Ig; Tue, 21 Jul 2020 21:33:38 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6D8D05C00A8; Tue, 21 Jul 2020 21:33:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 21 Jul 2020 21:33:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=K+BIoZ5ZiufDpd1cQ5LG1pLX+X CxCAFAjKVbifnZcOE=; b=CU1ooe6SzQrwXrpeFJDlIMfzT20nipYtNiSGoO1rqf MV/zgLTZYNhVGBlIbeXLyIsZFkG50yK52hnPaD6Ju6rstxk/5vWyJorQOUEfwabl 470E/VvGkw2Csqu1E92EgE0I9AcM6q/RIifkiUUc2NWVVc0lWCVzTw/hr56G9S4s 1WfRgltr9JvD0nw+L65F0kI6KIHlC7NI+BlbhG+Qqr1SplL93kN1/LgVlGnpJreO veDaR2waWzO7VJwHZ9/SWQCROdyTeUKf5fyd8Dqe0K/fwepZjwIoX3U5N8v8FhRH 6USGS4dsQ7PrRBgo8t0o5Sr5S7p1tpdqPeJF5l7tS1wg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=K+BIoZ 5ZiufDpd1cQ5LG1pLX+XCxCAFAjKVbifnZcOE=; b=L37tK3LoySpJ+Japlq9h7C zQDtbqq0Uzj7OQVm3PRSOfsoORXueF5XkujRynKyo9bNIPsf/WnYDWlln+Mq1fkg NdFf36PEepamFNnVfHM7OBovnixvcDa7DlrHVjsazifxPkXmAPUiK7LguGRkU0EZ eHgag5PHVD8FntggilZzDu5XWuEWTupnrlWIiwe759Ug+pfEvNcfw4wHse7JZmPt rtEHph70sWNyd32tZ5k7tPKbiG9ZNByltOopHqInsMtcE7FxTfbRN+2ZbatqBcPp +oHJD3DImgqD2agfEc024KTuzV+IJOMxhm6q+hzNqOYpOenZ8LnNYwRPhoz81Zkw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeekgdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgedtvdehgeffhfffvdeffefhgfejffelhfetveffffektefgtdej tdeivddtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> Date: Tue, 21 Jul 2020 18:33:30 -0700 Message-ID: <87blk849lh.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello, On Wed 22 Jul 2020 at 03:38AM +03, Dmitry Gutov wrote: > Either way, I think the concern that someone could type 'C-x p 4 g' and > see that the search results are *still* displayed in another window > (gasp), is not too significant. I think it could be a barrier to learning how to use project.el -- it's weird for the same thing to be bound to two places, so the user might think they've misunderstood something when they see it happen. > Like, there's no other behavior that should result from key sequence, > and if someone wanted to make doubly sure the resulting buffer will be > displayed in the other window, why not let them. This makes sense, and would be useful, so probably overrides my worry about it being harder to learn. So, shall I prepare a new patch which just uses the whole prefix map and drops the defcustom? -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Jul 2020 19:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159544620512926 (code B ref 42210); Wed, 22 Jul 2020 19:31:02 +0000 Received: (at 42210) by debbugs.gnu.org; 22 Jul 2020 19:30:05 +0000 Received: from localhost ([127.0.0.1]:43091 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyKRJ-0003ML-57 for submit@debbugs.gnu.org; Wed, 22 Jul 2020 15:30:05 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyKRF-0003LH-EB; Wed, 22 Jul 2020 15:30:03 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2518E5C0110; Wed, 22 Jul 2020 15:29:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 22 Jul 2020 15:29:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=IIOUPlN9BHIYbQWehwVFF7+mCW IH3MdTpF9c6x/Qr3U=; b=IwqH23IMG8k6dJ/mj1QWm1AepFSeMogBMbORBB1mj3 NC7S7qOPRqQRB96SY/PQZ6W5TuMo7QkBOj/IIxiY+aZ6mVIhE0Wq6v+0jKMeo1oC zVy7FMlKkGi16h8JPd9hhQ9F4EN3hAkgWiSmayZbVLp8J6taG8DKQbH8elSKrr/+ E//nPZ80CBfxjgNLQd23Hjch8TqKyPMGvAj/Q2fYaQRLQqvSG/lk51ihjLa81mdj PSpEtfbZhM4PgHkAQUZPIDvRn1hJNYUquEoNfEQllX7IkDEd2JFAgHlaVThzIbeP nSPtFj2wXinGMK6aYGSbKju/ZWL/vX8A2rPKwmrvAoRA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=IIOUPl N9BHIYbQWehwVFF7+mCWIH3MdTpF9c6x/Qr3U=; b=useVGB0FkcMYxn1IqkJHEn F6UWGQkDPS7I9WGpRVG8hrJvg33Jbl3jdk0noMXucSXD7guaB+72wAFyIniZW3ww uluTAlwta6TQHCp4QkPMVv2Fgbi70p+a6qGzzUO8SmiHmEIOj68HgHU//EmTxq0k T4rVOMg78BC3xrE+PA0RK443k0OeIHIiE5I2Ot8TuWWm/u6UOVK9VixjHzctEGUL 0WSzYHYEr7X0rTjtXpVJxr8T/9vOYys6vTuSFbc7Ag4gEzLZEnMlRApLoBzrqCCL +yKqdNPD0WNPl3oai9Vfb9fW23MBqF5xY/4PKLbHMzdmpsvUw9P8qquI7JmTjRpQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeelgddufeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhffkfggtgesthdtredttddttdenucfhrhhomhepufgvrghnucgh hhhithhtohhnuceoshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenuc ggtffrrghtthgvrhhnpeegtddvheegfffhffdvfeefhffgjefflefhteevffffkeetgfdt jedtiedvtdevheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: From: Sean Whitton In-Reply-To: <87blk849lh.fsf@iris.silentflame.com> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> Date: Wed, 22 Jul 2020 12:28:51 -0700 Message-ID: <87tuxz2vt8.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello, On Tue 21 Jul 2020 at 06:33PM -07, Sean Whitton wrote: > On Wed 22 Jul 2020 at 03:38AM +03, Dmitry Gutov wrote: > >> Like, there's no other behavior that should result from key sequence, >> and if someone wanted to make doubly sure the resulting buffer will be >> displayed in the other window, why not let them. > > This makes sense, and would be useful, so probably overrides my worry > about it being harder to learn. So, shall I prepare a new patch which > just uses the whole prefix map and drops the defcustom? Hmm, a further complication: I would like to be able to bind C-x 4 p C-o to work like C-x 4 C-o. I think this could be achieved by having an additional keymap, and the command bound to C-x 4 p can look up keys in both project-prefix-map and this new keymap. -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jul 2020 00:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Dmitry Gutov Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159546461710005 (code B ref 42210); Thu, 23 Jul 2020 00:37:02 +0000 Received: (at 42210) by debbugs.gnu.org; 23 Jul 2020 00:36:57 +0000 Received: from localhost ([127.0.0.1]:43395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyPEG-0002bE-Jc for submit@debbugs.gnu.org; Wed, 22 Jul 2020 20:36:56 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:34255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyPED-0002ag-C0; Wed, 22 Jul 2020 20:36:55 -0400 X-Originating-IP: 91.129.108.250 Received: from mail.gandi.net (m91-129-108-250.cust.tele2.ee [91.129.108.250]) (Authenticated sender: juri@linkov.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 86A37C0009; Thu, 23 Jul 2020 00:36:43 +0000 (UTC) From: Juri Linkov Organization: LINKOV.NET References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87eep449os.fsf@iris.silentflame.com> Date: Thu, 23 Jul 2020 03:32:07 +0300 In-Reply-To: <87eep449os.fsf@iris.silentflame.com> (Sean Whitton's message of "Tue, 21 Jul 2020 18:31:31 -0700") Message-ID: <87sgdjcbqw.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) >> While the prompt is active, the key '?' and 'C-h' could (and I think should) >> display a list of *ALL* available key bindings from the project keymap >> in the *Help* buffer (like e.g. 'query-replace' does after typing 'C-h'). > > What would determine which of the bindings get shown in the prompt, > then, supposing there were too many to fit them all? Maybe it's possible to show all them by using 'read-char-choice' when only the initial letters are displayed in the prompt like "(f, g, d, v, s, ?): " or using 'read-answer' or 'read-multiple-choice', e.g.: (read-multiple-choice "Select project" '((?f "Find file") (?g "Find regexp") (?d "dired") (?v "vc-dir") (?s "shell"))) >>> I do think we should avoid binding commands under C-x 4 where the >>> versions under C-x p would already display in another window -- I think >>> it is potentially quite confusing to have bindings with identical >>> behaviour under both C-x 4 p and C-x p. >> >> Shouldn't some key sequence force displaying the project buffer in the >> same window (when a version under C-x p displays it in another window)? > > It's hard to know what key sequence to use. Indeed, it's hard to find a key prefix analogous to 'C-x 4 1'. Maybe 'C-x 4 1 p'? From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jul 2020 15:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org, Dmitry Gutov Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159551683014345 (code B ref 42210); Thu, 23 Jul 2020 15:08:01 +0000 Received: (at 42210) by debbugs.gnu.org; 23 Jul 2020 15:07:10 +0000 Received: from localhost ([127.0.0.1]:45822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jycoQ-0003jD-2o for submit@debbugs.gnu.org; Thu, 23 Jul 2020 11:07:10 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:37745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jycoL-0003ic-8w; Thu, 23 Jul 2020 11:07:08 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1CE505C00A6; Thu, 23 Jul 2020 11:07:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 23 Jul 2020 11:07:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=3mIqSQ7D3x9MXOomvrFSI8Iy9u E+58h28BImC8PhUs4=; b=qXVXUV16ulth+idIh0FiL5l9USH5QgGLgXg/ZYetdf A1pHyqhWqXM7mnxj2yImopKUCTjtlEKi550rpd/sceNysXVyFoj+l0K/uB2CPSiB Lh6tzZ1EWWRJqUtnDexKkwkpaH6ZYXFxzF90z/1WtaxTz9pg2elVw7FdTliAEDeG HKaaQpu9nzh//W5c+0SAFLK4kYnCkFX95YkhtAcFxes5dFRQpN6Tdy3ITdF+iqh2 MHbmze/667XiKl9c2vI3v8ursbv7q/jNVOZ0qNbUzZb16pAQ5JYnduDB3vGLZEgV H0gZQI1/ak8X9adfqvW0UVto/zkRG7aHyhwAgmH98n6Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=3mIqSQ 7D3x9MXOomvrFSI8Iy9uE+58h28BImC8PhUs4=; b=tELP65Z/OXxi7N8M7epCE/ Sw2kSwJ3Pwsaov8RoBIWJyR8UpTpaKS5xg6vkYTPjObdyYukLPDFA3Rs5rVuUMwn 7FzpjjImhg8OOjG5zU0SvRCWqbiGPklKFwIeyXf6EFP/y8VQx0BkUUrXWg/zfPNd WEQ+e8kHHKi28K2CELufrz/Zym90Jb7YiNAnHGDyJHZZw886PpBmza/37OJUOGAT +40odFzgyM7J1SeyUC4CmtLLt+hu5Qvg8cNQtr4oH+VHo815/IQvf96dmOYuzhs6 8U9pCrR8VeFHiMFoU4cmi5Bidlu+bMY4XiAr9Fqvkqh1ogPvmVAXJ5GTwu6EOn2g == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrhedugdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgedtvdehgeffhfffvdeffefhgfejffelhfetveffffektefgtdej tdeivddtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <87sgdjcbqw.fsf@mail.linkov.net> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87eep449os.fsf@iris.silentflame.com> <87sgdjcbqw.fsf@mail.linkov.net> Date: Thu, 23 Jul 2020 08:06:57 -0700 Message-ID: <87k0yutgmm.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello Juri, On Thu 23 Jul 2020 at 03:32AM +03, Juri Linkov wrote: >>> While the prompt is active, the key '?' and 'C-h' could (and I think should) >>> display a list of *ALL* available key bindings from the project keymap >>> in the *Help* buffer (like e.g. 'query-replace' does after typing 'C-h'). >> >> What would determine which of the bindings get shown in the prompt, >> then, supposing there were too many to fit them all? > > Maybe it's possible to show all them by using 'read-char-choice' when only > the initial letters are displayed in the prompt like "(f, g, d, v, s, ?): " > or using 'read-answer' or 'read-multiple-choice', e.g.: > > (read-multiple-choice "Select project" > '((?f "Find file") > (?g "Find regexp") > (?d "dired") > (?v "vc-dir") > (?s "shell"))) If we're only displaying single letters, then I'm not sure there is much point in prompting at all? Either someone knows what letter to press or they don't -- in either case the prompt seems useless. >>>> I do think we should avoid binding commands under C-x 4 where the >>>> versions under C-x p would already display in another window -- I think >>>> it is potentially quite confusing to have bindings with identical >>>> behaviour under both C-x 4 p and C-x p. >>> >>> Shouldn't some key sequence force displaying the project buffer in the >>> same window (when a version under C-x p displays it in another window)? >> >> It's hard to know what key sequence to use. > > Indeed, it's hard to find a key prefix analogous to 'C-x 4 1'. > Maybe 'C-x 4 1 p'? I'd be cautious about this, because it breaks the general semantics of C-x 4 1. It seems reasonable that someone might have a major-mode in which 'p' displays another buffer, and then they might want to use C-x 4 1 to reuse the same window. -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Jul 2020 23:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159554800715324 (code B ref 42210); Thu, 23 Jul 2020 23:47:01 +0000 Received: (at 42210) by debbugs.gnu.org; 23 Jul 2020 23:46:47 +0000 Received: from localhost ([127.0.0.1]:46322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jykvG-0003z5-Mv for submit@debbugs.gnu.org; Thu, 23 Jul 2020 19:46:46 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:36475) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jykvD-0003yn-Bc; Thu, 23 Jul 2020 19:46:45 -0400 Received: by mail-wm1-f42.google.com with SMTP id y24so2518213wma.1; Thu, 23 Jul 2020 16:46:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Zsfz97p2u51w21HhBtcsA1un7gj/TZVMlt/8wF1e3jo=; b=EUe3nmztJwNOIZNvxg1QtcsY9Wwg5rEY/gYAllbdSxn3f4wjE9jl9D/yPy4hE3WIeW FnH9SKEwphBl9gLgHPp54VajmZycxYDazNWOSYZ22LI0gzxhJgsO51cAD6uIBbr/gGfQ bHs+YJN9HDqanvkTQP4ExLpZ6kcn2ZxL7a3wBC/Kcz/436yiV33JphQ5GBfMigSVD9OA ddcqi3XAvlvGqpOOoQpC5Jitu5BLqrTJDbIqsm/O7/cfYXGMzkppwqocKDyMxdTA1Um2 e6ovEWxUFI8FYWzDsDamaPm9S7F0Hifm/kS4OVT35QzkqNSOejhr1ZdGz870GdfvitPU SuzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Zsfz97p2u51w21HhBtcsA1un7gj/TZVMlt/8wF1e3jo=; b=hKzkzmDZX6N5YEv7s9JP6ebRFhmJ5fIwxA0R48+T4m0UOxS/uL9XcH5zIpjNzSSky1 ZIcwrkIS4FBSsmepBKAHCq/xwNrc/oDkLp0V7dV7Tt/oP+71d7sx/c/R1+wuj3QyP/sf KnB149eLTvzl/58JqLexcS0zL15Q3CRmIDjfH1HLbUkL7f8C0ASJ/hcjibk/wkVaimRw E7Z/plsLV0ffckmxWOWVIZq9k6h1F9RDM3u0ELq3ql0Fce3CmEIqM/I8Nx2FqWoXFzLW hpvu0yz3Vcs+qC9yJvrCiA/X7V9NPoNOplOj/6/MkG+fjxbNjvFjdjuw7SOrZzVQz4YD wT2A== X-Gm-Message-State: AOAM532GNH4Sq74NxH7nwyohiZudC2Dsh1PiLec8xt8tuMgyLBEiDSY2 lecUL/A7upfCVAzJIv6Ezy/ljBpI X-Google-Smtp-Source: ABdhPJz4eNdRHZvq9rmtCQwdFg4cCtMaPq2CcFC9qFdWJmi1MkInKrhnjy5Czt71ahJ19gsVSM1wUA== X-Received: by 2002:a7b:ce04:: with SMTP id m4mr6025839wmc.1.1595547996953; Thu, 23 Jul 2020 16:46:36 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id p25sm4832133wma.39.2020.07.23.16.46.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jul 2020 16:46:36 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> From: Dmitry Gutov Message-ID: <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> Date: Fri, 24 Jul 2020 02:46:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87tuxz2vt8.fsf@iris.silentflame.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.2 (-) On 22.07.2020 22:28, Sean Whitton wrote: >> This makes sense, and would be useful, so probably overrides my worry >> about it being harder to learn. So, shall I prepare a new patch which >> just uses the whole prefix map and drops the defcustom? Since we're struggling between the choices, and you don't feel a strong attachment to the prompt either, yes, please. Then we can install it and maybe continue the discussion of an optional patch which will add the prompt on top of it. > Hmm, a further complication: I would like to be able to bind C-x 4 p C-o > to work like C-x 4 C-o. > > I think this could be achieved by having an additional keymap, and the > command bound to C-x 4 p can look up keys in both project-prefix-map and > this new keymap. Yup. The new keymap could inherit from project-prefix-map, then the lookup should be just one funcall. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jul 2020 02:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , Juri Linkov Cc: "Basil L. Contovounesios" , 41890@debbugs.gnu.org, "Philip K." , 42210@debbugs.gnu.org Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159555626428412 (code B ref 42210); Fri, 24 Jul 2020 02:05:02 +0000 Received: (at 42210) by debbugs.gnu.org; 24 Jul 2020 02:04:24 +0000 Received: from localhost ([127.0.0.1]:46374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyn4S-0007O6-2a for submit@debbugs.gnu.org; Thu, 23 Jul 2020 22:04:24 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:46785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyn4O-0007Nm-U8; Thu, 23 Jul 2020 22:04:22 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id A72645801EB; Thu, 23 Jul 2020 22:04:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 23 Jul 2020 22:04:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=aavMk66eQx9ZYn3YpJ79EQtPyg 3845N/U1qf18rDvKk=; b=CpolAEDld9FhlFsi8otHfhNgSKSJmg8tTYMjJvX0+O ujs6bVTv1cZs2FV9FxaeUpA8sKLsv/KWyyvW9DBQnWFo/uGpDkiMhed47HU42Rur 1Xp0TRg4IMeP/h7a8xfHp8EOg/8jTgaEoZtBF5y2zV7gwi4EqDmGbzGD602H+8fb oJ+mOl0sFsyL92H4C+7Y34h1HOM3pypJrp8/+G16AKuFEDTZfHPFewXSeI6c1sxd MDkXu/1kvgNPYnQkU6GyjwIsHA16ZFGsLFyQ5TL8J9J3gkcxEAUBXyQ0S40lM/Ci ba1XgMBTE/0SCvknBiuciiiZKhTT2XEyPwcspJKnGe6w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=aavMk6 6eQx9ZYn3YpJ79EQtPyg3845N/U1qf18rDvKk=; b=Xd0zDN4MXnPds3FozE9yc8 v+CJmIJy7GqBKS5hqZQiJhKF5eTm9k2I3dmiu32pc02AHuf/OMHTuB+hG07IocCA FifzNlir+Zag4McOVrymAjQnH5cq7aoKpv7dABXtGWjFX5QQgZDSHLYQvo+lTGud nzzvjgqXTfPCDt82BX5RhF6lWiDMTP/xMGHDyVswusBo6VevACijPmcAQStAbUmo CzXmNXEdMVMcUGG918sroknJRy5EFk1f6km49zPlqx/Kna6jcxduujzZ2I4puzNo CtlCdQI2O5DfYPoKjWv6OgyPkHE9JNCtym2Pllfw7VUv/95ULXnE8meUcm77alAw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrhedvgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fhohhrsghiugguvghnufhorhhtjfgurhculdehtddtmdenucfjughrpefhvffujghffffk gggtsehmtderredttddtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhh hithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepieff hfffudfhjefgfeeuleeutdevtdektdehiefgieetleevveekgeduhedtudefnecuhfhorh gsihguuggvnhfuohhrthfjughrpeffhffkuffvgggjtghfsehmtderredttddtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtth honhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> Date: Thu, 23 Jul 2020 19:04:13 -0700 Message-ID: <878sf9u0rm.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) --=-=-= Content-Type: text/plain Hello, On Fri 24 Jul 2020 at 02:46AM +03, Dmitry Gutov wrote: > On 22.07.2020 22:28, Sean Whitton wrote: >>> [...] > > Since we're struggling between the choices, and you don't feel a strong > attachment to the prompt either, yes, please. > > Then we can install it and maybe continue the discussion of an optional > patch which will add the prompt on top of it. Cool, what do you think to the attached? >> Hmm, a further complication: I would like to be able to bind C-x 4 p C-o >> to work like C-x 4 C-o. >> >> I think this could be achieved by having an additional keymap, and the >> command bound to C-x 4 p can look up keys in both project-prefix-map and >> this new keymap. > > Yup. The new keymap could inherit from project-prefix-map, then the > lookup should be just one funcall. In the end I didn't use inheritance; hopefully it is clear from the patch why I thought this would not be a good idea. -- Sean Whitton --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-project-display-buffer-and-project-display-buffe.patch >From 5a55c6376a5ccec957adee88e03503f651ee7448 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 23 Jul 2020 18:00:59 -0700 Subject: [PATCH 1/2] Add project-display-buffer and project-display-buffer-other-frame * lisp/progmodes/project.el (project-switch-to-buffer): Add optional switching-function argument. * lisp/progmodes/project.el (project-display-buffer, project-display-buffer-other-frame): Add commands. --- lisp/progmodes/project.el | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a0930553bd..f47e6bcc1c 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -878,12 +878,15 @@ project-compile (compile command comint))) ;;;###autoload -(defun project-switch-to-buffer () +(defun project-switch-to-buffer (&optional switching-function) "Switch to another buffer belonging to the current project. This function prompts for another buffer, offering as candidates buffers that belong to the same project as the current buffer. Two buffers belong to the same project if their project instances, -as reported by `project-current' in each buffer, are identical." +as reported by `project-current' in each buffer, are identical. + +Optional argument SWITCHING-FUNCTION is the function used to +switch the buffer. It defaults to `switch-to-buffer'." (interactive) (let* ((pr (project-current t)) (current-buffer (current-buffer)) @@ -896,7 +899,7 @@ project-switch-to-buffer (equal pr (with-current-buffer (cdr buffer) (project-current))))))) - (switch-to-buffer + (funcall (or switching-function #'switch-to-buffer) (read-buffer "Switch to buffer: " (when (funcall predicate (cons other-name other-buffer)) @@ -904,6 +907,24 @@ project-switch-to-buffer nil predicate)))) +;;;###autoload +(defun project-display-buffer () + "Display a buffer of the current project without selecting it. + +See `project-switch-to-buffer' for what it means for a buffer to +belong to the current project." + (interactive) + (project-switch-to-buffer #'display-buffer)) + +;;;###autoload +(defun project-display-buffer-other-frame () + "Display a buffer of the current project, preferably in another frame. + +See `project-switch-to-buffer' for what it means for a buffer to +belong to the current project." + (interactive) + (project-switch-to-buffer #'display-buffer-other-frame)) + (defcustom project-kill-buffers-ignores '("\\*Help\\*") "Conditions for buffers `project-kill-buffers' should not kill. -- 2.27.0 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0002-Add-project-other-place-commands.patch >From c303620b4a9c04771fe9188b500fc5a8e88c8ea6 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 23 Jul 2020 18:55:42 -0700 Subject: [PATCH 2/2] Add project other place commands * lisp/progmodes/project.el (project-other-window-map, project-other-frame-map, project--other-place-command, project-other-window-command, project-other-frame-command, project-other-tab-command): Add these functions and maps. * lisp/progmodes/project.el: Bind project-other-window-command to C-x 4 p, project-other-frame-command to C-x 5 p and project-other-tab-command to C-x t p. --- lisp/progmodes/project.el | 67 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index f47e6bcc1c..13b1eafe3e 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -592,6 +592,73 @@ project-prefix-map ;;;###autoload (define-key ctl-x-map "p" project-prefix-map) +;; We can't have these place-specific maps inherit from +;; project-prefix-map because project--other-place-command needs to +;; know which map the key binding came from, as if it came from one of +;; these maps, we don't want to set display-buffer-overriding-action + +(defvar project-other-window-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'project-display-buffer) + map) + "Keymap for additional project commands to display in other windows.") + +(defvar project-other-frame-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'project-display-buffer-other-frame) + map) + "Keymap for additional project commands to display in other frames.") + +(defun project--other-place-command (action &optional map) + (let* ((key (read-key-sequence-vector nil t)) + (place-cmd (lookup-key map key)) + (generic-cmd (lookup-key project-prefix-map key)) + (display-buffer-overriding-action (unless place-cmd action))) + (if-let ((cmd (or place-cmd generic-cmd))) + (call-interactively cmd) + (user-error "%s is undefined" (key-description key))))) + +;;;###autoload +(defun project-other-window-command () + "Invoke a project command but display its buffer in another window. + +The following commands are available: + +\\{project-prefix-map} +\\{project-other-window-map}" + (interactive) + (project--other-place-command '((display-buffer-pop-up-window) + (inhibit-same-window . t)) + project-other-window-map)) + +;;;###autoload (define-key ctl-x-4-map "p" #'project-other-window-command) + +;;;###autoload +(defun project-other-frame-command () + "Invoke a project command but display its buffer in another frame. + +The following commands are available: + +\\{project-prefix-map} +\\{project-other-frame-map}" + (interactive) + (project--other-place-command '((display-buffer-pop-up-frame)) + project-other-frame-map)) + +;;;###autoload (define-key ctl-x-5-map "p" #'project-other-frame-command) + +;;;###autoload +(defun project-other-tab-command () + "Invoke a project command but display its buffer in another tab. + +The following commands are available: + +\\{project-prefix-map}" + (interactive) + (project--other-place-command '((display-buffer-in-new-tab)))) + +;;;###autoload (define-key tab-prefix-map "p" #'project-other-tab-command) + (defun project--value-in-dir (var dir) (with-temp-buffer (setq default-directory dir) -- 2.27.0 --=-=-=-- From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jul 2020 06:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net, contovob@tcd.ie, philip@warpmail.net, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159557051718639 (code B ref 42210); Fri, 24 Jul 2020 06:02:02 +0000 Received: (at 42210) by debbugs.gnu.org; 24 Jul 2020 06:01:57 +0000 Received: from localhost ([127.0.0.1]:46525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyqmK-0004qX-RM for submit@debbugs.gnu.org; Fri, 24 Jul 2020 02:01:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyqmG-0004qE-R3; Fri, 24 Jul 2020 02:01:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33076) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyqm9-0003g9-M1; Fri, 24 Jul 2020 02:01:45 -0400 Received: from [176.228.60.248] (port=2127 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jyqm9-0007PU-0K; Fri, 24 Jul 2020 02:01:45 -0400 Date: Fri, 24 Jul 2020 09:01:27 +0300 Message-Id: <83sgdhe9jc.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <878sf9u0rm.fsf@iris.silentflame.com> (message from Sean Whitton on Thu, 23 Jul 2020 19:04:13 -0700) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Date: Thu, 23 Jul 2020 19:04:13 -0700 > Cc: "Basil L. Contovounesios" , > "Philip K." , 41890@debbugs.gnu.org, > 42210@debbugs.gnu.org > > -(defun project-switch-to-buffer () > +(defun project-switch-to-buffer (&optional switching-function) > "Switch to another buffer belonging to the current project. > This function prompts for another buffer, offering as candidates > buffers that belong to the same project as the current buffer. > Two buffers belong to the same project if their project instances, > -as reported by `project-current' in each buffer, are identical." > +as reported by `project-current' in each buffer, are identical. > + > +Optional argument SWITCHING-FUNCTION is the function used to > +switch the buffer. It defaults to `switch-to-buffer'." > (interactive) This interface strikes me as unusual and even unexpected for a command that switches to another buffer. I would expect it to have an API similar to that of switch-to-buffer: that it should accept the buffer to switch to as an argument, and set up that argument in the 'interactive' spec according to the preferences of this command (offering buffers in the same project etc.). The API you propose makes it awkward, to say the least, to invoke this command from Lisp. Granted, the original API doesn't allow such invocation, either, but as long as we are changing this API, let's try fixing that, okay? > +(defun project-display-buffer () > + "Display a buffer of the current project without selecting it. This doesn't say where that buffer will be displayed. Please add that important detail to the doc string. > +(defun project-display-buffer-other-frame () > + "Display a buffer of the current project, preferably in another frame. > + > +See `project-switch-to-buffer' for what it means for a buffer to > +belong to the current project." The "preferably" part needs to be explained some more, perhaps by pointing to display-buffer-other-frame for the details. Otherwise it leaves some of the command's MO a mystery. > +(defvar project-other-window-map > + (let ((map (make-sparse-keymap))) > + (define-key map "\C-o" #'project-display-buffer) > + map) > + "Keymap for additional project commands to display in other windows.") Do you mean "commands _that_ display in other windows"? If so, please use "that" instead of "to". Also, I think the doc string should explain what do those commands display in those other windows. > +(defvar project-other-frame-map > + (let ((map (make-sparse-keymap))) > + (define-key map "\C-o" #'project-display-buffer-other-frame) > + map) > + "Keymap for additional project commands to display in other frames.") Same here. > +;;;###autoload > +(defun project-other-window-command () > + "Invoke a project command but display its buffer in another window. ^ Comma is missing there. More importantly, the "its" part is ambiguous. What does it allude to? > +(defun project-other-frame-command () > + "Invoke a project command but display its buffer in another frame. Same here. > +(defun project-other-tab-command () > + "Invoke a project command but display its buffer in another tab. Same here, except that in this case even the idea of "displaying in a tab" is unclear. This needs rewording. Thanks. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jul 2020 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net, contovob@tcd.ie, philip@warpmail.net, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159560354426246 (code B ref 42210); Fri, 24 Jul 2020 15:13:02 +0000 Received: (at 42210) by debbugs.gnu.org; 24 Jul 2020 15:12:24 +0000 Received: from localhost ([127.0.0.1]:48535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyzN1-0006p9-NU for submit@debbugs.gnu.org; Fri, 24 Jul 2020 11:12:24 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:39363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyzMy-0006on-Ro; Fri, 24 Jul 2020 11:12:21 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A6B775C005C; Fri, 24 Jul 2020 11:12:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 24 Jul 2020 11:12:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=XY46UX1XaCegjz8LWYcGgGrGxM 3SQ9qdXdmEX/KDQoE=; b=ePxWrCGojbq1pPzPiN90Ukp2c3r+2qXuAcPa+FBon9 XK2Q5laajrm5cn3WSlW+6S7dL0/czVgmXBUWAELyHL3HnAD8gq/7Fumpy99ODNAi cB/IQs0LhKeW2WjWofodSHBdAsXHNGZ9Ghf7Mx/D4Gl+JzuaRiFgqAkqNKTomz6A DEvLqscIRCednLYEWaQ388qfcNK5H9h62soJ8ALkWCoVtA60msXA9ezOwTBcZFOV K6PtSzXhTTedOv/hfWe1NlYtfMHeTpWQryV3c/zZ3KQ2jzJttAZggidk9w38GsuI nz55VTT27xLO0Punimul1VA34A54MWlQQRjMYbw/3wKg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=XY46UX 1XaCegjz8LWYcGgGrGxM3SQ9qdXdmEX/KDQoE=; b=twQiJqYU1nB1Kt2qVZER0u hygT40gxWt0jVK2xBWiH5deizmLbsogR3b5PwrH1IVvScHTBsOMkiq7H8iIzohJp mHv0psH06Rie8hxShnD4JskCRs0AuO6WQ9p4DZVKmo+HwOClVITcpBR2zMM6VS5Q qTOKw0c2exBF0dyiyvDqCjq7NDFlSoId4kcbrJ89fY8XYn7FGDnv8BJ98nePrYk9 MIwmdfpfv13WVEvEO5is0daX2DiXpxAtKA8YkdpSA+f9Wc6xg2RaMyTYKZG0dLAi 2N2TUd29cGXIU1LyxFHqQAESeShLrocWDx9hZq5oCl5mUN68Yhv+Quyl2sheUnyg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrheefgdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgedtvdehgeffhfffvdeffefhgfejffelhfetveffffektefgtdej tdeivddtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <83sgdhe9jc.fsf@gnu.org> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> Date: Fri, 24 Jul 2020 08:12:13 -0700 Message-ID: <871rl1t0aa.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello Eli, On Fri 24 Jul 2020 at 09:01AM +03, Eli Zaretskii wrote: >> Date: Thu, 23 Jul 2020 19:04:13 -0700 >> Cc: "Basil L. Contovounesios" , >> "Philip K." , 41890@debbugs.gnu.org, >> 42210@debbugs.gnu.org >> >> -(defun project-switch-to-buffer () >> +(defun project-switch-to-buffer (&optional switching-function) >> "Switch to another buffer belonging to the current project. >> This function prompts for another buffer, offering as candidates >> buffers that belong to the same project as the current buffer. >> Two buffers belong to the same project if their project instances, >> -as reported by `project-current' in each buffer, are identical." >> +as reported by `project-current' in each buffer, are identical. >> + >> +Optional argument SWITCHING-FUNCTION is the function used to >> +switch the buffer. It defaults to `switch-to-buffer'." >> (interactive) > > This interface strikes me as unusual and even unexpected for a command > that switches to another buffer. I would expect it to have an API > similar to that of switch-to-buffer: that it should accept the buffer > to switch to as an argument, and set up that argument in the > 'interactive' spec according to the preferences of this command > (offering buffers in the same project etc.). The API you propose > makes it awkward, to say the least, to invoke this command from Lisp. I added the argument just so I could reuse the code in project-switch-to-buffer, so a simple alternative for the purposes of my patch would be to factor that code out into a new project--select-project-buffer defun. Then no existing APIs would be changed. Would that be sufficient? > Granted, the original API doesn't allow such invocation, either, but > as long as we are changing this API, let's try fixing that, okay? This is a bit tricky actually -- what should the function do if some Lisp code passes it a buffer which is not part of the current project? Throw an error? But then surely the Lisp code would prefer to just check if the buffer is part of the project itself, and use switch-to-buffer. I'd be grateful if you could say more about the sort of Lisp code you have in mind. I'm struggling to imagine wanting to call this function from Lisp except via call-interactively. -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jul 2020 16:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net, contovob@tcd.ie, philip@warpmail.net, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159560719132042 (code B ref 42210); Fri, 24 Jul 2020 16:14:02 +0000 Received: (at 42210) by debbugs.gnu.org; 24 Jul 2020 16:13:11 +0000 Received: from localhost ([127.0.0.1]:48603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz0Jl-0008Ke-Ic for submit@debbugs.gnu.org; Fri, 24 Jul 2020 12:13:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz0Jj-0008K7-ND; Fri, 24 Jul 2020 12:13:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55397) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jz0Jc-0005dP-JO; Fri, 24 Jul 2020 12:12:56 -0400 Received: from [176.228.60.248] (port=3004 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jz0Jb-000763-5a; Fri, 24 Jul 2020 12:12:56 -0400 Date: Fri, 24 Jul 2020 19:12:39 +0300 Message-Id: <83ft9gevt4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <871rl1t0aa.fsf@iris.silentflame.com> (message from Sean Whitton on Fri, 24 Jul 2020 08:12:13 -0700) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> <871rl1t0aa.fsf@iris.silentflame.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) > From: Sean Whitton > Cc: dgutov@yandex.ru, juri@linkov.net, contovob@tcd.ie, philip@warpmail.net, > 41890@debbugs.gnu.org, 42210@debbugs.gnu.org > Date: Fri, 24 Jul 2020 08:12:13 -0700 > > > This interface strikes me as unusual and even unexpected for a command > > that switches to another buffer. I would expect it to have an API > > similar to that of switch-to-buffer: that it should accept the buffer > > to switch to as an argument, and set up that argument in the > > 'interactive' spec according to the preferences of this command > > (offering buffers in the same project etc.). The API you propose > > makes it awkward, to say the least, to invoke this command from Lisp. > > I added the argument just so I could reuse the code in > project-switch-to-buffer, so a simple alternative for the purposes of my > patch would be to factor that code out into a new > project--select-project-buffer defun. Then no existing APIs would be > changed. > > Would that be sufficient? What you added is not my problem, my problem is that there's no easy way of calling this function from Lisp. > > Granted, the original API doesn't allow such invocation, either, but > > as long as we are changing this API, let's try fixing that, okay? > > This is a bit tricky actually -- what should the function do if some > Lisp code passes it a buffer which is not part of the current project? Just switch to that buffer, I think. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jul 2020 21:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net, contovob@tcd.ie, philip@warpmail.net, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159562567228489 (code B ref 42210); Fri, 24 Jul 2020 21:22:02 +0000 Received: (at 42210) by debbugs.gnu.org; 24 Jul 2020 21:21:12 +0000 Received: from localhost ([127.0.0.1]:48810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz57v-0007PM-Bv for submit@debbugs.gnu.org; Fri, 24 Jul 2020 17:21:12 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:50363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz57r-0007Os-76; Fri, 24 Jul 2020 17:21:09 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 21B0D58052C; Fri, 24 Jul 2020 17:21:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 24 Jul 2020 17:21:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=IK/2gPXXPBNscTmc1cNdW3O1hF O2g4AjsJt5bI45Q4A=; b=FwbrS/1SY58eQ5FweXbM1Z6puq5BRljZiqgla7zN5W H1VqYpddXx5/MU0Ftya6au+I0E0b1JXIelbC2FfflF9DJ0GnQ6/HuifffbNDSDgz vdbO6T2cT3fzaLTXVz2Z0qrsJnqDXJiNjYOGfvUHa6t/iKICrBwiGDh/QtIJrCKa n0liDxfBNL/voW2uEJAlKAP+Y9cWymtqHuPPrFNbnhzBM1W691SPFaLN5hzHiYXt 4m15baLL5qbUlqYCeZEuGsph0WpTc/GRwaWvOBjs3nOBsXopgaT/t0jaH1QIh1Nn OksSL9qY7ZLtoW6JR7LHxn7g5ba+9GKSgfXUlVPqaDHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=IK/2gP XXPBNscTmc1cNdW3O1hFO2g4AjsJt5bI45Q4A=; b=nKoqwHPuhjScqvMTuG72yn wiIPeeTDbw9/C3Ny2QVMNubX0C1DwZVh2SsUOi879ADLOEsnhZyqL7b8aEVBKVkE Xer7+eWPZWKe/HnqfWeu80K1KYaVULwH/flzOvP3lmtAGu53RJH5liFZdV8UEEyJ legUuURh2StS2O+jxa+GNTnaJFvGkv/qkFYC/1g58U87khP/t66nfZpovibGEckT aGri1yOHhslvTVrcatHYFj8Rn909pjBqbNjpFw4oj9NfC5xl5GXCP6NgS/gO9jLj 9vutjx/oAsas/ZK5gpzkScaKhFToV8+87mF08xhJpbfTaRn4rC1faMuCvwoYkQ9Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrheefgdduieduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gohfhorhgsihguuggvnhfuohhrthfjughrucdlhedttddmnecujfgurhephffvufgjfhff kfggtgesmhdtreertddttdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfi hhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeei fffhffduhfejgfefueeluedtvedtkedtheeigfeiteelveevkeegudehtddufeenucfhoh hrsghiugguvghnufhorhhtjfgurhepfffhkffuvfggjggtfhesmhdtreertddttdenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhith htohhnsehsphifhhhithhtohhnrdhnrghmvg X-ME-Proxy: From: Sean Whitton In-Reply-To: <83ft9gevt4.fsf@gnu.org> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> <871rl1t0aa.fsf@iris.silentflame.com> <83ft9gevt4.fsf@gnu.org> Date: Fri, 24 Jul 2020 14:20:59 -0700 Message-ID: <87wo2swqx0.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) --=-=-= Content-Type: text/plain Hello, On Fri 24 Jul 2020 at 07:12PM +03, Eli Zaretskii wrote: > Just switch to that buffer, I think. Okay, then I think the attached addresses feedback received. Thanks! -- Sean Whitton --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v2-0001-Factor-out-project-read-project-buffer-from-proje.patch >From 08394aa143a5e0fc627e259b4deee3a1c3317960 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 24 Jul 2020 13:36:39 -0700 Subject: [PATCH v2 1/3] Factor out project--read-project-buffer from project-switch-buffer * lisp/progmodes/project.el (project--read-project-buffer): New function extracted from project-switch-buffer. * lisp/progmodes/project.el (project-switch-buffer): Instead of unconditionally reading a project buffer from the user, add buffer-or-name argument, and populate it using project--read-project-buffer when called interactively. Update docstring. --- lisp/progmodes/project.el | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a0930553bd..9534eb2ef6 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -877,14 +877,7 @@ project-compile (default-directory (project-root pr))) (compile command comint))) -;;;###autoload -(defun project-switch-to-buffer () - "Switch to another buffer belonging to the current project. -This function prompts for another buffer, offering as candidates -buffers that belong to the same project as the current buffer. -Two buffers belong to the same project if their project instances, -as reported by `project-current' in each buffer, are identical." - (interactive) +(defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) (other-buffer (other-buffer current-buffer)) @@ -896,13 +889,22 @@ project-switch-to-buffer (equal pr (with-current-buffer (cdr buffer) (project-current))))))) - (switch-to-buffer - (read-buffer - "Switch to buffer: " - (when (funcall predicate (cons other-name other-buffer)) - other-name) - nil - predicate)))) + (read-buffer + "Switch to buffer: " + (when (funcall predicate (cons other-name other-buffer)) + other-name) + nil + predicate))) + +;;;###autoload +(defun project-switch-to-buffer (buffer-or-name) + "Display buffer BUFFER-OR-NAME in the selected window. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical." + (interactive (list (project--read-project-buffer))) + (switch-to-buffer buffer)) (defcustom project-kill-buffers-ignores '("\\*Help\\*") -- 2.27.0 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v2-0002-Add-project-display-buffer-and-project-display-bu.patch >From a86e847607b281643603865c7231e52fb467da9c Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 24 Jul 2020 13:54:49 -0700 Subject: [PATCH v2 2/3] Add project-display-buffer and project-display-buffer-other-frame * lisp/progmodes/project.el (project-display-buffer, project-display-buffer-other-frame): Add commands. --- lisp/progmodes/project.el | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 9534eb2ef6..f674749497 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -906,6 +906,30 @@ project-switch-to-buffer (interactive (list (project--read-project-buffer))) (switch-to-buffer buffer)) +;;;###autoload +(defun project-display-buffer (buffer-or-name) + "Display BUFFER-OR-NAME in some window, without selecting it. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical." + (interactive (list (project--read-project-buffer))) + (display-buffer buffer)) + +;;;###autoload +(defun project-display-buffer-other-frame (buffer-or-name) + "Display BUFFER-OR-NAME preferably in another frame. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical. + +This function uses `display-buffer-other-frame' as a subroutine, +which see for how it is determined where the buffer will be +displayed." + (interactive (list (project--read-project-buffer))) + (display-buffer-other-frame buffer)) + (defcustom project-kill-buffers-ignores '("\\*Help\\*") "Conditions for buffers `project-kill-buffers' should not kill. -- 2.27.0 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v2-0003-Add-project-other-place-commands.patch >From f2b038a73a6868a0b6a3b1396ce670cdeeeb75cc Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 23 Jul 2020 18:55:42 -0700 Subject: [PATCH v2 3/3] Add project other place commands * lisp/progmodes/project.el (project-other-window-map, project-other-frame-map, project--other-place-command, project-other-window-command, project-other-frame-command, project-other-tab-command): Add these functions and maps. * lisp/progmodes/project.el: Bind project-other-window-command to C-x 4 p, project-other-frame-command to C-x 5 p and project-other-tab-command to C-x t p. --- lisp/progmodes/project.el | 67 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index f674749497..7a0bf1fdbf 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -592,6 +592,73 @@ project-prefix-map ;;;###autoload (define-key ctl-x-map "p" project-prefix-map) +;; We can't have these place-specific maps inherit from +;; project-prefix-map because project--other-place-command needs to +;; know which map the key binding came from, as if it came from one of +;; these maps, we don't want to set display-buffer-overriding-action + +(defvar project-other-window-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'project-display-buffer) + map) + "Keymap for project commands that display buffers in other windows.") + +(defvar project-other-frame-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'project-display-buffer-other-frame) + map) + "Keymap for project commands that display buffers in other frames.") + +(defun project--other-place-command (action &optional map) + (let* ((key (read-key-sequence-vector nil t)) + (place-cmd (lookup-key map key)) + (generic-cmd (lookup-key project-prefix-map key)) + (display-buffer-overriding-action (unless place-cmd action))) + (if-let ((cmd (or place-cmd generic-cmd))) + (call-interactively cmd) + (user-error "%s is undefined" (key-description key))))) + +;;;###autoload +(defun project-other-window-command () + "Run project command, displaying resultant buffer in another window. + +The following commands are available: + +\\{project-prefix-map} +\\{project-other-window-map}" + (interactive) + (project--other-place-command '((display-buffer-pop-up-window) + (inhibit-same-window . t)) + project-other-window-map)) + +;;;###autoload (define-key ctl-x-4-map "p" #'project-other-window-command) + +;;;###autoload +(defun project-other-frame-command () + "Run project command, displaying resultant buffer in another frame. + +The following commands are available: + +\\{project-prefix-map} +\\{project-other-frame-map}" + (interactive) + (project--other-place-command '((display-buffer-pop-up-frame)) + project-other-frame-map)) + +;;;###autoload (define-key ctl-x-5-map "p" #'project-other-frame-command) + +;;;###autoload +(defun project-other-tab-command () + "Run project command, displaying resultant buffer in a new tab. + +The following commands are available: + +\\{project-prefix-map}" + (interactive) + (project--other-place-command '((display-buffer-in-new-tab)))) + +;;;###autoload (define-key tab-prefix-map "p" #'project-other-tab-command) + (defun project--value-in-dir (var dir) (with-temp-buffer (setq default-directory dir) -- 2.27.0 --=-=-=-- From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jul 2020 22:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , Eli Zaretskii Cc: contovob@tcd.ie, philip@warpmail.net, 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.15956312745070 (code B ref 42210); Fri, 24 Jul 2020 22:55:02 +0000 Received: (at 42210) by debbugs.gnu.org; 24 Jul 2020 22:54:34 +0000 Received: from localhost ([127.0.0.1]:48920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz6aH-0001Jh-UJ for submit@debbugs.gnu.org; Fri, 24 Jul 2020 18:54:34 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:45028) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz6aE-0001JP-CM; Fri, 24 Jul 2020 18:54:32 -0400 Received: by mail-wr1-f47.google.com with SMTP id b6so9602685wrs.11; Fri, 24 Jul 2020 15:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=1YS9bHxz6jQaO40wFhUqfodd5s6nEQ77xrf6eFqiA2A=; b=PumJ/Jj00OYdb72yasL346AgB+bmgSTfH8odkAz5AlmAt35WOGq4BF9PqegmOYYAeP AK0qrCEvdqLSWP5pK/0MPdipIs+M315RJBA2i1w7CBEAmoVq+05Q9BaC2PkTds4a8WpE 1FimEwg+JNcOUKNrv/IdLEn9p7p0+1dNjAvvU8n6wVCItoXm45BUfWBglNVdtZiBrEMY HwLS7Y8sALQSloHVbj1wkRzEmeDjiS/+Why+RTrKcscBFPd3guge6tlO0SGgyAHnwvUm iSTYdk5G2ZYDGqEJwD/8SeDzMB7uXMTO1I6gtlKL79a9rReAcxZW39OyiVEQoK5k7K/U 2pwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language; bh=1YS9bHxz6jQaO40wFhUqfodd5s6nEQ77xrf6eFqiA2A=; b=RqeJS/t+FdO6xiDZKQLJ2HA/OePWJmmbb7OjpPvW+iI7tUFn96ov93h/K+Hm7yQwG9 9IumMbvf+1cppuSB/kvCLTmhjEFDdJygvj5NdEy4RBT7eo2ymExGeLeovnCTIt2Eo4AE b0D3uyw8yPydo0Z/zOSypdbJfPuqrN7docIlDReCmMYJgryByvCaPYtZk7w6Q40HbLrx /ae5deLPeKYwEGd2UB2cpNUf6jEPWs4v3sgGwlkd9IAT34Iwrr8/JYhVuDGLdudkUtMj 7OlTMy3CKOn3HVr8LKtLgWrb1rMuB5WIsbQvkTrbsL2NRefBc5BGKNR+S4bpXiWy9obr wUIA== X-Gm-Message-State: AOAM532+JEVGH88Nk57erlZ62v9Mb6PXt4IkVLkFcdFGyOKu4JS7FVpw QVxJiH+w43+UgXQ7PiVanh8= X-Google-Smtp-Source: ABdhPJzLkfbuJ9G7GBX0LWyoQMRKAlP1IYpeHEYuqqgYd2FgC853mfCN8caEs8doXCW2Lo6OBvpqjw== X-Received: by 2002:adf:ea0f:: with SMTP id q15mr10136637wrm.113.1595631264284; Fri, 24 Jul 2020 15:54:24 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id q4sm8787186wme.31.2020.07.24.15.54.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Jul 2020 15:54:23 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> <871rl1t0aa.fsf@iris.silentflame.com> <83ft9gevt4.fsf@gnu.org> <87wo2swqx0.fsf@iris.silentflame.com> From: Dmitry Gutov Message-ID: <9e7c9ce3-5f1a-fcfd-c87e-8e549cf4f580@yandex.ru> Date: Sat, 25 Jul 2020 01:54:20 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87wo2swqx0.fsf@iris.silentflame.com> Content-Type: multipart/mixed; boundary="------------DF21B87F1071D9272AAA3A5E" Content-Language: en-US X-Spam-Score: -0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.3 (-) This is a multi-part message in MIME format. --------------DF21B87F1071D9272AAA3A5E Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi Sean, On 25.07.2020 00:20, Sean Whitton wrote: > Okay, then I think the attached addresses feedback received. Thanks! These are good patches, working well. But here's a change on top of yours that simplified things a little, and makes a few things unnecessary (I think). All by using the variable called switch-to-buffer-obey-display-actions. What do you and others think? I'll easily admit to being out of my depth when it comes to window management, so if there are reasons to go with the full-on approach, no objections from me. --------------DF21B87F1071D9272AAA3A5E Content-Type: text/x-patch; charset=UTF-8; name="project-other-place-shorter.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="project-other-place-shorter.diff" diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 7a0bf1fdbf..2cad66e705 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -592,29 +592,12 @@ project-prefix-map ;;;###autoload (define-key ctl-x-map "p" project-prefix-map) -;; We can't have these place-specific maps inherit from -;; project-prefix-map because project--other-place-command needs to -;; know which map the key binding came from, as if it came from one of -;; these maps, we don't want to set display-buffer-overriding-action - -(defvar project-other-window-map - (let ((map (make-sparse-keymap))) - (define-key map "\C-o" #'project-display-buffer) - map) - "Keymap for project commands that display buffers in other windows.") - -(defvar project-other-frame-map - (let ((map (make-sparse-keymap))) - (define-key map "\C-o" #'project-display-buffer-other-frame) - map) - "Keymap for project commands that display buffers in other frames.") - -(defun project--other-place-command (action &optional map) +(defun project--other-place-command (action) (let* ((key (read-key-sequence-vector nil t)) - (place-cmd (lookup-key map key)) - (generic-cmd (lookup-key project-prefix-map key)) - (display-buffer-overriding-action (unless place-cmd action))) - (if-let ((cmd (or place-cmd generic-cmd))) + (cmd (lookup-key project-prefix-map key)) + (display-buffer-overriding-action action) + (switch-to-buffer-obey-display-actions t)) + (if cmd (call-interactively cmd) (user-error "%s is undefined" (key-description key))))) @@ -628,8 +611,7 @@ project-other-window-command \\{project-other-window-map}" (interactive) (project--other-place-command '((display-buffer-pop-up-window) - (inhibit-same-window . t)) - project-other-window-map)) + (inhibit-same-window . t)))) ;;;###autoload (define-key ctl-x-4-map "p" #'project-other-window-command) @@ -642,8 +624,7 @@ project-other-frame-command \\{project-prefix-map} \\{project-other-frame-map}" (interactive) - (project--other-place-command '((display-buffer-pop-up-frame)) - project-other-frame-map)) + (project--other-place-command '((display-buffer-pop-up-frame)))) ;;;###autoload (define-key ctl-x-5-map "p" #'project-other-frame-command) @@ -971,31 +952,7 @@ project-switch-to-buffer project instances, as reported by `project-current' in each buffer, are identical." (interactive (list (project--read-project-buffer))) - (switch-to-buffer buffer)) - -;;;###autoload -(defun project-display-buffer (buffer-or-name) - "Display BUFFER-OR-NAME in some window, without selecting it. -When called interactively, prompts for a buffer belonging to the -current project. Two buffers belong to the same project if their -project instances, as reported by `project-current' in each -buffer, are identical." - (interactive (list (project--read-project-buffer))) - (display-buffer buffer)) - -;;;###autoload -(defun project-display-buffer-other-frame (buffer-or-name) - "Display BUFFER-OR-NAME preferably in another frame. -When called interactively, prompts for a buffer belonging to the -current project. Two buffers belong to the same project if their -project instances, as reported by `project-current' in each -buffer, are identical. - -This function uses `display-buffer-other-frame' as a subroutine, -which see for how it is determined where the buffer will be -displayed." - (interactive (list (project--read-project-buffer))) - (display-buffer-other-frame buffer)) + (switch-to-buffer buffer-or-name)) (defcustom project-kill-buffers-ignores '("\\*Help\\*") --------------DF21B87F1071D9272AAA3A5E-- From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jul 2020 23:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Dmitry Gutov , Eli Zaretskii Cc: contovob@tcd.ie, philip@warpmail.net, 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.15956324106914 (code B ref 42210); Fri, 24 Jul 2020 23:14:02 +0000 Received: (at 42210) by debbugs.gnu.org; 24 Jul 2020 23:13:30 +0000 Received: from localhost ([127.0.0.1]:48944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz6sc-0001nM-4E for submit@debbugs.gnu.org; Fri, 24 Jul 2020 19:13:30 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:55715) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz6sZ-0001n2-Ce; Fri, 24 Jul 2020 19:13:28 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 553AC5C00F5; Fri, 24 Jul 2020 19:13:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 24 Jul 2020 19:13:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=oPJoFxyPdr07yP78nt8oKIOwxy tcTm+lVNErXMGF7Dc=; b=TRAcoe2m3yVn9v87upclASHuPG05FGqtgWX+fOwQEx 4UJcSXvVmgrhsQ4mPDIkqq187Irk1pqJ2IS0K71RICZOgIRB8tPt+L5vNKPhyjxl Ezj8VlJcSFlki4kPZymS7pIuk8OkYWIGz+s8fxvqBLK5R4ZDNBj8mmF7iCd4iOQz 6aBx6C0clK8owf3uCYNsWPWLTnBTP3tj2GZ1wLF9j0G5eHnui3fuI5mXcY7unahS 0XS018P/Z/FBhUE99hO6Q2rpN01+DSvT6N7XOVltAwsF1eWrgEj2hoaWQ/sApGNl 29QtVunJgb2+ECeYl8qFFZSlguZMlv2meD8r+7y6h12Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=oPJoFx yPdr07yP78nt8oKIOwxytcTm+lVNErXMGF7Dc=; b=dhSqk3gGk0OAeliPBcd+Wy 7lT8mw8gR9vh64RrXLwKQ21NgZBAjKjqVF5E7OqbWto3890m3o1nA+6tKIhiKiP3 R5/BSVrrZkOn6C6pLu3aJ0JSCJEy8vRaGxGQnJKP6QD0CAaRcfVSq7xpT74p/gXA du19s1hF1oTU4042y1DU/uP27gJPUcIeT8dG8MFART8iritmdGI8+SANydKUjreT rk19H0PWBBt4ktZOgfu9tWYXmYBIQYORu8b4MjLKAFsPHK/FmSqlnxP4KJxVpddQ voE2eIAf8zmPWWv3HAfUMAYPJuvN1WRGMvWS82fTm/vsLFwNYZWUislIes/XFFTw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrheeggddujecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffujghffffkgggtsehttdertddttddtnecuhfhrohhmpefuvggrnhcuhghh ihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecugg ftrfgrthhtvghrnhepgedtvdehgeffhfffvdeffefhgfejffelhfetveffffektefgtdej tdeivddtveehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <9e7c9ce3-5f1a-fcfd-c87e-8e549cf4f580@yandex.ru> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> <871rl1t0aa.fsf@iris.silentflame.com> <83ft9gevt4.fsf@gnu.org> <87wo2swqx0.fsf@iris.silentflame.com> <9e7c9ce3-5f1a-fcfd-c87e-8e549cf4f580@yandex.ru> Date: Fri, 24 Jul 2020 16:13:20 -0700 Message-ID: <87lfj8wlpr.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) Hello Dmitry, Thanks for taking a look. On Sat 25 Jul 2020 at 01:54AM +03, Dmitry Gutov wrote: > On 25.07.2020 00:20, Sean Whitton wrote: >> Okay, then I think the attached addresses feedback received. Thanks! > > These are good patches, working well. > > But here's a change on top of yours that simplified things a little, and > makes a few things unnecessary (I think). All by using the variable > called switch-to-buffer-obey-display-actions. > > What do you and others think? I don't think this is going to work, for two reasons: - for consistency with the existing C-x 4 C-o binding, C-x 4 p C-o should be bound to project-display-buffer, but C-x p C-o should not, so we cannot add the C-o binding to project-prefix-map, so another map is needed - I suspect that by relying on switch-to-buffer-obey-display-actions, when you use project-display-buffer the other window will end up selected, which is not meant to happen. > I'll easily admit to being out of my depth when it comes to window > management, so if there are reasons to go with the full-on approach, no > objections from me. Right, it's really complicated, so I wrote the patch as conservatively as possible. -- Sean Whitton From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jul 2020 23:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton , Eli Zaretskii Cc: contovob@tcd.ie, philip@warpmail.net, 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.15956343479912 (code B ref 42210); Fri, 24 Jul 2020 23:46:02 +0000 Received: (at 42210) by debbugs.gnu.org; 24 Jul 2020 23:45:47 +0000 Received: from localhost ([127.0.0.1]:48955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz7Nq-0002Zn-Vt for submit@debbugs.gnu.org; Fri, 24 Jul 2020 19:45:47 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:39747) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jz7Np-0002ZX-5N; Fri, 24 Jul 2020 19:45:45 -0400 Received: by mail-wm1-f44.google.com with SMTP id t142so3224036wmt.4; Fri, 24 Jul 2020 16:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NUiuz4dlsJiYw8FuqUjZLG1HUerg1ixJHiVEXWl0aBk=; b=VHApLReUk44V20WSwnHsjN1yJEnPuGDrUt5Jh40Sjxb3E9Wos6JyLLL2qpx9W4M7Li G3qIZKk8MNWr0sIJdLdM+xj3skvErL1IlVZ9qMvxZDQH/svcxute8TSZh7gdCLlzXbUv aV+eR+Dc3W92s4PjqnG80qTGOAnTmSAtda1NH75uQbhCrOhVAxb69qG2WNxyJJeiNAD6 RSsB/FfQqls6+UHdI7FnMYwPnGvv7aizu2uDy7VKhZ0iuFFn0KUCYGRqX9VUpdwFMycG NiNSLub4IquhU0rWqGBUM2UIOQafO+k2FUxML4Phma3aCaDTbpLw3Ey/wxTAUFyVlIwa SOMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NUiuz4dlsJiYw8FuqUjZLG1HUerg1ixJHiVEXWl0aBk=; b=F2Q26QPsF4Ubq8BGeWAKylHW6VuJDVI5w7BHYY4XwzAIzivzGbE0FLlJQqZmqXQedM VQQawesMFFyQKARQldzzPgm/VoJOjBPH5jOOw63u+5cHyKvnXFSVWKpwl10Ep2x40TPe RanWWeTsoQYVWPDRYXNII1dQI/AN7LjhzL4+KbN8/giroRdEuCJ7KEaHGN7bmIWbfDYR y268wb26tSuq0mo4NpHvxTElP0SlmRSyBn/Q9yEVa25eceRPNKkU+kbAtSChJuaRqkRD 3uz0Gy3JbRCEi2WrINToack0+vIKsmyi4rXy0KjevGj2aRreHfNHEs54pjerqn3NlxDa AqPw== X-Gm-Message-State: AOAM533vN78QH7KHekZRbDBkumX1MYrOT2mixAnwq5R1P4YEROpfRZEo hLt1pB2dwVzLN3f3L/rmiPE= X-Google-Smtp-Source: ABdhPJwHp12aj1pJQrjPYSI/YvBruVlzF0ZyJxLtKj8LUIiAcqWJ/jHNFLr8YbYnHTKwNAu9fCmeGQ== X-Received: by 2002:a1c:7511:: with SMTP id o17mr11353212wmc.49.1595634339010; Fri, 24 Jul 2020 16:45:39 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id x204sm13235019wmg.2.2020.07.24.16.45.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Jul 2020 16:45:37 -0700 (PDT) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> <871rl1t0aa.fsf@iris.silentflame.com> <83ft9gevt4.fsf@gnu.org> <87wo2swqx0.fsf@iris.silentflame.com> <9e7c9ce3-5f1a-fcfd-c87e-8e549cf4f580@yandex.ru> <87lfj8wlpr.fsf@iris.silentflame.com> From: Dmitry Gutov Message-ID: <9138a744-5cbe-ced3-b177-14144686163e@yandex.ru> Date: Sat, 25 Jul 2020 02:45:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87lfj8wlpr.fsf@iris.silentflame.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.3 (-) On 25.07.2020 02:13, Sean Whitton wrote: > I don't think this is going to work, for two reasons: > > - for consistency with the existing C-x 4 C-o binding, C-x 4 p C-o > should be bound to project-display-buffer, but C-x p C-o should not, > so we cannot add the C-o binding to project-prefix-map, so another map > is needed > > - I suspect that by relying on switch-to-buffer-obey-display-actions, > when you use project-display-buffer the other window will end up > selected, which is not meant to happen. Fair enough, thank you. I'll wait a day or two for the others to have a chance to leave some closing feedback, and then it's off to master. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 25 Jul 2020 06:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Whitton Cc: 41890@debbugs.gnu.org, 42210@debbugs.gnu.org, juri@linkov.net, contovob@tcd.ie, philip@warpmail.net, dgutov@yandex.ru Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159565772316762 (code B ref 42210); Sat, 25 Jul 2020 06:16:02 +0000 Received: (at 42210) by debbugs.gnu.org; 25 Jul 2020 06:15:23 +0000 Received: from localhost ([127.0.0.1]:49193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzDSo-0004M8-3c for submit@debbugs.gnu.org; Sat, 25 Jul 2020 02:15:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzDSm-0004Ls-Jk; Sat, 25 Jul 2020 02:15:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40882) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzDSg-0000Nx-QY; Sat, 25 Jul 2020 02:15:10 -0400 Received: from [176.228.60.248] (port=2715 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jzDSf-0004vB-Ti; Sat, 25 Jul 2020 02:15:10 -0400 Date: Sat, 25 Jul 2020 09:14:56 +0300 Message-Id: <837dusdstb.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87wo2swqx0.fsf@iris.silentflame.com> (message from Sean Whitton on Fri, 24 Jul 2020 14:20:59 -0700) References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> <871rl1t0aa.fsf@iris.silentflame.com> <83ft9gevt4.fsf@gnu.org> <87wo2swqx0.fsf@iris.silentflame.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.0 (-) > From: Sean Whitton > Cc: dgutov@yandex.ru, juri@linkov.net, contovob@tcd.ie, philip@warpmail.net, > 41890@debbugs.gnu.org, 42210@debbugs.gnu.org > Date: Fri, 24 Jul 2020 14:20:59 -0700 > > Okay, then I think the attached addresses feedback received. Thanks! Thanks, I have only one minor comment: > +(defun project-display-buffer (buffer-or-name) > + "Display BUFFER-OR-NAME in some window, without selecting it. > +When called interactively, prompts for a buffer belonging to the > +current project. Two buffers belong to the same project if their > +project instances, as reported by `project-current' in each > +buffer, are identical." This doc string should mention display-buffer, for the same reasons and with the same surrounding test as how project-display-buffer-other-frame mentions display-buffer-other-frame. From unknown Wed Aug 20 00:02:34 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Jul 2020 05:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42210 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii , dgutov@yandex.ru Cc: contovob@tcd.ie, 41890@debbugs.gnu.org, philip@warpmail.net, 42210@debbugs.gnu.org, juri@linkov.net Received: via spool by 42210-submit@debbugs.gnu.org id=B42210.159574053926743 (code B ref 42210); Sun, 26 Jul 2020 05:16:02 +0000 Received: (at 42210) by debbugs.gnu.org; 26 Jul 2020 05:15:39 +0000 Received: from localhost ([127.0.0.1]:51617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzZ0d-0006xB-4T for submit@debbugs.gnu.org; Sun, 26 Jul 2020 01:15:39 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:39477) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzZ0b-0006wu-76; Sun, 26 Jul 2020 01:15:38 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id E0AE5580246; Sun, 26 Jul 2020 01:15:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 26 Jul 2020 01:15:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=sb2cPq3wvHPQlJRpL3v5b695Wv hP+6gzeL4JYENx/1o=; b=qXMnp4eg5SXG4w45Q0UFzZBimpOnIJGxTDeXVw8bC3 Uixjkd36JB8Ul17xowGjQGsEJ2rDjAuPZ+Vh2aQR/MT+Q/hqcKk8y8ROhXe3U2x1 nZVG0FqqUPvGljWSMhLDWAOjjAhfUqp4OzepgjCmIP7suOqAjvCthuD7D13Qb9iW J4EmRo9k6sBhbUG1svSWyXXGFIZSJX/cKSPC2XBNzETbPAT8tpFso3XNCBTeoViL 6q85YHcyiJFXPKb/Ygc6hfyXYtPaZ9RzAf8ycYfrALexrBZXSnSj4FDOwXxvoDTU a0qnQfJpndwcy+jg6PxqmKqqfiYxcUOEt2bqaP5Dos0w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=sb2cPq 3wvHPQlJRpL3v5b695WvhP+6gzeL4JYENx/1o=; b=Mj0bCOZS7d1Fq3+60o+QQl YKlq0wPcPrY1wnqBpD6UAKphqXjTGX2cIrT+XltALRkX9nFhB5St6F7EEFV2R3mn GkrAr13KcBO1uGWX2aSuiOcYP879M3SLcbQZ6gfn0Sd7ydEAbzVLQEBUFF9T7P9z wj19IZgz6DhC8HDtvwsuq6vUesARZeMBGy/CYMdeoWlqjbtsqEeOVPLNobhP4q5G XMPGZ3OCycUlsY8Ra0TyvS+Sasu4nWkwT1f67BRhelJxGu3LYxdBBuQMUIhHv8N9 WU74qW4yw5Hvh3s6/MOvYGzgpi8FcKpi9UeVh69iqcPAdaO9UANDoFikoI4sy2XA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrheeigdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fhohhrsghiugguvghnufhorhhtjfgurhculdehtddtmdenucfjughrpefhvffujghffffk gggtsehmtderredttddtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhh hithhtohhnsehsphifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepieff hfffudfhjefgfeeuleeutdevtdektdehiefgieetleevveekgeduhedtudefnecuhfhorh gsihguuggvnhfuohhrthfjughrpeffhffkuffvgggjtghfsehmtderredttddtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtth honhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton In-Reply-To: <837dusdstb.fsf@gnu.org> References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> <871rl1t0aa.fsf@iris.silentflame.com> <83ft9gevt4.fsf@gnu.org> <87wo2swqx0.fsf@iris.silentflame.com> <837dusdstb.fsf@gnu.org> Date: Sat, 25 Jul 2020 22:15:30 -0700 Message-ID: <87365ec0wd.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.7 (-) --=-=-= Content-Type: text/plain Hello, On Sat 25 Jul 2020 at 09:14AM +03, Eli Zaretskii wrote: > This doc string should mention display-buffer, for the same reasons > and with the same surrounding test as how > project-display-buffer-other-frame mentions > display-buffer-other-frame. Thank you, fixed, along with fixing some references to function arguments which were incorrect in the previous series (they were 'buffer-or-name' in one place but 'buffer' in another). -- Sean Whitton --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v3-0001-Factor-out-project-read-project-buffer-from-proje.patch >From 08394aa143a5e0fc627e259b4deee3a1c3317960 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 24 Jul 2020 13:36:39 -0700 Subject: [PATCH v3 1/3] Factor out project--read-project-buffer from project-switch-buffer * lisp/progmodes/project.el (project--read-project-buffer): New function extracted from project-switch-buffer. * lisp/progmodes/project.el (project-switch-buffer): Instead of unconditionally reading a project buffer from the user, add buffer-or-name argument, and populate it using project--read-project-buffer when called interactively. Update docstring. --- lisp/progmodes/project.el | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a0930553bd..9534eb2ef6 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -877,14 +877,7 @@ project-compile (default-directory (project-root pr))) (compile command comint))) -;;;###autoload -(defun project-switch-to-buffer () - "Switch to another buffer belonging to the current project. -This function prompts for another buffer, offering as candidates -buffers that belong to the same project as the current buffer. -Two buffers belong to the same project if their project instances, -as reported by `project-current' in each buffer, are identical." - (interactive) +(defun project--read-project-buffer () (let* ((pr (project-current t)) (current-buffer (current-buffer)) (other-buffer (other-buffer current-buffer)) @@ -896,13 +889,22 @@ project-switch-to-buffer (equal pr (with-current-buffer (cdr buffer) (project-current))))))) - (switch-to-buffer - (read-buffer - "Switch to buffer: " - (when (funcall predicate (cons other-name other-buffer)) - other-name) - nil - predicate)))) + (read-buffer + "Switch to buffer: " + (when (funcall predicate (cons other-name other-buffer)) + other-name) + nil + predicate))) + +;;;###autoload +(defun project-switch-to-buffer (buffer-or-name) + "Display buffer BUFFER-OR-NAME in the selected window. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical." + (interactive (list (project--read-project-buffer))) + (switch-to-buffer buffer)) (defcustom project-kill-buffers-ignores '("\\*Help\\*") -- 2.27.0 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v3-0002-Add-project-display-buffer-and-project-display-bu.patch >From 61fc6615a7c438777ca80f71934979dfd029f0de Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 24 Jul 2020 13:54:49 -0700 Subject: [PATCH v3 2/3] Add project-display-buffer and project-display-buffer-other-frame * lisp/progmodes/project.el (project-display-buffer, project-display-buffer-other-frame): Add commands. --- lisp/progmodes/project.el | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 9534eb2ef6..0288635fb8 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -904,7 +904,34 @@ project-switch-to-buffer project instances, as reported by `project-current' in each buffer, are identical." (interactive (list (project--read-project-buffer))) - (switch-to-buffer buffer)) + (switch-to-buffer buffer-or-name)) + +;;;###autoload +(defun project-display-buffer (buffer-or-name) + "Display BUFFER-OR-NAME in some window, without selecting it. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical. + +This function uses `display-buffer' as a subroutine, which see +for how it is determined where the buffer will be displayed." + (interactive (list (project--read-project-buffer))) + (display-buffer buffer-or-name)) + +;;;###autoload +(defun project-display-buffer-other-frame (buffer-or-name) + "Display BUFFER-OR-NAME preferably in another frame. +When called interactively, prompts for a buffer belonging to the +current project. Two buffers belong to the same project if their +project instances, as reported by `project-current' in each +buffer, are identical. + +This function uses `display-buffer-other-frame' as a subroutine, +which see for how it is determined where the buffer will be +displayed." + (interactive (list (project--read-project-buffer))) + (display-buffer-other-frame buffer)) (defcustom project-kill-buffers-ignores '("\\*Help\\*") -- 2.27.0 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=v3-0003-Add-project-other-place-commands.patch >From 5cc1998dc965d41955ebf8ee2deed7dbcd8e96a8 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 23 Jul 2020 18:55:42 -0700 Subject: [PATCH v3 3/3] Add project other place commands * lisp/progmodes/project.el (project-other-window-map, project-other-frame-map, project--other-place-command, project-other-window-command, project-other-frame-command, project-other-tab-command): Add these functions and maps. * lisp/progmodes/project.el: Bind project-other-window-command to C-x 4 p, project-other-frame-command to C-x 5 p and project-other-tab-command to C-x t p. --- lisp/progmodes/project.el | 67 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 0288635fb8..3efe0c1ce3 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -592,6 +592,73 @@ project-prefix-map ;;;###autoload (define-key ctl-x-map "p" project-prefix-map) +;; We can't have these place-specific maps inherit from +;; project-prefix-map because project--other-place-command needs to +;; know which map the key binding came from, as if it came from one of +;; these maps, we don't want to set display-buffer-overriding-action + +(defvar project-other-window-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'project-display-buffer) + map) + "Keymap for project commands that display buffers in other windows.") + +(defvar project-other-frame-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-o" #'project-display-buffer-other-frame) + map) + "Keymap for project commands that display buffers in other frames.") + +(defun project--other-place-command (action &optional map) + (let* ((key (read-key-sequence-vector nil t)) + (place-cmd (lookup-key map key)) + (generic-cmd (lookup-key project-prefix-map key)) + (display-buffer-overriding-action (unless place-cmd action))) + (if-let ((cmd (or place-cmd generic-cmd))) + (call-interactively cmd) + (user-error "%s is undefined" (key-description key))))) + +;;;###autoload +(defun project-other-window-command () + "Run project command, displaying resultant buffer in another window. + +The following commands are available: + +\\{project-prefix-map} +\\{project-other-window-map}" + (interactive) + (project--other-place-command '((display-buffer-pop-up-window) + (inhibit-same-window . t)) + project-other-window-map)) + +;;;###autoload (define-key ctl-x-4-map "p" #'project-other-window-command) + +;;;###autoload +(defun project-other-frame-command () + "Run project command, displaying resultant buffer in another frame. + +The following commands are available: + +\\{project-prefix-map} +\\{project-other-frame-map}" + (interactive) + (project--other-place-command '((display-buffer-pop-up-frame)) + project-other-frame-map)) + +;;;###autoload (define-key ctl-x-5-map "p" #'project-other-frame-command) + +;;;###autoload +(defun project-other-tab-command () + "Run project command, displaying resultant buffer in a new tab. + +The following commands are available: + +\\{project-prefix-map}" + (interactive) + (project--other-place-command '((display-buffer-in-new-tab)))) + +;;;###autoload (define-key tab-prefix-map "p" #'project-other-tab-command) + (defun project--value-in-dir (var dir) (with-temp-buffer (setq default-directory dir) -- 2.27.0 --=-=-=-- From unknown Wed Aug 20 00:02:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Sean Whitton Subject: bug#42210: closed (Re: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el) Message-ID: References: <66172cd6-3464-fe83-feda-e89e7b9a3338@yandex.ru> <87tuymh4k9.fsf@iris.silentflame.com> X-Gnu-PR-Message: they-closed 42210 X-Gnu-PR-Package: emacs Reply-To: 42210@debbugs.gnu.org Date: Mon, 27 Jul 2020 00:02:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1595808122-18560-1" This is a multi-part message in MIME format... ------------=_1595808122-18560-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #42210: Add -other-window variants of project-prefix-map commands which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 42210@debbugs.gnu.org. --=20 42210: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D42210 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1595808122-18560-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 42210-done) by debbugs.gnu.org; 27 Jul 2020 00:01:18 +0000 Received: from localhost ([127.0.0.1]:53570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzqZy-0004oC-3k for submit@debbugs.gnu.org; Sun, 26 Jul 2020 20:01:18 -0400 Received: from mail-wm1-f49.google.com ([209.85.128.49]:40222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzqZv-0004nw-Bm; Sun, 26 Jul 2020 20:01:17 -0400 Received: by mail-wm1-f49.google.com with SMTP id k20so5342249wmi.5; Sun, 26 Jul 2020 17:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=DvBQVsiHKoCOXFyXzl+goJ6CcLTF5hnJVpjqz+Io/NM=; b=UUq7BIWLI0cJvUNWOMtwyyW9xAcbsdf/7Ka/VvJP9SFZFCB0xQY9Pc4OKkST5mPp83 I0Q+7Z9I7yl2mem05R1FiycyDraVBRNsOpMaz3HtiBtC6lGnEwFnpYR4QhnWzrs8Ta1V wPYxekKWCcAamVkhJjY2oENUqd3fjhQxBm6opeWkr++l564o8OYXYBxYDbqHa+RMdVnu F3+hBadDgzXfhgv6Rfm5IyUktPx+fsrYXIDl7EP0ZsUDqN/bSdP1PsNDIA1RyxJHc415 iKv2gjTDqxHjcZAM89RBhG2nmspieldcrKTnj4pYHrdYtb9eWpX5p4v8zh5UCh6f6XM+ vVyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DvBQVsiHKoCOXFyXzl+goJ6CcLTF5hnJVpjqz+Io/NM=; b=BT9aTVfzFVwNS9OJBeA2cQuagz+B3ebCq+eHG0Zmgzi7dIORCAzoOigXq4DFA6fm7f FtIn+rdbBNvJsgtyOEHBdQ3VZzDy+kAda1jYasBs0//SUbths9pwTIxb4qNUvO/hUo8M vwkC3kT2j1x51YXz5vog3cfJx35kM1+YM+pb/9VM4SKhCncx3Tw8ke0hs53wMUXifack DCrCW90rzauJh8G5L/X33IBAjTau30vsXCdK3TfRaV1T1HTpDgFbnwLleTBM88LKoYx3 eIHKwENcWcWbGj7nGc2iqbxyn31J59CMzfQa1q9T1RW2PiOVXkP9B2273cklvelo7Q4a RrFA== X-Gm-Message-State: AOAM533InICHJZfX5vpooAr/fBy6GorrI/PwSulk338shSknmSCg2Zoh 2hGBVmIBd+vgdEGTAJt2s0k= X-Google-Smtp-Source: ABdhPJxu4CTPBzrKn9i/VBZPzTtmyaHJBK5swdbW5n7t4MBQ4ArC3pjNmjpWs6Vx5hXMxQ/HAtAqbw== X-Received: by 2002:a1c:e405:: with SMTP id b5mr19304446wmh.54.1595808069315; Sun, 26 Jul 2020 17:01:09 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id t133sm17079449wmf.0.2020.07.26.17.01.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Jul 2020 17:01:08 -0700 (PDT) Subject: Re: bug#42210: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el To: Sean Whitton , Eli Zaretskii References: <87mu50b43d.fsf@warpmail.net> <87pn92t1ye.fsf@iris.silentflame.com> <874kqcsnu5.fsf@iris.silentflame.com> <54a1ed24-9d0e-4671-eb70-9d8c253e7aac@yandex.ru> <87y2ngg64e.fsf@iris.silentflame.com> <99e82681-e645-2888-3d24-26698ee0c7e0@yandex.ru> <871rl6gmip.fsf@iris.silentflame.com> <874kq1d7wf.fsf@iris.silentflame.com> <87zh7s8mlv.fsf@mail.linkov.net> <87blk849lh.fsf@iris.silentflame.com> <87tuxz2vt8.fsf@iris.silentflame.com> <1d2621fe-2e06-cc2d-3c3f-b44d61427ac2@yandex.ru> <878sf9u0rm.fsf@iris.silentflame.com> <83sgdhe9jc.fsf@gnu.org> <871rl1t0aa.fsf@iris.silentflame.com> <83ft9gevt4.fsf@gnu.org> <87wo2swqx0.fsf@iris.silentflame.com> <837dusdstb.fsf@gnu.org> <87365ec0wd.fsf@iris.silentflame.com> From: Dmitry Gutov Message-ID: <66172cd6-3464-fe83-feda-e89e7b9a3338@yandex.ru> Date: Mon, 27 Jul 2020 03:01:06 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87365ec0wd.fsf@iris.silentflame.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.2 (/) X-Debbugs-Envelope-To: 42210-done Cc: contovob@tcd.ie, 41890@debbugs.gnu.org, philip@warpmail.net, 42210-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -1.2 (-) On 26.07.2020 08:15, Sean Whitton wrote: > Thank you, fixed, along with fixing some references to function > arguments which were incorrect in the previous series (they were > 'buffer-or-name' in one place but 'buffer' in another). Applied and pushed. Thanks all! With that, I'm closing the associated bug report. Please file new reports for any follow-up patches. ------------=_1595808122-18560-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Jul 2020 06:14:08 +0000 Received: from localhost ([127.0.0.1]:59924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrxuh-00055z-Oi for submit@debbugs.gnu.org; Sun, 05 Jul 2020 02:14:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:55466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrxuf-00055r-EZ for submit@debbugs.gnu.org; Sun, 05 Jul 2020 02:14:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrxuf-0001kY-9M for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 02:14:05 -0400 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:60695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrxud-0004J1-0h for bug-gnu-emacs@gnu.org; Sun, 05 Jul 2020 02:14:04 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id C4BBFB61 for ; Sun, 5 Jul 2020 02:13:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 05 Jul 2020 02:13:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm3; bh=rw8ixvYeHzCGzTjnspoVzJkRIj JWuacy8KiPHdlQH2I=; b=HwzoRh6Izwj+sPhZZAH+Q3eP+8x+okzBBS9DZyWCeP ZV13GHiB7eoQUQg6BhRMLqMbJFInSREXN7W/YfCaNShtDRW+MVJvE6fs48JG7+9m 1cx2XlVrVuYf1FoUZLaCu8q9prIUWmMJi3IMPCKYreF5TDH9tWcHEM7f1RifRrn4 /DiMaek6tUOeHYS/a+yJDjitWwdiXyi0Cvqa98ajw0B/Oro65BPM65uMSy+T2bQT 57v0FZ0XYr3CfMdcJVDp4Sf6hAmk5Vy83DA/kWkt4yNyFlx34ez1I7N4nLTLoGfz XGzoYktARU45auXXHK7ecyVY3PGq1MXbGKfj16pAFKkA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=rw8ixv YeHzCGzTjnspoVzJkRIjJWuacy8KiPHdlQH2I=; b=QTdbREuRn4vRZ7rUk3JfW4 Iuempwcg8uWARWYE2rlvNp19SV0Q65zAD4FRlCyG1oyOMVOUZ1QO0uL3PLLKla+8 MRUmeuGFNmkvIiukwyIWlWZPdH7UxIOMG5xPBdkuejd2rxZTAsBRcoeMDqK8LX2F AtEX+z8XmEXGaFbaHQVKIMAqXZT2dAMcWoT1yuiZABagnsDtYQjOzmXbnAVoFulw ahdmjnM8WgyoRWXEo92u/XMZQ7EG59cj0Teug7jRoR5HD40d/zNWdBnfZ0EqCOuZ jamwCQV6eBN3SD8MaWZpQCApxUi3mTn7faDLE+QoIUXDLV8b8DWCYRgGsAe9/Opw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedruddtgddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuogfhohhrsghiugguvghnufhorhhtjfgurhculdehtd dtmdenucfjughrpefhvffujghffffkgggtsehmtderredttddtnecuhfhrohhmpefuvggr nhcuhghhihhtthhonhcuoehsphifhhhithhtohhnsehsphifhhhithhtohhnrdhnrghmvg eqnecuggftrfgrthhtvghrnhepieffhfffudfhjefgfeeuleeutdevtdektdehiefgieet leevveekgeduhedtudefnecuhfhorhgsihguuggvnhfuohhrthfjughrpeffhffkuffvgg gjtghfsehmtderredttddtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhihhtthhonhdrnhgrmhgv X-ME-Proxy: From: Sean Whitton To: bug-gnu-emacs@gnu.org Subject: Add -other-window variants of project-prefix-map commands In-Reply-To: <87blkw5cd3.fsf@iris.silentflame.com> References: <87blkw5cd3.fsf@iris.silentflame.com> X-debbugs-cc: juri@linkov.net, dgutov@yandex.ru Date: Sat, 04 Jul 2020 23:13:58 -0700 Message-ID: <87tuymh4k9.fsf@iris.silentflame.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=64.147.123.26; envelope-from=spwhitton@spwhitton.name; helo=wnew1-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/05 02:14:00 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.6 (--) --=-=-= Content-Type: text/plain Hello, On Fri 03 Jul 2020 at 05:54PM -07, Sean Whitton wrote: > It seems like it would be a good idea to have > > C-x 4 p f > be like > C-x 4 4 C-x p f > > C-x 5 p e > be like > C-x 5 5 C-x p e > > etc., since many of the commands in project-prefix-map involve switching > to another buffer. Certainly project-switch-project, project-find-file > and project-switch-to-buffer would be wanted. Here is a patch implementing commands under C-x 4 p. If the approach is thought sound I can also prepare patches for C-x 5 p and C-x t p. I have tested the attached change except for the autoload cookies which I am not sure will work with my new macro. And I'm not sure I should be doing this with a macro instead of a function which calls fset -- please advise. If you want me to do copyright assignment before investing time giving me feedback on my patch, I would be happy to. -- Sean Whitton --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-define-other-window-command-and-project-other-wi.patch >From bc52db3611612fc595793fd5f2aebd4a7d9bdb59 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 4 Jul 2020 22:40:36 -0700 Subject: [PATCH] Add define-other-window-command and project-other-window-prefix-map * lisp/progmodes/project.el: Add project-other-window-prefix-map, bind to C-x 4 p, and use define-other-window-command to define the map's commands. * lisp/window.el: Add define-other-window-command. --- lisp/progmodes/project.el | 28 ++++++++++++++++++++++++++++ lisp/window.el | 17 +++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 0a15939d24..3a0034b24a 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -512,6 +512,19 @@ project-prefix-map ;;;###autoload (define-key ctl-x-map "p" project-prefix-map) +;;;###autoload +(defvar project-other-window-prefix-map + (let ((map (make-sparse-keymap))) + (define-key map "f" 'project-find-file-other-window) + (define-key map "b" 'project-switch-to-buffer-other-window) + (define-key map "d" 'project-dired-other-window) + (define-key map "e" 'project-eshell-other-window) + (define-key map "p" 'project-switch-project-other-window) + map) + "Keymap for -other-window project commands.") + +;;;###autoload (define-key ctl-x-4-map "p" project-other-window-prefix-map) + (defun project--value-in-dir (var dir) (with-temp-buffer (setq default-directory dir) @@ -864,6 +877,21 @@ project-kill-buffers (length bufs) (project-root pr))) (mapc #'kill-buffer bufs)))) +;;;###autoload +(define-other-window-command project-find-file) + +;;;###autoload +(define-other-window-command project-switch-to-buffer) + +;;;###autoload +(define-other-window-command project-dired) + +;;;###autoload +(define-other-window-command project-eshell) + +;;;###autoload +(define-other-window-command project-switch-project) + ;;; Project list diff --git a/lisp/window.el b/lisp/window.el index 675aff041b..519e15ac79 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4042,6 +4042,23 @@ same-window-prefix 'reuse))) (message "Display next command buffer in the same window...")) +(defmacro define-other-window-command (function) + "Define a version of FUNCTION which displays its buffer in another window. + +The new function will be named 'FUNCTION-other-window'." + (let ((other-window-function + (intern (concat (symbol-name function) "-other-window")))) + `(defun ,other-window-function (&rest args) + ,(concat "Like `" (symbol-name function) + "' but prefer to display resultant buffer in another window.") + ,@(if (commandp function) '((interactive)) '()) + (let ((display-buffer-overriding-action + '((display-buffer-pop-up-window) + (inhibit-same-window . t)))) + (if (called-interactively-p) + (call-interactively ',function) + (apply ',function args)))))) + ;; This should probably return non-nil when the selected window is part ;; of an atomic window whose root is the frame's root window. (defun one-window-p (&optional nomini all-frames) -- 2.26.2 --=-=-=-- ------------=_1595808122-18560-1--