From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Philip K." Newsgroups: gmane.emacs.bugs Subject: bug#41890: 28.0.50; [PATCH]: Add bindings for project.el Date: Fri, 19 Jun 2020 12:26:45 +0200 Message-ID: <87h7v7qrkq.fsf@warpmail.net> References: <87blljbarq.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="114316"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 41890@debbugs.gnu.org, dgutov@yandex.ru, juri@linkov.net To: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 19 12:28:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jmEFo-000TbM-9g for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Jun 2020 12:28:13 +0200 Original-Received: from localhost ([::1]:60988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmEFn-00009l-4X for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 19 Jun 2020 06:28:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55782) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jmEFe-00009Z-Ao for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 06:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jmEFe-0007QP-0p for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 06:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jmEFd-0008Ii-Tk for bug-gnu-emacs@gnu.org; Fri, 19 Jun 2020 06:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Philip K." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jun 2020 10:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41890 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 41890-submit@debbugs.gnu.org id=B41890.159256242431839 (code B ref 41890); Fri, 19 Jun 2020 10:28:01 +0000 Original-Received: (at 41890) by debbugs.gnu.org; 19 Jun 2020 10:27:04 +0000 Original-Received: from localhost ([127.0.0.1]:55179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmEEe-0008H9-Df for submit@debbugs.gnu.org; Fri, 19 Jun 2020 06:27:04 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:58981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmEEY-0008Gs-Pb for 41890@debbugs.gnu.org; Fri, 19 Jun 2020 06:26:58 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 480D75C011A; Fri, 19 Jun 2020 06:26:49 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 19 Jun 2020 06:26:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h= from:to:cc:subject:in-reply-to:date:message-id:mime-version :content-type:content-transfer-encoding; s=fm3; bh=yuMuz8WWJYIDD rpDp2Z3TyjSw7tyKOD/q6kNy3b78Yg=; b=kSPJLr+NLOBUHLRTjTXoIrC6oTCOk 4Sg9RDlM/hRhlOa0Quc12L3cVFNImZYb4E4Oy6cK342AYnFpl5ESUDQ1ypcdhe5r BOw2veKXrCUV87sB6xXWQ8ZvmJS2cgUaOmy0+6Wgr3TwAT2QnsINuTWwcsJ9Oq8J OJHMQKnm51mO6ZliFV1oFm5uyenZyipCEvHAxTTkHdSYfEhdB3rOxxVScB7q0OWQ YX7foYbkAhHiGAzrkQiARe4Izdqgev2wr4VEYJanPdfuPspw3ZDtEAhFSL6iAcdM IxMnAS77S3i5imD/vI76ctty8spfiilLFvVIDFMQp562lvYc6NZzsE3tQ== 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:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=yuMuz8WWJYIDDrpDp2Z3TyjSw7tyKOD/q6kNy3b78Yg=; b=Jgb+cJLS UQZ+sqI0+2sh7I7kQFbf5wnmVjcbopfAUfGLmulIkiqK+yDyVPW/qloARVTMffXg 2qIn6BtLMyWIaTyWeAjRI09iSAVhicO8D1l5s2s26UlAfL6/AIe5fI2Vk4BMRYk9 1IENg+GIGBYD9CYF9uwR7G7ZId8zCZEpDS2/BhEJvU1SxWcCBYITHx957pzPggCm 8kLiea6i0ItAo7D+UKjQS1csyYE+Vsj1EfxE9vkPoR7+TqP8YuBf8qWDrHJnxKVJ T7hZfpl8qT4Eq89v8PCUWfTCFIgkw7FaoeJyhSCbD10C4d+pBiahdU7D0VTPO5th w8hi7gxZkC1txw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudejiedgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfffkgggtgfesthhqredttddtjeenucfhrhhomhepfdfrhhhilhhi phcumfdrfdcuoehphhhilhhiphesfigrrhhpmhgrihhlrdhnvghtqeenucggtffrrghtth gvrhhnpeeuuefgkefhtdeuhfeghefhgfevheevleejvdehuedukeduieehhfevgfekfeef leenucffohhmrghinhepghhnuhdrohhrghenucfkphepjeelrddvudelrdduleelrddvud ehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhh ihhlihhpseifrghrphhmrghilhdrnhgvth X-ME-Proxy: Original-Received: from localhost (p4fdbc7d7.dip0.t-ipconnect.de [79.219.199.215]) by mail.messagingengine.com (Postfix) with ESMTPA id 12856306215A; Fri, 19 Jun 2020 06:26:47 -0400 (EDT) In-Reply-To: <87a70zqs7i.fsf@runbox.com> (message from Simen =?UTF-8?Q?Heggest=C3=B8yl?= on Fri, 19 Jun 2020 12:13:05 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182177 Archived-At: Simen Heggest=C3=B8yl writes: > Dmitry Gutov writes: > >> On 18.06.2020 17:09, Philip K. wrote: >> >>> The patch below fixes that, but allows changing if you only want the >>> listed keys to be valid (the default) or every key in >>> project-prefix-map. >>> It turned out that the transiment map approach didn't work, as it >>> ignored the value in default-directory, thus running all commands in >>> whatever the current project was. >> >> Looks reasonable to me. But let's also hear from the original author. >> >> Simen, what do you think? The patch is at >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41890#127. > > Looks good to me too! > > My only gripe would be that it makes it a bit harder to add new > commands, since it now requires modifying both project-switch-commands > and project-prefix\-map.=20 As in for developers, when they want to contribute a new project-* function or users who want to just change stuff (I know the line might be blury)? > Maybe we could reintroduce the helper function we had for that purpose > earlier. I missed when this happened. In what commit was it removed, or was it just in a patch? > -(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")) > > The project-shell command is added here, don't know if that was > intentional? No, this must have been a local git mistake. > Also why not stick with the easier extensible list format? I could > imagine for instance adding long descriptions as an optimal third > element for the commands later on. The main reason I changed it was so that the alist was recognized as an alist in customize, but I agree that changing this would be good for forwards compatibility. --=20 Philip K.