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.devel Subject: Re: New feature in project.el: Remembering the previously used projects Date: Fri, 05 Jun 2020 15:59:15 +0200 Message-ID: <87a71hsjf0.fsf@warpmail.net> References: <87a71hvi3b.fsf@bulbul> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="64789"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: simenheg@runbox.com, contovob@tcd.ie, juri@linkov.net, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jun 05 16:00:33 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jhCtd-000Gph-D3 for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Jun 2020 16:00:33 +0200 Original-Received: from localhost ([::1]:38946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhCtc-0007fS-DU for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Jun 2020 10:00:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhCsT-0006PC-2x for emacs-devel@gnu.org; Fri, 05 Jun 2020 09:59:21 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhCsS-0003Iu-0a for emacs-devel@gnu.org; Fri, 05 Jun 2020 09:59:20 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 4FA235C014E; Fri, 5 Jun 2020 09:59:19 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 05 Jun 2020 09:59:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h= from:to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=fm3; bh=yk+coeP7xvzS/1NPGDJijFyVTE DfHumqJEBKufD226o=; b=p4h9NBRFYhZaxGqVk3QpY4+F45k9sSUsjr/5bun/2M KpndM3QQWrBGaZrMVJ79/K7OyG1ZoYCl8rZJivzYCwhwiZytPmxxKJnLvZQYn+ba FWOOiH5fIUTgsV79qAG8otYIqfCzIy0xsl6pH8Acqz1/unj5W6uOMtvUmIjO8oI+ lGicwlwyAwR+v/UAnwcpXv3eoUTIZgwPXfqhBUuLpu27MzQxY8eHwV39jPzyR0fg jjntnfvFL//VaFVZnGhpIznSWMEXzmFPppO0tG9y4purO4S1KEsGq8h8McFCpI4N qGiMMA3RgY68ArsomXKt+GxNF0kfTewiL8ZodbVcKWwA== 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=yk+coe P7xvzS/1NPGDJijFyVTEDfHumqJEBKufD226o=; b=nW3Yt8lXWpzwZWLT18Q4A5 z/uBGagECQrVm0h7FXbrydPVy3+ElcZdsVNcBZTYp7YL1YzG1GEXHKkp2ddt3S4k wzXdDzD+dx1A+b1I88fLH7RLK6/4I2L2B48jc1SP4zvelEwOqZBchLU+5F5ff//u CRIryWeImw9uhFSH49LOPiGiBC1iHBccl7auKOA56hIaNQS64IGe/EkMedeT6Zfk E5m5xn3R9CVV3thq1dre2mx8FLNUcon0fnvt07WYUihqIWwIm8TKE3Uob+9eaoYJ pdC3fiHdgksXVe71QcOa27fvSZWLBN2weLZF2Ap4roqtJViiTS+4DWVo7bbGxebg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudegfedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpedfrfhhihhl ihhpucfmrddfuceophhhihhlihhpseifrghrphhmrghilhdrnhgvtheqnecuggftrfgrth htvghrnhepveeigefgkeeghfelvdejieehvdfghffftdeivdehjeefveeltdefgeeikeel feeinecukfhppeejledrvdduledrudelhedrudeftdenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphesfigrrhhpmhgrihhlrdhn vght X-ME-Proxy: Original-Received: from localhost (p4fdbc382.dip0.t-ipconnect.de [79.219.195.130]) by mail.messagingengine.com (Postfix) with ESMTPA id 59DB53061DC5; Fri, 5 Jun 2020 09:59:18 -0400 (EDT) In-Reply-To: <87a71hvi3b.fsf@bulbul> (Philip K.'s message of "Fri, 05 Jun 2020 13:59:36 +0200") Received-SPF: pass client-ip=66.111.4.28; envelope-from=philip@warpmail.net; helo=out4-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/05 09:59:19 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:251899 Archived-At: --=-=-= Content-Type: text/plain philip@warpmail.net (Philip K.) writes: > Sure, I'll try it out. An initial attempt attached below. It seems like everything works, the only thing I wasn't sure about was execute-extended-command's "typed" argument, since it seems to always be nil, when invoked interactivly? -- Philip K. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Add-project-execute-command.patch >From 192bdfe0b775c0456fe0ec45b58134b3d2630913 Mon Sep 17 00:00:00 2001 From: Philip K Date: Fri, 5 Jun 2020 15:07:04 +0200 Subject: [PATCH] Add project-execute-command --- lisp/progmodes/project.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index a94a27dbc2..e8c35a0fb1 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -744,6 +744,15 @@ project-compile (default-directory (project-root pr))) (compile command comint))) +;;;###autoload +(defun project-execute-command (prefix command) + "Execute an extended COMMAND in project root." + (interactive (list current-prefix-arg + (read-extended-command))) + (let* ((pr (project-current t)) + (default-directory (project-root pr))) + (execute-extended-command prefix command))) + ;;; Project list @@ -830,7 +839,8 @@ project-switch-commands ("d" "Dired" project-dired) ("v" "VC-Dir" project-vc-dir) ("s" "Shell" project-shell) - ("e" "Eshell" project-eshell)) + ("e" "Eshell" project-eshell) + ("x" "Execute command" project-execute-command)) "Alist mapping keys to project switching menu entries. Used by `project-switch-project' to construct a dispatch menu of commands available upon \"switching\" to another project. -- 2.26.2 --=-=-=--