From unknown Tue Jun 17 01:28:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#66317 <66317@debbugs.gnu.org> To: bug#66317 <66317@debbugs.gnu.org> Subject: Status: Project mode-line Reply-To: bug#66317 <66317@debbugs.gnu.org> Date: Tue, 17 Jun 2025 08:28:25 +0000 retitle 66317 Project mode-line reassign 66317 emacs submitter 66317 Juri Linkov severity 66317 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 02:32:21 2023 Received: (at submit) by debbugs.gnu.org; 3 Oct 2023 06:32:21 +0000 Received: from localhost ([127.0.0.1]:38560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnYxB-000770-AA for submit@debbugs.gnu.org; Tue, 03 Oct 2023 02:32:21 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnYx9-00076k-Jx for submit@debbugs.gnu.org; Tue, 03 Oct 2023 02:32:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnYwn-0000aH-9o for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2023 02:31:57 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnYwl-0002Zb-Dq for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2023 02:31:57 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 3C84AE000A for ; Tue, 3 Oct 2023 06:31:48 +0000 (UTC) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: Project mode-line Organization: LINKOV.NET Date: Tue, 03 Oct 2023 09:29:23 +0300 Message-ID: <86jzs4ntxb.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=2001:4b98:dc4:8::224; envelope-from=juri@linkov.net; helo=relay4-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) 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: -0.3 (/) --=-=-= Content-Type: text/plain Here is the implementation of the mode-line project indicator prepended before the vc indicator with the project menu discussed in bug#63469: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=project-mode-line.patch diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 2e6ae89a443..8798feb2c56 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -2010,5 +2102,20 @@ project-uniquify-dirname-transform (file-relative-name dirname root)))) dirname)) +;;; Project mode-line + +(let ((form '(:eval (when-let (project (project-current)) + (concat " " + (propertize + (project-name project) + 'mouse-face 'mode-line-highlight + 'local-map + (make-mode-line-mouse-map + 'down-mouse-1 + `(menu-item "Project" + ,menu-bar-project-menu)))))))) + (when-let (pos (seq-position mode-line-format '(vc-mode vc-mode))) + (cl-pushnew form (nthcdr pos mode-line-format)))) + (provide 'project) ;;; project.el ends here --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 04:07:22 2023 Received: (at 66317) by debbugs.gnu.org; 3 Oct 2023 08:07:22 +0000 Received: from localhost ([127.0.0.1]:38654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnaR8-0001Kb-B4 for submit@debbugs.gnu.org; Tue, 03 Oct 2023 04:07:22 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:39768 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnaR6-0001KT-Au for 66317@debbugs.gnu.org; Tue, 03 Oct 2023 04:07:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1696320422; bh=yP0qkMW+oxhzvc5oHaIZ+KICh7BHa/tSGT2ZtaaWF+A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=qEygtMKRkz3omvN1vHv/eSIRxxx1DBotHsuAnYSmjt/4KMaGcP0FuIgyV9kL+GWf4 F9IB33K0SDimP6txIf8aUmVOFum1dRDIuNSOAZE1JMVUh5MeQu49oO3NpRQ1FSGhS4 yvbgGHISYT2l/QmqIK7IKFsuEwZ//ZX9dWlmBWpIZYF4QRnlM90iYWiC7ua1/YFXi/ dQhICcyfI7j1N/G+PRa0qUpBbrydaZ/oehq+0sAzXMOS3yLV4wedpF6wrWPq3d0Yz7 Aw0+DUUwG/ESiJXKSkG+m0sT4nyEfZOr+LoiMCmhQnDL8eRG4FGd31iFtauP+DTIg7 BbyARhU2PumAA== From: Eshel Yaron To: Juri Linkov Subject: Re: bug#66317: Project mode-line In-Reply-To: <86jzs4ntxb.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 03 Oct 2023 09:29:23 +0300") References: <86jzs4ntxb.fsf@mail.linkov.net> X-Hashcash: 1:20:231003:juri@linkov.net::EwTX18KOiTrtWGOF:1XKK X-Hashcash: 1:20:231003:66317@debbugs.gnu.org::gqvzypjrUQ4PXMfR:2X50 Date: Tue, 03 Oct 2023 10:07:00 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org 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 (-) Hi, Juri Linkov writes: > Here is the implementation of the mode-line project indicator prepended > before the vc indicator with the project menu discussed in bug#63469: > > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index 2e6ae89a443..8798feb2c56 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -2010,5 +2102,20 @@ project-uniquify-dirname-transform > (file-relative-name dirname root)))) > dirname)) > > +;;; Project mode-line > + > +(let ((form '(:eval (when-let (project (project-current)) > + (concat " " > + (propertize > + (project-name project) > + 'mouse-face 'mode-line-highlight > + 'local-map > + (make-mode-line-mouse-map > + 'down-mouse-1 > + `(menu-item "Project" > + ,menu-bar-project-menu)))))))) > + (when-let (pos (seq-position mode-line-format '(vc-mode vc-mode))) > + (cl-pushnew form (nthcdr pos mode-line-format)))) > + > (provide 'project) > ;;; project.el ends here This looks nice (I actually have something similar in my `mode-line-format` already), but I think that modifying `mode-line-format` when project.el is loaded is a bit problematic. Perhaps a better alternative would be to define a variable that holds this mode-line construct, along with an autoloaded function that people can call from their init files to actually add this construct to `mode-line-format`. WDYT? Best, Eshel From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 08:06:45 2023 Received: (at 66317) by debbugs.gnu.org; 3 Oct 2023 12:06:45 +0000 Received: from localhost ([127.0.0.1]:38987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qneAn-00087O-Co for submit@debbugs.gnu.org; Tue, 03 Oct 2023 08:06:45 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:50482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qneAm-00087A-5J for 66317@debbugs.gnu.org; Tue, 03 Oct 2023 08:06:44 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c189dabcc3so10119411fa.1 for <66317@debbugs.gnu.org>; Tue, 03 Oct 2023 05:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696334781; x=1696939581; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=3hX61KlyqgesHVfSiKFkUyzqEnm0V3C1Jg1wmOXwzM8=; b=LusbaiJFys/mdLvdItQmzEFBaDyD6Gm3k7gb6DRbewBFxBOYTP6Syckirk5RHqIozT 3MVJ26cfzxIJF+m/Zo30PW7okLA+KDd8Fv/Ke5g1/w2maGHolrhJg6/TkJH8TywIebST hUHwlb0rPTryBRYdfhdeQQvMcFpb4t2lCRnYm1f/dYckYH79cDedqpD1N+ki08fSOpyT OcDMve+jIXsdOzjBY6INw0zaChqs9K3fW5HyK6WtVdj2mQdhR1ntFtSpApHBK5EGLeMj lfS7YWTDOYGR6EBFJe87DFJ0pL6L4V3PGjOg8WcwpGX6QiuTKHmmqdny9bhuSXlZuu3h boeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696334781; x=1696939581; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3hX61KlyqgesHVfSiKFkUyzqEnm0V3C1Jg1wmOXwzM8=; b=huAMgtebQfeT9hVtCy3d3IY97InPJ2h+4MdbAVoS+cuLYTYVPqt1vJryUGJlgRd7MU Ifub4yjPHR8E9GhGu7+NMP6wyeKZCDyn36gx1ItEwI547rRQcwPHEP7WxkVgmiHANd+0 5cR8ArZaQ04e4Aajv/jGwhdzk+tRAmL83fRySLq0nuge3evR7FDMw6OHofEewJaT0fSG mFyDy53YHyoUhpCwZ8fT2W2uyfERGQFo7vewbFQAkWqZ6j7o1q5zUsMc/mqu3lHnP4ak sfofeBNUPflf2bNmZRZBai4S7GK/cuKfqnDX9QU78AirfbDE91EWTjTjB35mGqYPgPFr n7/Q== X-Gm-Message-State: AOJu0YxinlMMMP3gvqA52pdHw6OiL+2nqkHBrVIDxlhgWGEcqhXcM3ef maTMQeVuzYG35PI5iueDrDq4HjQMePuodsgDnF74Uj0m/1og/w== X-Google-Smtp-Source: AGHT+IGev6lBvNrOECOFfig3yr+ATxSFm2CFoijPntB+jpvw8dnE49Cq7PfTL2YE5CTyfG6ZLnfUJsgUt1KMK3GBy30= X-Received: by 2002:a05:651c:1a25:b0:2c2:9414:7dc8 with SMTP id by37-20020a05651c1a2500b002c294147dc8mr8460100ljb.36.1696334780797; Tue, 03 Oct 2023 05:06:20 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 3 Oct 2023 05:06:20 -0700 From: Stefan Kangas In-Reply-To: <86jzs4ntxb.fsf@mail.linkov.net> References: <86jzs4ntxb.fsf@mail.linkov.net> MIME-Version: 1.0 Date: Tue, 3 Oct 2023 05:06:20 -0700 Message-ID: Subject: Re: bug#66317: Project mode-line To: Juri Linkov , 66317@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66317 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 (-) Juri Linkov writes: > Here is the implementation of the mode-line project indicator prepended > before the vc indicator with the project menu discussed in bug#63469: LGTM. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 12:25:21 2023 Received: (at 66317) by debbugs.gnu.org; 3 Oct 2023 16:25:21 +0000 Received: from localhost ([127.0.0.1]:40606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qniD2-0006vQ-KT for submit@debbugs.gnu.org; Tue, 03 Oct 2023 12:25:21 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:53269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qniCz-0006v8-Ue for 66317@debbugs.gnu.org; Tue, 03 Oct 2023 12:25:19 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 293E05C02A1; Tue, 3 Oct 2023 12:24:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 03 Oct 2023 12:24:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696350295; x=1696436695; bh=j2fPAok6aSK94uzBoctXqzVLjTPiRNfdUIj tyOFR0Nc=; b=KvDx2pNktPf5UtI/EmFEW+Gc5M1/waEDA0Lfux+kK6J/U2W/1lP 2iE80vdihxdLOB6/YQilO2YfqYlCZHcCY6GJ3zJiBskIDwTZMPkYNR584VKzv/Q5 GiX+0n/m9eU4dqlBm2bGlw/ACP4gayqDlH8/Wc2a7URBXH1fBDtd90Bwlz2vjOg4 kcrWTiZNcO9GKMiQ5oG/MRgNRSZhsqLiJlpISAFxxCDLbIHUVCwArLxnM0yuxqrj 5rp+zFje1T3U8LCVjF9+fqDzcbKA4VV3hJPgpyaPBaD9aYAJ4TfcrkhHbKAatAaH c7WdUQirQUTehKoEHBBGWIo6Syur1kbGzJw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696350295; x=1696436695; bh=j2fPAok6aSK94uzBoctXqzVLjTPiRNfdUIj tyOFR0Nc=; b=ljVpTALv55r2/pQP5MxKDahF3tJBmQO05c3iZd7t4mCKO6wh1Jh 8dc/NLELGBKBTBGkS8L20lCwqHEjczqeS9OirZxfUbTE2Q7rrJ0Gbr4F6ef5EOim XUHRJ4KhkMZ8oo1ipakmNEObqcXyUOj9ccM3dSylBrNdbw3WJdLUu74ccjF0k2Ig 7YL8BZDqvxCO3AiXJynfcZggTHBeA9g5GkX9uo05Ak/8ez3mNQ0buOCONaYGNj1K 30xQkGGGD+WUPci7utNhdMzf3GCgVMZE1tTXpOYq6BeOuqEvpFqWU3wvxBVWoKzd eTJ/nEdJBScpVqPCHwZgPSvGpG09Dok7eqQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeejgddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 3 Oct 2023 12:24:53 -0400 (EDT) Message-ID: <2b5ee12c-2272-8129-8025-97fb00243d95@gutov.dev> Date: Tue, 3 Oct 2023 19:24:52 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Eshel Yaron , Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org 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.2 (---) On 03/10/2023 11:07, Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors wrote: > Hi, > > Juri Linkov writes: > >> Here is the implementation of the mode-line project indicator prepended >> before the vc indicator with the project menu discussed in bug#63469: >> >> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el >> index 2e6ae89a443..8798feb2c56 100644 >> --- a/lisp/progmodes/project.el >> +++ b/lisp/progmodes/project.el >> @@ -2010,5 +2102,20 @@ project-uniquify-dirname-transform >> (file-relative-name dirname root)))) >> dirname)) >> >> +;;; Project mode-line >> + >> +(let ((form '(:eval (when-let (project (project-current)) >> + (concat " " >> + (propertize >> + (project-name project) >> + 'mouse-face 'mode-line-highlight >> + 'local-map >> + (make-mode-line-mouse-map >> + 'down-mouse-1 >> + `(menu-item "Project" >> + ,menu-bar-project-menu)))))))) >> + (when-let (pos (seq-position mode-line-format '(vc-mode vc-mode))) >> + (cl-pushnew form (nthcdr pos mode-line-format)))) >> + >> (provide 'project) >> ;;; project.el ends here > This looks nice (I actually have something similar in my > `mode-line-format` already), but I think that modifying > `mode-line-format` when project.el is loaded is a bit problematic. > Perhaps a better alternative would be to define a variable that holds > this mode-line construct, along with an autoloaded function that people > can call from their init files to actually add this construct to > `mode-line-format`. WDYT? I also think this would be a more conservative choice (keeping the runtime cost of using project.el to zero by default). - A public defvar with the mode-line spec for the project element (which could be used by alternative mode-lines as well). - Either a public function, or a defcustom (nil by default) where the setter does the same thing. The latter seems a bit user-friendlier. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 13:13:49 2023 Received: (at 66317) by debbugs.gnu.org; 3 Oct 2023 17:13:49 +0000 Received: from localhost ([127.0.0.1]:40636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnixx-0008BQ-D2 for submit@debbugs.gnu.org; Tue, 03 Oct 2023 13:13:49 -0400 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:44453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnixv-0008BB-FZ for 66317@debbugs.gnu.org; Tue, 03 Oct 2023 13:13:48 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 0CBE21BF205; Tue, 3 Oct 2023 17:13:20 +0000 (UTC) From: Juri Linkov To: Eshel Yaron Subject: Re: bug#66317: Project mode-line In-Reply-To: (Eshel Yaron's message of "Tue, 03 Oct 2023 10:07:00 +0200") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> Date: Tue, 03 Oct 2023 20:11:55 +0300 Message-ID: <86sf6r4omc.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org 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 (-) > This looks nice (I actually have something similar in my > `mode-line-format` already), but I think that modifying > `mode-line-format` when project.el is loaded is a bit problematic. > Perhaps a better alternative would be to define a variable that holds > this mode-line construct, along with an autoloaded function that people > can call from their init files to actually add this construct to > `mode-line-format`. WDYT? In bug#63469 I implemented 'project-mode' with the buffer-local variable 'project-name'. But due to objections I rewrote this to simpler and direct implementation. I could revive the previous patch now. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 13:52:17 2023 Received: (at 66317) by debbugs.gnu.org; 3 Oct 2023 17:52:17 +0000 Received: from localhost ([127.0.0.1]:40665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnjZB-0000om-4H for submit@debbugs.gnu.org; Tue, 03 Oct 2023 13:52:17 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:42761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnjZ9-0000oX-Cm for 66317@debbugs.gnu.org; Tue, 03 Oct 2023 13:52:16 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id EBBC25C02F9; Tue, 3 Oct 2023 13:51:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 03 Oct 2023 13:51:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696355512; x=1696441912; bh=zkeziijL5dDVGPkxGkvnzqKpWk5/LgjGi/X UVkfGyrE=; b=TIE8btni3iqJEOj7QwCCylGZ1Sa6uFemWHXMfdyboqcnyM5y6tm /qUOUu4W6vQXt+2QVqFhj5DyIj4K4g2J/Tla1ssslCIA/hCwnIL04gwbZKeVAY4x vzX9uIiF3SlTHbpN1lm1ObXo9Yc4X5ryKMM0IA4UCgQ9jxnXfauJaQYHnqdDle3B rPNB53SselsZ0zksO9iOytWFB8bb+m62wIINS8xSgag4+mMOkE3F98ZqxokAuPVN WCVcpH2UqoxLrT8xL8+avbeCORK2aKL7Sw2l4BSc/m0/888wmi3O7ImT2R4XYsW5 uRcjxrUAyFhZTv2B9hNrCtsaw8J8lqY3Xhg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696355512; x=1696441912; bh=zkeziijL5dDVGPkxGkvnzqKpWk5/LgjGi/X UVkfGyrE=; b=mIATvVepghkCh8VaY9euyuV+yFbFPePobwkIysvdmhUoe8efJMF Bbc/ZrGISMK25cA/o1NJL80fDec9Zh0m59eDseMoapumLQt6YREuOgBneQTP+/Hm VqYMIiOBLy5Nd789z5j8lTVFxTL7IHejFehi9v5sCQIej6Tz/BiRPM5Tvxxf9BBh j3pP127ywN/1v9w6DYt4vCrPSL/i9vrnWDbVEp6ZDxeDuryyvRJl/7u93W/iSc/z rnpuNm3gIgd+FBq2jAgwMx8vdS+S+pUFLoEVJZKqwXbkVFf2LJxYrpEFpdFzPYL0 lnuxH8Sm+pOyBAn6AJ2coY10dSWtaAwtSRg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeejgddviecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 3 Oct 2023 13:51:51 -0400 (EDT) Message-ID: Date: Tue, 3 Oct 2023 20:51:50 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov , Eshel Yaron References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86sf6r4omc.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org 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.2 (---) On 03/10/2023 20:11, Juri Linkov wrote: >> This looks nice (I actually have something similar in my >> `mode-line-format` already), but I think that modifying >> `mode-line-format` when project.el is loaded is a bit problematic. >> Perhaps a better alternative would be to define a variable that holds >> this mode-line construct, along with an autoloaded function that people >> can call from their init files to actually add this construct to >> `mode-line-format`. WDYT? > In bug#63469 I implemented 'project-mode' with the buffer-local > variable 'project-name'. But due to objections I rewrote this > to simpler and direct implementation. I could revive the previous > patch now. Could you make it a user option 'project-show-in-mode-line' or similar? Minor mode 'project-mode-line-mode' would also be okay. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 13:59:56 2023 Received: (at 66317) by debbugs.gnu.org; 3 Oct 2023 17:59:56 +0000 Received: from localhost ([127.0.0.1]:40674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnjga-000116-EH for submit@debbugs.gnu.org; Tue, 03 Oct 2023 13:59:56 -0400 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]:55937) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnjgX-00010h-Si for 66317@debbugs.gnu.org; Tue, 03 Oct 2023 13:59:54 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id DDD68FF803; Tue, 3 Oct 2023 17:59:26 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: (Dmitry Gutov's message of "Tue, 3 Oct 2023 20:51:50 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> Date: Tue, 03 Oct 2023 20:58:49 +0300 Message-ID: <86jzs34mg6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org, Eshel Yaron 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 (-) > On 03/10/2023 20:11, Juri Linkov wrote: >>> This looks nice (I actually have something similar in my >>> `mode-line-format` already), but I think that modifying >>> `mode-line-format` when project.el is loaded is a bit problematic. >>> Perhaps a better alternative would be to define a variable that holds >>> this mode-line construct, along with an autoloaded function that people >>> can call from their init files to actually add this construct to >>> `mode-line-format`. WDYT? >> In bug#63469 I implemented 'project-mode' with the buffer-local >> variable 'project-name'. But due to objections I rewrote this >> to simpler and direct implementation. I could revive the previous >> patch now. > > Could you make it a user option 'project-show-in-mode-line' or similar? > > Minor mode 'project-mode-line-mode' would also be okay. But there is no such mode for vc-mode (vc-mode is not a proper mode). From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 14:04:30 2023 Received: (at 66317) by debbugs.gnu.org; 3 Oct 2023 18:04:30 +0000 Received: from localhost ([127.0.0.1]:40679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnjl0-00019w-7L for submit@debbugs.gnu.org; Tue, 03 Oct 2023 14:04:30 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:34077) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnjky-00019j-Q5 for 66317@debbugs.gnu.org; Tue, 03 Oct 2023 14:04:29 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1F0DD5C005C; Tue, 3 Oct 2023 14:04:06 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 03 Oct 2023 14:04:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696356246; x=1696442646; bh=FWTSy6fCwTfLMtXU4qcZzkWtWgMytYABO7C 2Cr03n8o=; b=neEK5JZxBbU/CEiBgk6fJsAByt97c24BqJjvQwWRIqBofOsqxpb upDw/vsR42C8Jpf81H5RB4vOLDj5w0vJVqIaKsYuTC++AMF0JRkHyN+QFntZ2mut f68AWFGXVQijL19lWj53ukuJmnSOHBd/38dtOsJ0dxzurScctUGPS4EAZO1QdMnA NpBaEjAb0p/t2bfCUbnbSddWS2oNgBYAJVUbnHVruRxrVRdJ8eKYdIczexHAIy/n J2mBWO5hVhQseEluEfskAIDGGl62cEIhLV3UkYIUsnhfKdcOpSxWaUTWPcPnFTBT 8cmzgP8Qpz0eSy9cRLh0cZGc05MCOPVEQqQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696356246; x=1696442646; bh=FWTSy6fCwTfLMtXU4qcZzkWtWgMytYABO7C 2Cr03n8o=; b=IRW7UNCSfWrZtwYoD5GddcorMmT7YoZWxbv3xJhg3/vX+vkESsP te5gkPGGmyO1kG0iMLO8N9HLOwEsa8SHTYi6zAT6UKiDu2BJurA+3NdMAhkIOK9T dsxaSn8VwGpNclhYQSG4TCMiHDx/cTrdJsuUyWwmSt+hiZ8gDh+PUrzKwA01sa6D jgdMHRXpvCA/zAtV86SfwZJM5KMjbhG9ENNNRueqTa0g7oX6kYbvCi05D92DZtiW tVfEU4aw8NWz5xQAFPTTAjw4yYo+t1vKpQ/KmzsDhfkw8e9fEFtRS3lG9+KzVuiC rUbu+Qlj/iOGVIDvHXu6IUxijrcdgiOSrpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfeejgddvlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 3 Oct 2023 14:04:04 -0400 (EDT) Message-ID: <3d72e573-247d-a7af-6fed-43bcba489f6e@gutov.dev> Date: Tue, 3 Oct 2023 21:04:03 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86jzs34mg6.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org, Eshel Yaron 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.2 (---) On 03/10/2023 20:58, Juri Linkov wrote: >> On 03/10/2023 20:11, Juri Linkov wrote: >>>> This looks nice (I actually have something similar in my >>>> `mode-line-format` already), but I think that modifying >>>> `mode-line-format` when project.el is loaded is a bit problematic. >>>> Perhaps a better alternative would be to define a variable that holds >>>> this mode-line construct, along with an autoloaded function that people >>>> can call from their init files to actually add this construct to >>>> `mode-line-format`. WDYT? >>> In bug#63469 I implemented 'project-mode' with the buffer-local >>> variable 'project-name'. But due to objections I rewrote this >>> to simpler and direct implementation. I could revive the previous >>> patch now. >> Could you make it a user option 'project-show-in-mode-line' or similar? >> >> Minor mode 'project-mode-line-mode' would also be okay. > But there is no such mode for vc-mode (vc-mode is not a proper mode). VC Mode is just always on globally (though there is a variable vc-handled-backends which can be disabled). And as such, it always adds runtime overhead. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 03 14:17:33 2023 Received: (at 66317) by debbugs.gnu.org; 3 Oct 2023 18:17:33 +0000 Received: from localhost ([127.0.0.1]:40685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnjxc-0001UE-LH for submit@debbugs.gnu.org; Tue, 03 Oct 2023 14:17:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnjxa-0001Tw-Lr for 66317@debbugs.gnu.org; Tue, 03 Oct 2023 14:17:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnjxD-0007Ks-0C; Tue, 03 Oct 2023 14:17:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Dn8q/z+y6gT9oaEBkfxr0qxck3cpSooXSSOA1FKkKEQ=; b=nZmhnfCggYRZ gn4D2I0FTzSCD9mgYM5Ubmvj8EBvIQnZAN3zsFbyhhVGzSawkvT3QwPk5LhJ93ibMIUHPf3vC1us0 18y/TIkcZLAJuSQxxwqX+NridkO5lRXT8ed+dKLVOlx9ynnoCAi8SLBcGfFp/AlB7XtauDBDSvQTK /UJcuyylE11dXHiaJSf1TFKgduF9hX1xJwLZDU1NoRSyRabkoDDRf+jD+4XVOuHTkVsIeEqdQg6Tc xfkJeY9C8B69iTqCxI4cBJ8YdEkGp7Hhz2brewNOl6vuQLp/DWNw0YIEFYIMN6CyDBZWiev1L3H4f XOBMd77GSVlunzbnFzD5ig==; Date: Tue, 03 Oct 2023 21:17:09 +0300 Message-Id: <83zg0z6062.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <86jzs34mg6.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 03 Oct 2023 20:58:49 +0300) Subject: Re: bug#66317: Project mode-line References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, me@eshelyaron.com, 66317@debbugs.gnu.org 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 (---) > Cc: 66317@debbugs.gnu.org, Eshel Yaron > From: Juri Linkov > Date: Tue, 03 Oct 2023 20:58:49 +0300 > > > On 03/10/2023 20:11, Juri Linkov wrote: > >>> This looks nice (I actually have something similar in my > >>> `mode-line-format` already), but I think that modifying > >>> `mode-line-format` when project.el is loaded is a bit problematic. > >>> Perhaps a better alternative would be to define a variable that holds > >>> this mode-line construct, along with an autoloaded function that people > >>> can call from their init files to actually add this construct to > >>> `mode-line-format`. WDYT? > >> In bug#63469 I implemented 'project-mode' with the buffer-local > >> variable 'project-name'. But due to objections I rewrote this > >> to simpler and direct implementation. I could revive the previous > >> patch now. > > > > Could you make it a user option 'project-show-in-mode-line' or similar? > > > > Minor mode 'project-mode-line-mode' would also be okay. > > But there is no such mode for vc-mode (vc-mode is not a proper mode). I indeed think that an optional variable to control the mode-line additions would be better than a minor mode: this is too little functionality to justify a minor mode. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 02:22:06 2023 Received: (at 66317) by debbugs.gnu.org; 4 Oct 2023 06:22:06 +0000 Received: from localhost ([127.0.0.1]:41325 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnvGn-0002yJ-MB for submit@debbugs.gnu.org; Wed, 04 Oct 2023 02:22:06 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:35035) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnvGl-0002xn-9O for 66317@debbugs.gnu.org; Wed, 04 Oct 2023 02:22:03 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1EB16FF806; Wed, 4 Oct 2023 06:21:36 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#66317: Project mode-line In-Reply-To: <83zg0z6062.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 03 Oct 2023 21:17:09 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> Date: Wed, 04 Oct 2023 09:18:28 +0300 Message-ID: <86il7mc3xr.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, me@eshelyaron.com, 66317@debbugs.gnu.org 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 >> >>> This looks nice (I actually have something similar in my >> >>> `mode-line-format` already), but I think that modifying >> >>> `mode-line-format` when project.el is loaded is a bit problematic. >> >>> Perhaps a better alternative would be to define a variable that holds >> >>> this mode-line construct, along with an autoloaded function that people >> >>> can call from their init files to actually add this construct to >> >>> `mode-line-format`. WDYT? >> >> In bug#63469 I implemented 'project-mode' with the buffer-local >> >> variable 'project-name'. But due to objections I rewrote this >> >> to simpler and direct implementation. I could revive the previous >> >> patch now. >> > >> > Could you make it a user option 'project-show-in-mode-line' or similar? >> > >> > Minor mode 'project-mode-line-mode' would also be okay. >> >> But there is no such mode for vc-mode (vc-mode is not a proper mode). > > I indeed think that an optional variable to control the mode-line > additions would be better than a minor mode: this is too little > functionality to justify a minor mode. Ok, here is the implementation with an optional variable: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=project-mode-line.patch diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 2e6ae89a443..74b2347b715 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -2010,5 +2103,36 @@ project-uniquify-dirname-transform (file-relative-name dirname root)))) dirname)) +;;; Project mode-line + +;;;###autoload +(defcustom project-mode-line nil + "Show the current project name with the menu on the mode line." + :type 'boolean + :group 'project + :version "30.1") + +(defvar project-menu-entry + `(menu-item "Project" ,menu-bar-project-menu)) + +(defvar project-mode-line-map + (let ((map (make-sparse-keymap))) + (define-key map [mode-line down-mouse-1] project-menu-entry) + map)) + +(defvar project-mode-line-format '(:eval (project-mode-line-format))) +(put 'project-mode-line-format 'risky-local-variable t) + +(defun project-mode-line-format () + "Compose the project mode-line." + (when-let ((project (project-current))) + (concat + " " + (propertize + (project-name project) + 'mouse-face 'mode-line-highlight + 'help-echo "mouse-1: Project menu" + 'local-map project-mode-line-map)))) + (provide 'project) ;;; project.el ends here diff --git a/lisp/bindings.el b/lisp/bindings.el index 207adb3a2a4..70e4087e131 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -682,6 +682,7 @@ mode-line-end-spaces 'mode-line-buffer-identification " " 'mode-line-position + '(project-mode-line project-mode-line-format) '(vc-mode vc-mode) " " 'mode-line-modes --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 03:16:00 2023 Received: (at 66317) by debbugs.gnu.org; 4 Oct 2023 07:16:00 +0000 Received: from localhost ([127.0.0.1]:41393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnw6y-00077I-AL for submit@debbugs.gnu.org; Wed, 04 Oct 2023 03:16:00 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:53896 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnw6w-00077A-59 for 66317@debbugs.gnu.org; Wed, 04 Oct 2023 03:15:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1696403739; bh=wHwzu4NZYnSuV6dAqpwurTZ1vyAwIipTOwrZ3vUAd+o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=F6QLMnhvECvpVSglPyVq3RP7S0hGmqidsgZub/ErybtKEQzktLdasqEdJWJPzU+pL rY64FT8iF4LjXckHDjYJjjRh5kEJVPg9mGT1/FZT0gUvGox4/F69JJmb/jRT+skT1/ 6oX5r547CUmBZfRGpDgDaYhF7s6fsHkWSf4GeysTla1KX/tXphIeDknYQrK1u6oWnU zaFwnw7InRJR62CeEjHQ24FyCQuri483RiHzTr9qEkZa3SE7mm0vyOhTSvtOsy6TvV LwrdIrWQ3mO+rcT9wo0Vr166VdyGcmHeJUmu95WlPWZaZv/9gHmACLgsgBYehNDity iyS+9ZKxntikg== From: Eshel Yaron To: Juri Linkov Subject: Re: bug#66317: Project mode-line In-Reply-To: <86il7mc3xr.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 04 Oct 2023 09:18:28 +0300") References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> X-Hashcash: 1:20:231004:66317@debbugs.gnu.org::apopE3gx7MjBjGpD:0RwD X-Hashcash: 1:20:231004:eliz@gnu.org::zDy1z64lFDw0WA53:2erY X-Hashcash: 1:20:231004:juri@linkov.net::LmtaL/p1irTvE7aF:4/fo X-Hashcash: 1:20:231004:dmitry@gutov.dev::2JFt+YC6G4zZaQHh:5NtU Date: Wed, 04 Oct 2023 09:15:37 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) Juri Linkov writes: > Ok, here is the implementation with an optional variable: Thanks, I've tried this patch on top of Emacs master and it seems to work well. One small suggestion is to consider giving the project name in the mode line a dedicated face, so people/themes could customize its appearance. (By default, it could just inherit from `default`.) > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index 2e6ae89a443..74b2347b715 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -2010,5 +2103,36 @@ project-uniquify-dirname-transform > (file-relative-name dirname root)))) > dirname)) > > +;;; Project mode-line > + > +;;;###autoload > +(defcustom project-mode-line nil > + "Show the current project name with the menu on the mode line." > + :type 'boolean > + :group 'project > + :version "30.1") > + > +(defvar project-menu-entry > + `(menu-item "Project" ,menu-bar-project-menu)) > + > +(defvar project-mode-line-map > + (let ((map (make-sparse-keymap))) > + (define-key map [mode-line down-mouse-1] project-menu-entry) > + map)) > + > +(defvar project-mode-line-format '(:eval (project-mode-line-format))) > +(put 'project-mode-line-format 'risky-local-variable t) > + > +(defun project-mode-line-format () > + "Compose the project mode-line." > + (when-let ((project (project-current))) > + (concat > + " " > + (propertize > + (project-name project) > + 'mouse-face 'mode-line-highlight > + 'help-echo "mouse-1: Project menu" > + 'local-map project-mode-line-map)))) > + > (provide 'project) > ;;; project.el ends here > diff --git a/lisp/bindings.el b/lisp/bindings.el > index 207adb3a2a4..70e4087e131 100644 > --- a/lisp/bindings.el > +++ b/lisp/bindings.el > @@ -682,6 +682,7 @@ mode-line-end-spaces > 'mode-line-buffer-identification > " " > 'mode-line-position > + '(project-mode-line project-mode-line-format) > '(vc-mode vc-mode) > " " > 'mode-line-modes From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 03:43:27 2023 Received: (at 66317) by debbugs.gnu.org; 4 Oct 2023 07:43:27 +0000 Received: from localhost ([127.0.0.1]:41422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnwXX-0007qa-Gw for submit@debbugs.gnu.org; Wed, 04 Oct 2023 03:43:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qnwXV-0007qI-4O for 66317@debbugs.gnu.org; Wed, 04 Oct 2023 03:43:26 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnwX7-0000mf-0L; Wed, 04 Oct 2023 03:43:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sHu+YI0t+V6KSkE8j2V1bB91FEDabCsA5A/Ut/Cs7HU=; b=RRRLWlniXarE G2KorULJwEgK1gvS/yBa3ceo1i9i2kRfPVQDWUmNdVxEmjVE3ntx+YDWP7yh7iGn1vgbHeOOzKXuJ cTH/f7gFCx2NiZBC+mw1R2Wzhw7esXxrrACU4ClhXExI913zfJ9O23Wss28pGPALaCzk6WyFikf/j y2M7USbgL1hAfMSZs/CIdMo3AGbGUdbslVlZFa6aerdk8Qx/TXDVnld/YDrbJYlyLrwWpGhDbu8dO bxhgBW9Ohcp7Wjpwt9TSxHEewM3AwIDSBip+/ypGDu1N0XHFbpfW8gNZ9VTAE5yV092ahdDjcpszE 4q4RxllT7bVuaa+a3uv73w==; Date: Wed, 04 Oct 2023 10:43:01 +0300 Message-Id: <83h6n66dfe.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <86il7mc3xr.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 04 Oct 2023 09:18:28 +0300) Subject: Re: bug#66317: Project mode-line References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, me@eshelyaron.com, 66317@debbugs.gnu.org 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: Juri Linkov > Cc: dmitry@gutov.dev, 66317@debbugs.gnu.org, me@eshelyaron.com > Date: Wed, 04 Oct 2023 09:18:28 +0300 > > Ok, here is the implementation with an optional variable: Thanks. > +;;;###autoload > +(defcustom project-mode-line nil > + "Show the current project name with the menu on the mode line." > + :type 'boolean > + :group 'project > + :version "30.1") Assuming Dmitry is OK with this implementation, this option should be in NEWS, I think. > --- a/lisp/bindings.el > +++ b/lisp/bindings.el > @@ -682,6 +682,7 @@ mode-line-end-spaces > 'mode-line-buffer-identification > " " > 'mode-line-position > + '(project-mode-line project-mode-line-format) > '(vc-mode vc-mode) > " " > 'mode-line-modes bindings.el is preloaded, but project.el is not. Doesn't the above cause trouble while bootstrapping, or forces loading project.el right after starting Emacs? IOW, when will project.el be loaded if the user customizes the new option to a non-nil value? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 10:34:38 2023 Received: (at 66317) by debbugs.gnu.org; 4 Oct 2023 14:34:38 +0000 Received: from localhost ([127.0.0.1]:45103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo2xS-0002x7-7C for submit@debbugs.gnu.org; Wed, 04 Oct 2023 10:34:38 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:34827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo2xQ-0002wu-Cg for 66317@debbugs.gnu.org; Wed, 04 Oct 2023 10:34:37 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6EE2E5C044E; Wed, 4 Oct 2023 10:34:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 04 Oct 2023 10:34:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696430053; x=1696516453; bh=6VKMljESCQgjscWeDVN16RYQ3v/Q+XR0BaS YhKcmL4A=; b=n02nw5h+PWqljhy6USVoFwUcIj6gRbfV2n2JQ3FMZtuTxNmBkTY xo9zq0hDVx/oIz94ZY2nRxWkRlpaNkdHmHBAxIsio+CwTYJlxLCQYOGXlUqTIRkv kZllmd4DtNFOvLpdOnGHILEEGJoFa0bQas8/53XZJmrqZJwbWKwC28od8o3PqrxI oa/dHsfz0Egyv08LdQVSZxaM27+rC9o9r3pKUdLORl9NmsZ5LfzhQFhVRADyVKA3 BqSuSmN1xotqIM58liyVw+bcpSdXufoKDsv6+8WtgThdrUkCAWDPg3Bre/GJvHGq c8oO7rxT9mj+zTz5dKEmwRnNHWNicIZWvtA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696430053; x=1696516453; bh=6VKMljESCQgjscWeDVN16RYQ3v/Q+XR0BaS YhKcmL4A=; b=LGVoIoX7QnriKPIQV7DSZ1SWbPESIaCDx9TqmLveggqp/vgySAN tLNeHghpjSQKsp6PUBDB7UVJEOFJCbVgMQR68jBohkQAtzHAW9VR9rilWJzdPeTa /6cQO8Xp6QV+f3qLFXY3arV1Qeuv4KnQEQ9XyLpDV3Bce0BG/YeZa9j5ODyV+bmz smtg0QyJrQItMEh84pxNk6KJTsDivmyGMWECKsJ8S85dHy1kq/qxpJ2Y6Dgd2qRZ AkaZOtHLjiMe0VzYsJx0GOFTGvAx15RHjS43S/C4B0YQeuKfYEtg9w4r+o79rSf/ ugFYs+aoaffKWQ7m2Ub0tX4FPkWFSLtInlw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrgedvgdejiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 4 Oct 2023 10:34:11 -0400 (EDT) Message-ID: <95ce8ce0-759e-68cc-3dad-9f1429fa346c@gutov.dev> Date: Wed, 4 Oct 2023 17:34:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Eli Zaretskii , Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <83h6n66dfe.fsf@gnu.org> From: Dmitry Gutov In-Reply-To: <83h6n66dfe.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, 66317@debbugs.gnu.org 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.2 (---) On 04/10/2023 10:43, Eli Zaretskii wrote: > Assuming Dmitry is OK with this implementation, this option should be > in NEWS, I think. LGTM, thanks. Aside from the other potential issue that you brought up. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 13:09:27 2023 Received: (at 66317) by debbugs.gnu.org; 4 Oct 2023 17:09:27 +0000 Received: from localhost ([127.0.0.1]:45237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo5NH-0006Qe-5W for submit@debbugs.gnu.org; Wed, 04 Oct 2023 13:09:27 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:54731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo5NF-0006Q3-F6 for 66317@debbugs.gnu.org; Wed, 04 Oct 2023 13:09:25 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id AA9B8E0004; Wed, 4 Oct 2023 17:08:59 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#66317: Project mode-line In-Reply-To: <83h6n66dfe.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 04 Oct 2023 10:43:01 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <83h6n66dfe.fsf@gnu.org> Date: Wed, 04 Oct 2023 20:04:52 +0300 Message-ID: <86edia9v4b.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, me@eshelyaron.com, 66317@debbugs.gnu.org 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 (-) >> +;;;###autoload >> +(defcustom project-mode-line nil >> + "Show the current project name with the menu on the mode line." >> + :type 'boolean >> + :group 'project >> + :version "30.1") >> >> --- a/lisp/bindings.el >> +++ b/lisp/bindings.el >> @@ -682,6 +682,7 @@ mode-line-end-spaces >> 'mode-line-buffer-identification >> " " >> 'mode-line-position >> + '(project-mode-line project-mode-line-format) >> '(vc-mode vc-mode) >> " " >> 'mode-line-modes > > bindings.el is preloaded, but project.el is not. Doesn't the above > cause trouble while bootstrapping, or forces loading project.el right > after starting Emacs? IOW, when will project.el be loaded if the user > customizes the new option to a non-nil value? project-mode-line is autoloaded and nil by default. This means no trouble while bootstrapping, and project.el is not loaded after starting Emacs. project.el is loaded only after customizing project-mode-line to non-nil. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 04 13:09:32 2023 Received: (at 66317) by debbugs.gnu.org; 4 Oct 2023 17:09:32 +0000 Received: from localhost ([127.0.0.1]:45240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo5NM-0006Qy-FF for submit@debbugs.gnu.org; Wed, 04 Oct 2023 13:09:32 -0400 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]:37141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qo5NK-0006QJ-TH for 66317@debbugs.gnu.org; Wed, 04 Oct 2023 13:09:31 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 8D0D6240007; Wed, 4 Oct 2023 17:09:03 +0000 (UTC) From: Juri Linkov To: Eshel Yaron Subject: Re: bug#66317: Project mode-line In-Reply-To: (Eshel Yaron's message of "Wed, 04 Oct 2023 09:15:37 +0200") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> Date: Wed, 04 Oct 2023 20:06:17 +0300 Message-ID: <867co29v1y.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, Eli Zaretskii , 66317@debbugs.gnu.org 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, here is the implementation with an optional variable: > > Thanks, I've tried this patch on top of Emacs master and it seems to > work well. One small suggestion is to consider giving the project name > in the mode line a dedicated face, so people/themes could customize its > appearance. (By default, it could just inherit from `default`.) Thanks for suggestion, will do on the second round after pushing the initial version. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 16:04:18 2023 Received: (at 66317) by debbugs.gnu.org; 5 Oct 2023 20:04:18 +0000 Received: from localhost ([127.0.0.1]:48581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoUa2-0005Zv-L7 for submit@debbugs.gnu.org; Thu, 05 Oct 2023 16:04:18 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:52019) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoUa0-0005Zd-QJ for 66317@debbugs.gnu.org; Thu, 05 Oct 2023 16:04:17 -0400 From: Spencer Baugh To: Juri Linkov Subject: Re: bug#66317: Project mode-line In-Reply-To: <867co29v1y.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 04 Oct 2023 20:06:17 +0300") References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <867co29v1y.fsf@mail.linkov.net> Date: Thu, 05 Oct 2023 16:03:52 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, Eli Zaretskii , Eshel Yaron , 66317@debbugs.gnu.org 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 (-) One interesting bug: project-switch-project causes the modeline project name to change for all buffers. For example if I do: C-x p p emacs-29 RET f then while I'm at the find-file prompt, all modelines for all buffers show emacs-29 as the current project, no matter what they showed before (even if they didn't show anything before) Haven't thought at all about how to fix this, but we might want to think about it in the context of bug#63648 where we've been rethinking the implementation of project-switch-project. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 16:16:38 2023 Received: (at 66317) by debbugs.gnu.org; 5 Oct 2023 20:16:38 +0000 Received: from localhost ([127.0.0.1]:48586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoUlx-0005un-Tp for submit@debbugs.gnu.org; Thu, 05 Oct 2023 16:16:38 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:48651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoUlt-0005uW-In for 66317@debbugs.gnu.org; Thu, 05 Oct 2023 16:16:37 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E38EA5C030D; Thu, 5 Oct 2023 16:16:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 05 Oct 2023 16:16:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696536969; x=1696623369; bh=tJeYvySMtCnC8iZ2k6/kkd3Pbsky7MP9yge 2einI+6U=; b=HNHYSWrn2Tc7DYQWphPGogQxc35Ynnal9bIbJqliLR/DrOrNFs7 EpQYTJIzz3ERtNPxxjZwLjCGVlV7aeZQ/BOhgPRuqNWNNxIfw5h94QHeGn+jZz1E SERNFc/NMmzZgOuzACrAqfWNHCihHXC7gHH4vSY4ZPc4hDrhr8CGPOzEC1P9xiqn sF37QudlrJy0379V0MQVmtlNGigTQsqNF1UXd1rntqqkzwfBkTzhoA7iQ3pcZDHz 3hRzFcdA3TFFPVAGj6YjSLJ4X9tzsPtSlFl5DHCGCSMr2Jy5grxCxIMZXgwQVeAy LpbbCVpE74Fufwz/A0mnATbGtlhf7vgkZnA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696536969; x=1696623369; bh=tJeYvySMtCnC8iZ2k6/kkd3Pbsky7MP9yge 2einI+6U=; b=ehp9q5VH1WpUdmH0KehhvnkjP9oSiY8D0xfxhuTDfBnxbcAnfnt xcYXnbIwCJWVDXjTniPWaskay7oMmCOSVlEMZ6In8hDYUJ/yUXF6ZfOpajy/uS56 vCnBCA9jpIU7lQ8MZYpuRXlzrUwYi9PGt4EQRO0MGRBds6RY/hOFhkfafdt8rXWN mto2cHhlt5NJAO7W7OfTqk9ZiVGovEu0PI7kGs7juidSF31RYVfijLkl9h82cUZN R+ZeRtBkBlr8kuyiLjTl2uCzuWABeezSY5HlsKmTHK0cf1dJzcBJ1Nf9xnonzeQZ 0+Jo2bXR6mL/aaABC7Rsg248rf8/BcfylgQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrgeeggddugeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 Oct 2023 16:16:07 -0400 (EDT) Message-ID: <007e34d0-1847-2338-4f5e-a8ac8fa39475@gutov.dev> Date: Thu, 5 Oct 2023 23:16:04 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Spencer Baugh , Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <867co29v1y.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org, Eli Zaretskii , Eshel Yaron 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.2 (---) On 05/10/2023 23:03, Spencer Baugh wrote: > then while I'm at the find-file prompt, all modelines for all buffers > show emacs-29 as the current project, no matter what they showed before > (even if they didn't show anything before) > > Haven't thought at all about how to fix this, but we might want to think > about it in the context of bug#63648 where we've been rethinking the > implementation of project-switch-project. This can be fixed with e.g. patch below. Thank for the reminder about that report, BTW. diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 2e6ae89a443..867e4754622 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -1990,8 +1990,11 @@ project-switch-project (let ((command (if (symbolp project-switch-commands) project-switch-commands (project--switch-project-command)))) - (let ((project-current-directory-override dir)) - (call-interactively command)))) + (unwind-protect + (progn + (setq-local project-current-directory-override dir) + (call-interactively command)) + (kill-local-variable 'project-current-directory-override)))) ;;;###autoload (defun project-uniquify-dirname-transform (dirname) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 16:23:46 2023 Received: (at 66317) by debbugs.gnu.org; 5 Oct 2023 20:23:46 +0000 Received: from localhost ([127.0.0.1]:48602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoUss-000673-Bl for submit@debbugs.gnu.org; Thu, 05 Oct 2023 16:23:46 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:43927) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoUsp-00066o-Nd for 66317@debbugs.gnu.org; Thu, 05 Oct 2023 16:23:44 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 2EA815C03F7; Thu, 5 Oct 2023 16:23:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 05 Oct 2023 16:23:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696537400; x=1696623800; bh=BGw1HkJ7+veslR7uq4+PscK9Yd14RUK6VUG dODEZP48=; b=ndTc3+Wr9QUcJK+BXfZigLMF0OLykPT0uzrHYZ1GmgesDrDqV2h 3UUSY+Cdio9Gl/+RHcOEUgiHBwRPukUqLEa76tF1vwJsBvk0DK6GPXoPwVJ5KNpD fcS8zqf4cZ4HWefOZgI8yx6PbjGcRz1rzooTDxYsl8sGLaYU7/c/JMRAqHRNpt3H khLStXJE7kLAqM9p2L6E6Wm/r40Wyb4oUO4hGDR9/LC+R35S2OU2Sajjw9C9bbYH KjRQnEH2K+F+2htFw2C1dPpKgEwimxXUxpQ4XNPaAw5w8Z1QLFFxL/63WCMmANn6 6CygBIjpNt++EYv7Q6KJD1ExUo29cJtxhpg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696537400; x=1696623800; bh=BGw1HkJ7+veslR7uq4+PscK9Yd14RUK6VUG dODEZP48=; b=MIOxFYO6IhQi2bUiUHjwBl2G1ufExweLKRHNaj1mlxXPwO0CDQm 4V5tTt07/NWlvNWzPj3ObuXvNJpRV9rYQQ/ml/tk3qzlhizjpoKWaHhbc/w2Sdgo AaF28nJKCSlnBSU4M+j3JB5mMzHMgPDJUjTzCzofX3qMPhYcXI9XBTzJ+FxZwGRF Hktd9mVV2dnysLhT1FmQcXU136HFNF0g8FenfCrPedXvAkPedxDbX1o3jKiyKHNI pq4+fDQlL5qP/I6oGXZkVVagaKiuvJXioeFFG1dLSyXpoE2BNUGsQi5/2KfdpZSh X7xGnDnJjPwClXRyqQuiI1mXXQsK72omZjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrgeeggddugeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 Oct 2023 16:23:18 -0400 (EDT) Message-ID: <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> Date: Thu, 5 Oct 2023 23:23:17 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov , Eli Zaretskii References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86il7mc3xr.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, 66317@debbugs.gnu.org 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.2 (---) On 04/10/2023 09:18, Juri Linkov wrote: > diff --git a/lisp/bindings.el b/lisp/bindings.el > index 207adb3a2a4..70e4087e131 100644 > --- a/lisp/bindings.el > +++ b/lisp/bindings.el > @@ -682,6 +682,7 @@ mode-line-end-spaces > 'mode-line-buffer-identification > " " > 'mode-line-position > + '(project-mode-line project-mode-line-format) > '(vc-mode vc-mode) > " " > 'mode-line-modes Speaking of this change from the first patch, do we want to have project-mode-line automatically supported in Emacs <= 29, when they install the new version from ELPA? Can we safely do that? Simply altering mode-line-format, as in the original patch, might mess up the custom mode-line the user had set up (or installed). How to only change the default mode-line is less obvious, but perhaps checking that the current value is equal to (get 'mode-line-format 'standard-value) would mean altering is okay. Or otherwise we should say something in the docstring of project-mode-line: that it's only directly supported in Emacs 30, and in older versions the user need to add the corresponding entry to the mode-line-format by hand. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 05 17:54:45 2023 Received: (at control) by debbugs.gnu.org; 5 Oct 2023 21:54:45 +0000 Received: from localhost ([127.0.0.1]:48842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoWIv-0003Ev-HY for submit@debbugs.gnu.org; Thu, 05 Oct 2023 17:54:45 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]:46560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoWIt-0003Eg-Oy for control@debbugs.gnu.org; Thu, 05 Oct 2023 17:54:44 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c2907ff9fcso17903191fa.1 for ; Thu, 05 Oct 2023 14:54:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696542859; x=1697147659; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:from:from:to:cc:subject :date:message-id:reply-to; bh=/cG/o53rzRZsQOHOy8KzICjX5P2w1sQxBV6NdPh4epg=; b=aZEcHg+wD1cHpzV8/1iye/2tnT0khQJQW84GCamsLnTfL+yr4VtlafSGbu8i2JhRav 8+4xudaGGiu+7Jnk9h2iGiUyLvJfcTQ3j3JObeDTB2l1Tm0LtZAtIYQVnFNAEdZvl5sV 12ABjTn61ez3B3ldEWO6/w8X2YO63MYvHGXqApfzu0QQagfbKp+KQpd32dWuLJ3PnOkv QScRaqRoK6My3CLpI8icKgGkRo+lP7KaYqGb9sMva5ZATYQjx7o7Uf4eyd70JReQKdvk W5plBaZO3JnSB03kcNedNvzPgcaNcpzOe2QGNyglVxHkSfi1PQlEIJm080qtQ8qI2I/X xwKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696542859; x=1697147659; h=to:subject:message-id:date:mime-version:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/cG/o53rzRZsQOHOy8KzICjX5P2w1sQxBV6NdPh4epg=; b=EaHy0TprSRWhFfft4J49e8dZ4RqxfpbLoqZRZ4tqpGWcmTa7XfBJ4di3rjZQL52Yrv YZAUMJp7qXPWcm1Iug3yW+yWkkfQS0baCgTiKYqSO1D2e1/zVNAvLfguhm3e0EmOY1qt 5UIr+LeR7D3Bq9qPS/Th0x4y1fgDk6M/gU3lFsZOfKpbiO5W9EyqnFoGsmQDVP635hYz e/kYx0iWSbmfrek3nC0cqM1cZzBOdE+z2dCD1vOUQQaQyG3GZ5J8gluNgxRHkl9NpASM sfwtQQVLx1OFOSJz8O7lX64hPRdUOpSwI6QZ3kg5tyr5yCn0Dd3O1lRPbdRlkUwO9Hl6 0eEQ== X-Gm-Message-State: AOJu0Yw5qi+oYK15W+lISK/7UUx+jvELRvBNwJgqwk3A398EKWr5VxZV 6dzmaO5NQ5/mMvK+TwSTO3jnBAwatEowTD/xasn2Mk3Y X-Google-Smtp-Source: AGHT+IEobhMdlGBM38pLZ3fB9LNwp2yz4V3PuhWv0HOiMkZqH6UZnxNp7MaeWN/TNLeH5xaTE4f+3CpRBqQDBT4CJO0= X-Received: by 2002:a2e:828b:0:b0:2be:54b4:ff90 with SMTP id y11-20020a2e828b000000b002be54b4ff90mr5064203ljg.53.1696542859464; Thu, 05 Oct 2023 14:54:19 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 5 Oct 2023 21:54:19 +0000 From: Stefan Kangas MIME-Version: 1.0 Date: Thu, 5 Oct 2023 21:54:19 +0000 Message-ID: Subject: control message for bug #66317 To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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 (-) severity 66317 wishlist quit From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 06 00:50:23 2023 Received: (at 66317) by debbugs.gnu.org; 6 Oct 2023 04:50:24 +0000 Received: from localhost ([127.0.0.1]:48999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qocn9-0000k8-GD for submit@debbugs.gnu.org; Fri, 06 Oct 2023 00:50:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qocn7-0000jp-0Z for 66317@debbugs.gnu.org; Fri, 06 Oct 2023 00:50:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qocmh-0006M6-6y; Fri, 06 Oct 2023 00:49:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nrrefbM2VBZYbeQSez8xI8jq/nBlONipW6kD/7VcwrQ=; b=V+M9bf+/viIV Ie3bwvFNnLkeALxVYNodugvnMaGB8mWJO2NfARGoaaag2Ebj0ahUQ8mLjbH0BO5rCOobR2XF6/aYI VHnlD/Cs39+h6EJ9Dv3JTAFXso9gEXe99JfzUQdGIuicZ3nnwxtvtAbSsad2hNVpdgVzCIdlAE6kr YmPe2gksBrRwchquqwT349uiqlNI1ug/Z6644LAPtHuNjzkqUWPU0LkRrdvGPCxqUz8ORPhE7WtQj c1uiROImKW7n6VNQaPs08acDYecGJ2r6a9w4WRGz2hwxHtNZBPQ3bZv0WHH6xWiKt7Evyg0KB5lno 1DFYB+QdX8ZDCr2RZoaIxg==; Date: Fri, 06 Oct 2023 07:50:02 +0300 Message-Id: <83cyxs2w3p.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-Reply-To: <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> (message from Dmitry Gutov on Thu, 5 Oct 2023 23:23:17 +0300) Subject: Re: bug#66317: Project mode-line References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, 66317@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: -3.3 (---) > Date: Thu, 5 Oct 2023 23:23:17 +0300 > Cc: 66317@debbugs.gnu.org, me@eshelyaron.com > From: Dmitry Gutov > > On 04/10/2023 09:18, Juri Linkov wrote: > > diff --git a/lisp/bindings.el b/lisp/bindings.el > > index 207adb3a2a4..70e4087e131 100644 > > --- a/lisp/bindings.el > > +++ b/lisp/bindings.el > > @@ -682,6 +682,7 @@ mode-line-end-spaces > > 'mode-line-buffer-identification > > " " > > 'mode-line-position > > + '(project-mode-line project-mode-line-format) > > '(vc-mode vc-mode) > > " " > > 'mode-line-modes > > Speaking of this change from the first patch, do we want to have > project-mode-line automatically supported in Emacs <= 29, when they > install the new version from ELPA? Can we safely do that? > > Simply altering mode-line-format, as in the original patch, might mess > up the custom mode-line the user had set up (or installed). How to only > change the default mode-line is less obvious, but perhaps checking that > the current value is equal to (get 'mode-line-format 'standard-value) > would mean altering is okay. > > Or otherwise we should say something in the docstring of > project-mode-line: that it's only directly supported in Emacs 30, and in > older versions the user need to add the corresponding entry to the > mode-line-format by hand. I think supporting it in Emacs 30 is fine. It's a very minor feature, after all, so let's not invest too much effort in it. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 06 02:56:30 2023 Received: (at 66317) by debbugs.gnu.org; 6 Oct 2023 06:56:30 +0000 Received: from localhost ([127.0.0.1]:49043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoelC-0004Rx-8y for submit@debbugs.gnu.org; Fri, 06 Oct 2023 02:56:30 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:41987) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoel7-0004Ra-3t for 66317@debbugs.gnu.org; Fri, 06 Oct 2023 02:56:29 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 21E291BF217; Fri, 6 Oct 2023 06:55:57 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#66317: Project mode-line In-Reply-To: <83cyxs2w3p.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 06 Oct 2023 07:50:02 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> Date: Fri, 06 Oct 2023 09:44:51 +0300 Message-ID: <86sf6ow8po.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: Dmitry Gutov , me@eshelyaron.com, 66317@debbugs.gnu.org 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 (-) >> Speaking of this change from the first patch, do we want to have >> project-mode-line automatically supported in Emacs <= 29, when they >> install the new version from ELPA? Can we safely do that? >> >> Simply altering mode-line-format, as in the original patch, might mess >> up the custom mode-line the user had set up (or installed). How to only >> change the default mode-line is less obvious, but perhaps checking that >> the current value is equal to (get 'mode-line-format 'standard-value) >> would mean altering is okay. >> >> Or otherwise we should say something in the docstring of >> project-mode-line: that it's only directly supported in Emacs 30, and in >> older versions the user need to add the corresponding entry to the >> mode-line-format by hand. > > I think supporting it in Emacs 30 is fine. It's a very minor feature, > after all, so let's not invest too much effort in it. Agreed. No need to support it in older versions. Moreover, I'm trying to add another option to join project and vc indicators on the mode-line that won't be possible to support in older versions. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 06 02:56:32 2023 Received: (at 66317) by debbugs.gnu.org; 6 Oct 2023 06:56:33 +0000 Received: from localhost ([127.0.0.1]:49046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoelE-0004SC-Iz for submit@debbugs.gnu.org; Fri, 06 Oct 2023 02:56:32 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]:60481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qoelC-0004Ri-SS for 66317@debbugs.gnu.org; Fri, 06 Oct 2023 02:56:31 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 25D5140009; Fri, 6 Oct 2023 06:56:02 +0000 (UTC) From: Juri Linkov To: Spencer Baugh Subject: Re: bug#66317: Project mode-line In-Reply-To: (Spencer Baugh's message of "Thu, 05 Oct 2023 16:03:52 -0400") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <867co29v1y.fsf@mail.linkov.net> Date: Fri, 06 Oct 2023 09:46:06 +0300 Message-ID: <86il7kw8dl.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, Eli Zaretskii , Eshel Yaron , 66317@debbugs.gnu.org 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 (-) > One interesting bug: project-switch-project causes the modeline project > name to change for all buffers. > > For example if I do: > > C-x p p emacs-29 RET f > > then while I'm at the find-file prompt, all modelines for all buffers > show emacs-29 as the current project, no matter what they showed before > (even if they didn't show anything before) > > Haven't thought at all about how to fix this, but we might want to think > about it in the context of bug#63648 where we've been rethinking the > implementation of project-switch-project. I don't see this bug because I'm using other-project-prefix from bug#63648 ;-) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 06 06:20:59 2023 Received: (at 66317) by debbugs.gnu.org; 6 Oct 2023 10:20:59 +0000 Received: from localhost ([127.0.0.1]:49307 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qohx5-0001qH-Hg for submit@debbugs.gnu.org; Fri, 06 Oct 2023 06:20:59 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qohx1-0001q3-SV for 66317@debbugs.gnu.org; Fri, 06 Oct 2023 06:20:57 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id F2C1F5C01E3; Fri, 6 Oct 2023 06:20:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 06 Oct 2023 06:20:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696587631; x=1696674031; bh=V+HJA//lNYT4lk4LeT7eCBbcXfIUjwTFsIF AFEx9PSg=; b=n5YkWPj/mQVbAiuZlSiY9PP426/xKDPv4gDa0oCSRtDKyE5LA34 NbIzZjOKKQgj1jw7PszmOcoTtuWHmXodLmiYKQLpMtmoA7CTHlU08grCLyDU4scN 8ISysvtt/R9b11InCoTNlzwGIQMPFPMlD8Y0SzjFC3ZZvkrqd7PNgqx6k4VOxgFk RCdskm7GuPTysfVJezozZ4aZVUwbUHDqH2J9xO9kocXoVWhFly2IG2ltn6hPk0Jm g8uAd+v2+c43PlgxopdfghEkujw22WPVXfhbJSj/itd8NM3CTvUGDL1uzTWgiPXQ Vq+d2E8CvTr7Zl1Ver1yDUpt0toQWVFqovg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696587631; x=1696674031; bh=V+HJA//lNYT4lk4LeT7eCBbcXfIUjwTFsIF AFEx9PSg=; b=KmhVzIeS4knk3Mv65EiH5zAdkhVQHVrmBIlFAux9ZYmo8hFsIKS T8CMfVgbyfqS+qsygwTBExnMYd6tvHDe8BEbCZ9oXq1S/gHMK7D2CY7XoQesJoDJ 3oa4M0L/JUafETMo6N8mKtkt902KCKnTkgjuoyEJ8HeR9lA1YBUb85xjuxn60Lrh lSaK84zW+WIfe+xeo9xULE+wU/sG24A1OkEYbQccaVHBe+9rL48NX678M8di3OF6 gRjYGldDLN973RvHcsI2AXJNTwyDY7sTPpnZdPaF/VN+5LS7q3CB7tVq2RlFdcWF LTXh68Sm2qhenQNjkqTHYJbsbx/i5hnSPuw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrgeeigddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 6 Oct 2023 06:20:30 -0400 (EDT) Message-ID: <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> Date: Fri, 6 Oct 2023 13:20:29 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov , Eli Zaretskii References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86sf6ow8po.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, 66317@debbugs.gnu.org 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.2 (---) On 06/10/2023 09:44, Juri Linkov wrote: > Agreed. No need to support it in older versions. Moreover, > I'm trying to add another option to join project and vc indicators > on the mode-line that won't be possible to support in older versions. Then that needs to be explained in the docstring. project.el is installable in older versions. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 14:12:29 2023 Received: (at 66317) by debbugs.gnu.org; 9 Oct 2023 18:12:29 +0000 Received: from localhost ([127.0.0.1]:33104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpuk1-0001PP-JU for submit@debbugs.gnu.org; Mon, 09 Oct 2023 14:12:29 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:37849) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpujy-0001On-Bo for 66317@debbugs.gnu.org; Mon, 09 Oct 2023 14:12:26 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 1B7541C0006; Mon, 9 Oct 2023 18:11:57 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> (Dmitry Gutov's message of "Fri, 6 Oct 2023 13:20:29 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> Date: Mon, 09 Oct 2023 21:10:31 +0300 Message-ID: <86h6mzhdk8.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) >> Agreed. No need to support it in older versions. Moreover, >> I'm trying to add another option to join project and vc indicators >> on the mode-line that won't be possible to support in older versions. > > Then that needs to be explained in the docstring. project.el is installable > in older versions. Hopefully I explained this sufficiently well in the docstring both for users of older versions and users who customized the default mode line. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 14:23:21 2023 Received: (at 66317) by debbugs.gnu.org; 9 Oct 2023 18:23:21 +0000 Received: from localhost ([127.0.0.1]:33127 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpuuX-0004PU-7D for submit@debbugs.gnu.org; Mon, 09 Oct 2023 14:23:21 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:54297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpuuU-0004PG-2u for 66317@debbugs.gnu.org; Mon, 09 Oct 2023 14:23:19 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1D0323200A50; Mon, 9 Oct 2023 14:22:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 09 Oct 2023 14:22:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696875770; x=1696962170; bh=yBzBtr+/xKoqUAJy8oczLrZWtJxWa3pMbcH GFHQLtW4=; b=wuONgwhnNTdxYeJGqWZ5UJGEYkz0GAzPqgHcWWpt6OO8SjVnlJS gmQ9Y2qtfSpCMDTjjenicZosvnwEJSj+kkAvmgyHlLTwCdkaPCp5+j4cm/ai0fqe zeRTk1v2eMyLrKipQ0K8h6C7/vgI1F2mLgFu/uZzwJgGWMEIl8R8iaaE2R3iEvOi D/5OTkzF3rnFATGFwVNDZIlC2ak+px39OEsh6YRQ2x6ZCtVVgHOBjzol7KZ9oRkO HzljYqL3IQyyI+uPVI5Lc6fO56u1qMe7W543nWkfVLefJGfrlSPj6wjOOZR+aXeT mK/LnY+IgOLm522N5+8pEDMAXyZ+UFzduDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696875770; x=1696962170; bh=yBzBtr+/xKoqUAJy8oczLrZWtJxWa3pMbcH GFHQLtW4=; b=r210C0S+pzv93Wl783xN1dzAZdDeE+jOrRXGw1DkGtq3Hjwrujq nF1wjFaGHi2hX+C5ibLiWZtpoAG815PoUmgZhRGJ0Qlr9CYstymBCip7edS/RF6U nyjz9zlilrEsmwc6rAMlWrNoppnI2kG/J2d6WEfb+aoaW7OBvu5FdAaIaaFEMaG9 9jX56jDgijJQ82Qj5mZtzmBcaUzfZp2euqPLTw0/tzSYLIuI177Z5dq6QcC/6lmx IbqHVHF/AC8JD4HX7q+bK3Iwhi+w4AInL/XNJrWFs8QWqgzxhdz2/8o8Pit5IgEN TDNmxM9cya60RgLMmbODzqA87xacbomVwOw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheefgdduvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Oct 2023 14:22:49 -0400 (EDT) Message-ID: Date: Mon, 9 Oct 2023 21:22:47 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86h6mzhdk8.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, Eli Zaretskii , 66317@debbugs.gnu.org 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.2 (---) On 09/10/2023 21:10, Juri Linkov wrote: >>> Agreed. No need to support it in older versions. Moreover, >>> I'm trying to add another option to join project and vc indicators >>> on the mode-line that won't be possible to support in older versions. >> Then that needs to be explained in the docstring. project.el is installable >> in older versions. > Hopefully I explained this sufficiently well in the docstring > both for users of older versions and users who customized the > default mode line. Not sure: I imagine that most users don't customize mode-line-format themselves, and thus don't know which contents it has. I would append some clarification that in Emacs 30 the mode-line has that element by default. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 14:50:44 2023 Received: (at 66317) by debbugs.gnu.org; 9 Oct 2023 18:50:44 +0000 Received: from localhost ([127.0.0.1]:33168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpvL2-0007vR-03 for submit@debbugs.gnu.org; Mon, 09 Oct 2023 14:50:44 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]:51719) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpvL0-0007vA-N0 for 66317@debbugs.gnu.org; Mon, 09 Oct 2023 14:50:43 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 576DAC0002; Mon, 9 Oct 2023 18:50:11 +0000 (UTC) From: Juri Linkov To: Eshel Yaron Subject: Re: bug#66317: Project mode-line In-Reply-To: <867co29v1y.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 04 Oct 2023 20:06:17 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <867co29v1y.fsf@mail.linkov.net> Date: Mon, 09 Oct 2023 21:45:37 +0300 Message-ID: <8634yjhbxq.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, Eli Zaretskii , 66317@debbugs.gnu.org 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, I've tried this patch on top of Emacs master and it seems to >> work well. One small suggestion is to consider giving the project name >> in the mode line a dedicated face, so people/themes could customize its >> appearance. (By default, it could just inherit from `default`.) > > Thanks for suggestion, will do on the second round after pushing the > initial version. I'm not yet sure whether better to add a new face or a new variable like grep-hit-face and xref-num-matches-face that refers to the existing face. Then it would be possible to set such variable e.g. to the face `vc-state-base` that inherits from `default`. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 14:50:48 2023 Received: (at 66317) by debbugs.gnu.org; 9 Oct 2023 18:50:48 +0000 Received: from localhost ([127.0.0.1]:33171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpvL6-0007vj-9K for submit@debbugs.gnu.org; Mon, 09 Oct 2023 14:50:48 -0400 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:42429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpvL4-0007vG-9E for 66317@debbugs.gnu.org; Mon, 09 Oct 2023 14:50:47 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 9371D1BF203; Mon, 9 Oct 2023 18:50:16 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: (Dmitry Gutov's message of "Mon, 9 Oct 2023 21:22:47 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> Date: Mon, 09 Oct 2023 21:48:22 +0300 Message-ID: <86ttqzfx8p.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) >>>> Agreed. No need to support it in older versions. Moreover, >>>> I'm trying to add another option to join project and vc indicators >>>> on the mode-line that won't be possible to support in older versions. >>> Then that needs to be explained in the docstring. project.el is installable >>> in older versions. >> Hopefully I explained this sufficiently well in the docstring >> both for users of older versions and users who customized the >> default mode line. > > Not sure: I imagine that most users don't customize mode-line-format > themselves, and thus don't know which contents it has. > > I would append some clarification that in Emacs 30 the mode-line has that > element by default. I'm not sure if this helps because a user might run Emacs 30 and still using some package that heavily modifies the mode line. This will puzzle the user: why it doesn't work in Emacs 30 as documented. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 14:53:19 2023 Received: (at 66317) by debbugs.gnu.org; 9 Oct 2023 18:53:19 +0000 Received: from localhost ([127.0.0.1]:33179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpvNW-00080A-Qf for submit@debbugs.gnu.org; Mon, 09 Oct 2023 14:53:19 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:35803) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpvNO-0007zb-00 for 66317@debbugs.gnu.org; Mon, 09 Oct 2023 14:53:17 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 989C03200A55; Mon, 9 Oct 2023 14:52:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 09 Oct 2023 14:52:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696877562; x=1696963962; bh=Hwe5r8UIiGIVMIVm3N/evZZAcHCm1RMPqfA n308qFfM=; b=QB69M6Z558aoUSwPymoJxpKXAHKCIGh7hpbZS9o4QFv3kS91PXb SrOGLdkMhzqoQwL4Z4V76JAV+DnknyJ1bOVg6elOuBK6OKf7qeevAp47b5XHBzEv BE9UmRBXM5DHfFX549P5RKtC3MmoZdQRi8EdS37UQYdsz3pHWBUX7KPq8mH7OH7Q EubXkkK1Vo/FAjodnyCmyMftqxlAU2QB0MjemZxiMSrAHbZHkxcJUNa9AYzwDuJ+ 3SpWgSiaCfnvLh8V7qsL9iVHm6UdJVwLbKe3QhgwdSFiHzyAkF6Y3+nSYY+Yvwdh wAeUgjb0EEXWsPQzEpd/oHSv/Ydqb2ThSfw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696877562; x=1696963962; bh=Hwe5r8UIiGIVMIVm3N/evZZAcHCm1RMPqfA n308qFfM=; b=g+4hB1oUyWQZThMoaO58a5G/jmvYCQukQEgTbxPtlwLljKTggBi Gxg3iaHckoT4juSP0O5EQe27ABAsnaDmnJnur9jBOV9gvbj7vpVCVDbJ1cmpaRP/ 3C58c+cEJf0ZnpuA2fixDM/wKWLPYFJulpWsH5G+FUQKv2nAcdQLHDNVWbaLl3XG nnpcJAaM0zeJtd9pd8xz0dw0SlHJYaXleXn6hrEPpUbPmx6fA7HYoP0Y4/BSizEx dGAIRKTRO/1kTSZA4UEtuHDnSYVh1AooqcI8mJONneZueEmx5nrWWZ/Ohybl7c+P Q4ZyCusGTWw39r4can0TzBHGEGE4uD55G6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheefgddufedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Oct 2023 14:52:40 -0400 (EDT) Message-ID: <2d548b54-82df-be3c-0523-cdcb0137e2c5@gutov.dev> Date: Mon, 9 Oct 2023 21:52:39 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> <86ttqzfx8p.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86ttqzfx8p.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, Eli Zaretskii , 66317@debbugs.gnu.org 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.2 (---) On 09/10/2023 21:48, Juri Linkov wrote: >>>>> Agreed. No need to support it in older versions. Moreover, >>>>> I'm trying to add another option to join project and vc indicators >>>>> on the mode-line that won't be possible to support in older versions. >>>> Then that needs to be explained in the docstring. project.el is installable >>>> in older versions. >>> Hopefully I explained this sufficiently well in the docstring >>> both for users of older versions and users who customized the >>> default mode line. >> Not sure: I imagine that most users don't customize mode-line-format >> themselves, and thus don't know which contents it has. >> >> I would append some clarification that in Emacs 30 the mode-line has that >> element by default. > I'm not sure if this helps because a user might run Emacs 30 > and still using some package that heavily modifies the mode line. > This will puzzle the user: why it doesn't work in Emacs 30 > as documented. Hence "by default". Mode-line package authors might be helped out by this explanation as well. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 09 14:57:39 2023 Received: (at 66317) by debbugs.gnu.org; 9 Oct 2023 18:57:39 +0000 Received: from localhost ([127.0.0.1]:33188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpvRj-0008Ek-9N for submit@debbugs.gnu.org; Mon, 09 Oct 2023 14:57:39 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:36972 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qpvRh-0008Eb-1C for 66317@debbugs.gnu.org; Mon, 09 Oct 2023 14:57:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1696877834; bh=5RvKzpSxrKQnU4jyteR1rHy6CJLp5kd25v/nCS46gp8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=fB8ea8eyxIDTr+PtJlb6NQyZxvErB7G4oIhSABCsZseKDm1Uvrx7IUnuCT6lTve41 /8em/IkrSli7tAnpONHgRUSheMcsopapghAqtLuzJKCbczFIsTf4CkH/bWyosc8wIs nEH+9Sj0qiNnf10x7i+XF7Tay2B6QoEO31k4Z9/PQO6VoZcGn4vpz2AWyFBfqfMTpE XJi0XLrhG7BuvxS2BkQKh4MnjYQRZpZgOQhtKqOYJxTf268sxvFsD2aaqZReG6vHJh M0reHXNk/jbt+rQ8p6toWUPpJ2wsgqXGnbTHH2YTJohNBjNSqKLQAY1nOQq/yRRGqJ 0yd+LC9treg7g== From: Eshel Yaron To: Juri Linkov Subject: Re: bug#66317: Project mode-line In-Reply-To: <8634yjhbxq.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 09 Oct 2023 21:45:37 +0300") References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <867co29v1y.fsf@mail.linkov.net> <8634yjhbxq.fsf@mail.linkov.net> Date: Mon, 09 Oct 2023 20:57:12 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) Juri Linkov writes: >>> Thanks, I've tried this patch on top of Emacs master and it seems to >>> work well. One small suggestion is to consider giving the project name >>> in the mode line a dedicated face, so people/themes could customize its >>> appearance. (By default, it could just inherit from `default`.) >> >> Thanks for suggestion, will do on the second round after pushing the >> initial version. > > I'm not yet sure whether better to add a new face or a new variable like > grep-hit-face and xref-num-matches-face that refers to the existing face. > Then it would be possible to set such variable e.g. to the face `vc-state-base` > that inherits from `default`. Personally I think a variable pointing to a face name is a somewhat redundant indirection, since customizing the face to inherit from some other face is just as easy as customizing the variable to point to a different face. But either way works, of course. Best, Eshel From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 02:52:25 2023 Received: (at 66317) by debbugs.gnu.org; 10 Oct 2023 06:52:25 +0000 Received: from localhost ([127.0.0.1]:33865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq6bR-0007op-Jl for submit@debbugs.gnu.org; Tue, 10 Oct 2023 02:52:25 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60911) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq6bN-0007oW-D5 for 66317@debbugs.gnu.org; Tue, 10 Oct 2023 02:52:24 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id ABAD2E0004; Tue, 10 Oct 2023 06:51:51 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: <2d548b54-82df-be3c-0523-cdcb0137e2c5@gutov.dev> (Dmitry Gutov's message of "Mon, 9 Oct 2023 21:52:39 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> <86ttqzfx8p.fsf@mail.linkov.net> <2d548b54-82df-be3c-0523-cdcb0137e2c5@gutov.dev> Date: Tue, 10 Oct 2023 09:50:52 +0300 Message-ID: <8634yjotrn.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: me@eshelyaron.com, Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) >>>>>> Agreed. No need to support it in older versions. Moreover, >>>>>> I'm trying to add another option to join project and vc indicators >>>>>> on the mode-line that won't be possible to support in older versions. >>>>> Then that needs to be explained in the docstring. project.el is installable >>>>> in older versions. >>>> Hopefully I explained this sufficiently well in the docstring >>>> both for users of older versions and users who customized the >>>> default mode line. >>> Not sure: I imagine that most users don't customize mode-line-format >>> themselves, and thus don't know which contents it has. >>> >>> I would append some clarification that in Emacs 30 the mode-line has that >>> element by default. >> I'm not sure if this helps because a user might run Emacs 30 >> and still using some package that heavily modifies the mode line. >> This will puzzle the user: why it doesn't work in Emacs 30 >> as documented. > > Hence "by default". > > Mode-line package authors might be helped out by this explanation as well. Maybe this would be sufficient: diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 2475d7c403e..1d6c9c1cf1b 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -2109,7 +2109,8 @@ project-uniquify-dirname-transform (defcustom project-mode-line nil "Show the current project name with the menu on the mode line. This feature requires the presence of the following item in -`mode-line-format': `(project-mode-line project-mode-line-format)'." +`mode-line-format': `(project-mode-line project-mode-line-format)' +that already exists by default in Emacs 30." :type 'boolean :group 'project :version "30.1") From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 02:58:20 2023 Received: (at 66317) by debbugs.gnu.org; 10 Oct 2023 06:58:20 +0000 Received: from localhost ([127.0.0.1]:33873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq6hA-0007xa-BP for submit@debbugs.gnu.org; Tue, 10 Oct 2023 02:58:20 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:45915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq6h7-0007xM-4w for 66317@debbugs.gnu.org; Tue, 10 Oct 2023 02:58:18 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id D1FE6FF80D; Tue, 10 Oct 2023 06:57:47 +0000 (UTC) From: Juri Linkov To: Eshel Yaron Subject: Re: bug#66317: Project mode-line In-Reply-To: (Eshel Yaron's message of "Mon, 09 Oct 2023 20:57:12 +0200") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <867co29v1y.fsf@mail.linkov.net> <8634yjhbxq.fsf@mail.linkov.net> Date: Tue, 10 Oct 2023 09:56:51 +0300 Message-ID: <86o7h7nex8.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, Eli Zaretskii , 66317@debbugs.gnu.org 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, I've tried this patch on top of Emacs master and it seems to >>>> work well. One small suggestion is to consider giving the project name >>>> in the mode line a dedicated face, so people/themes could customize its >>>> appearance. (By default, it could just inherit from `default`.) >>> >>> Thanks for suggestion, will do on the second round after pushing the >>> initial version. >> >> I'm not yet sure whether better to add a new face or a new variable like >> grep-hit-face and xref-num-matches-face that refers to the existing face. >> Then it would be possible to set such variable e.g. to the face `vc-state-base` >> that inherits from `default`. > > Personally I think a variable pointing to a face name is a somewhat > redundant indirection, since customizing the face to inherit from some > other face is just as easy as customizing the variable to point to a > different face. But either way works, of course. Probably adding a variable would be more suitable since currently there are no faces defined in project.el at all. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 03:11:08 2023 Received: (at 66317) by debbugs.gnu.org; 10 Oct 2023 07:11:09 +0000 Received: from localhost ([127.0.0.1]:33877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq6tU-0008IS-Lf for submit@debbugs.gnu.org; Tue, 10 Oct 2023 03:11:08 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:48338 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq6tP-0008I1-Rm for 66317@debbugs.gnu.org; Tue, 10 Oct 2023 03:11:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1696921838; bh=kSQjhtGt4DeoG2+16Wf0U52PLuHrDCRcERdv8dk6SXE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mWnMYYXnaPG/3F4AYj7dOen6+1rWRlrea3f9GvLqR+Q9Kp52Oxk600mVLMz4zq38u XMAIQJlL2EnzN76pCfP2MYN75Yf2PYcac3nK7T23eY9LwaRhXpgHhz9+QO92rkM764 rwK5869bB0/0NkQwTLAE+KKx1QWyGJa2gqmS4BoL0JLxoQqSxdX8nsDqH9OrWRdMUl m2h0q7nlhbjeofbb8xd4iJREts0A4l2Jr9hvgkFxB0G8K6mO5mRg7oUhuvx2p8XsBh 62jO/U+ODMXxbO50HxdbMdivljBziILM7j9T9LRbRKVqLh8lH4lbBb1GUUaLOnh8j9 18jUgoKRuQ6rA== From: Eshel Yaron To: Juri Linkov Subject: Re: bug#66317: Project mode-line In-Reply-To: <8634yjotrn.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 10 Oct 2023 09:50:52 +0300") References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> <86ttqzfx8p.fsf@mail.linkov.net> <2d548b54-82df-be3c-0523-cdcb0137e2c5@gutov.dev> <8634yjotrn.fsf@mail.linkov.net> X-Hashcash: 1:20:231010:dmitry@gutov.dev::lRpZklcVD/xbLy+N:2TLA X-Hashcash: 1:20:231010:eliz@gnu.org::rLvB0EMXyEPTyrFm:01+U X-Hashcash: 1:20:231010:juri@linkov.net::2Afg+ltaQ4Q8Pvew:5LsY X-Hashcash: 1:20:231010:66317@debbugs.gnu.org::jyBKy9rIpS8TwJX6:5z43 Date: Tue, 10 Oct 2023 09:10:36 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66317 Cc: Dmitry Gutov , Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) Juri Linkov writes: >>>>>>> Agreed. No need to support it in older versions. Moreover, >>>>>>> I'm trying to add another option to join project and vc indicators >>>>>>> on the mode-line that won't be possible to support in older versions. >>>>>> Then that needs to be explained in the docstring. project.el is installable >>>>>> in older versions. >>>>> Hopefully I explained this sufficiently well in the docstring >>>>> both for users of older versions and users who customized the >>>>> default mode line. >>>> Not sure: I imagine that most users don't customize mode-line-format >>>> themselves, and thus don't know which contents it has. >>>> >>>> I would append some clarification that in Emacs 30 the mode-line has that >>>> element by default. >>> I'm not sure if this helps because a user might run Emacs 30 >>> and still using some package that heavily modifies the mode line. >>> This will puzzle the user: why it doesn't work in Emacs 30 >>> as documented. >> >> Hence "by default". >> >> Mode-line package authors might be helped out by this explanation as well. > > Maybe this would be sufficient: > > diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el > index 2475d7c403e..1d6c9c1cf1b 100644 > --- a/lisp/progmodes/project.el > +++ b/lisp/progmodes/project.el > @@ -2109,7 +2109,8 @@ project-uniquify-dirname-transform > (defcustom project-mode-line nil > "Show the current project name with the menu on the mode line. > This feature requires the presence of the following item in > -`mode-line-format': `(project-mode-line project-mode-line-format)'." > +`mode-line-format': `(project-mode-line project-mode-line-format)' > +that already exists by default in Emacs 30." To me, this description looks a bit too implementation-focused. How about the following? Show the name of the current project on the mode line. This option only works in Emacs 30 or later, for a similar effect in Emacs 29 or earlier add `project-mode-line-format' to your `mode-line-format' instead of using this option. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 03:19:08 2023 Received: (at 66317) by debbugs.gnu.org; 10 Oct 2023 07:19:08 +0000 Received: from localhost ([127.0.0.1]:33882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq71H-0008VE-IR for submit@debbugs.gnu.org; Tue, 10 Oct 2023 03:19:07 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:60994 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qq71F-0008V6-EN for 66317@debbugs.gnu.org; Tue, 10 Oct 2023 03:19:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1696922323; bh=uyWYlFQZJ9a5wkdpO1LjQYe8HvUuyn5TPqg/XVtCheQ=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Rgk8zjECC8+JKJI6Xsb8mwXB+eskhkF4eiA+/3Q6Xt6wp80YCnRHOlAunrNYU/27F Z40BFIdk+Fz4rJFYLOW3YGB1K1hkqmCMri8JwCVvf4YDUona2R0WELV76fpIiPBy3V 7jrYzHXeC5XKQq2b2KRCc+ZXRajCvmfcA9mJmXXt6F8MePvNKxCIE9eHG25YhcR0MX 3j50H48y00h8tHzz7vbqvHtbU7E7UYLyzkXZ7xk9aS2kXYh4a3keYn7IduTO3xBTuD GJzlPaoELRfEawdB56FsmTdzvHIYOFlf+BYuPQ2KnDA0Gz6LV1ElqRnWYSoUi8v2B9 Skqd3QfM+h4TA== From: Eshel Yaron To: Juri Linkov Subject: Re: bug#66317: Project mode-line In-Reply-To: (Eshel Yaron's message of "Tue, 10 Oct 2023 09:10:36 +0200") References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> <86ttqzfx8p.fsf@mail.linkov.net> <2d548b54-82df-be3c-0523-cdcb0137e2c5@gutov.dev> <8634yjotrn.fsf@mail.linkov.net> Date: Tue, 10 Oct 2023 09:18:41 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66317 Cc: Dmitry Gutov , Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) Eshel Yaron writes: > Juri Linkov writes: > >> >> Maybe this would be sufficient: >> >> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el >> index 2475d7c403e..1d6c9c1cf1b 100644 >> --- a/lisp/progmodes/project.el >> +++ b/lisp/progmodes/project.el >> @@ -2109,7 +2109,8 @@ project-uniquify-dirname-transform >> (defcustom project-mode-line nil >> "Show the current project name with the menu on the mode line. >> This feature requires the presence of the following item in >> -`mode-line-format': `(project-mode-line project-mode-line-format)'." >> +`mode-line-format': `(project-mode-line project-mode-line-format)' >> +that already exists by default in Emacs 30." > > To me, this description looks a bit too implementation-focused. How > about the following? > > Show the name of the current project on the mode line. > > This option only works in Emacs 30 or later, for a similar effect in > Emacs 29 or earlier add `project-mode-line-format' to your > `mode-line-format' instead of using this option. Correction, in the first line I meant to write: Whether to show the name of the current project on the mode line. Best, Eshel From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 06:45:32 2023 Received: (at 66317) by debbugs.gnu.org; 10 Oct 2023 10:45:33 +0000 Received: from localhost ([127.0.0.1]:34090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqAF2-0007SX-HE for submit@debbugs.gnu.org; Tue, 10 Oct 2023 06:45:32 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:58561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqAF0-0007SI-KW for 66317@debbugs.gnu.org; Tue, 10 Oct 2023 06:45:31 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 52BAF5C0245; Tue, 10 Oct 2023 06:45:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 10 Oct 2023 06:45:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696934704; x=1697021104; bh=0DTfTr4sjQ4EpNua5pheyuTOkwlApqiRgC6 IdtIfHsg=; b=MSHDXMX0sba6CWhWTV8EaHpCl06C+bSA3RxG8EgRax185IskAMB di9C8scR1wQ53NTLg84abwLEgdxHaStO68W99hLkKEiOJaiV5kRv8JXRhFiGE0qU fXWAGupWbpnCy+rP4Fy0FoEUJkJyzrWSXpKMZhKyJbyPt3f6+atJz9iFKj0BfBeR Kfq2ux7mDK0Te0NBgFRPg8MIwUrqhBQcYcp+dc1dd6OSqpuQc5AZrGmP6ar3aowm A1PlookXeahbWUV1xKYA/+MI3oOnkV4nDkaUPluAob+Y87GMEKhtGXU1oJXxdmKc /LwhIiqWJUDqI4+ADNqUxQeYZ7zMwQWOkMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696934704; x=1697021104; bh=0DTfTr4sjQ4EpNua5pheyuTOkwlApqiRgC6 IdtIfHsg=; b=bFZb5ZKXYX6XCQ7EjwicJN30X1OfI94ftflVwlafxVsRyMc4hj7 GcwenEvyk9vmcrYU6QHkeMx7uVpdAYWosUCdK5j8vBjwF8oR5bplJarZVl8+GAum lsLrM0E4Ir9S422S0X0iQhzI4jt6aNvHh+UFRrOca3DYZ5ZesQgxtGHTnbjRdtMk LB0Hw02t7TP6NUODgucR6fErxt9sfbYf6K4GL9iEzvBhabR9i4js3Yj1mUDAFgRL kETP6P+rFwubOEypH2s4805HlAViDvOOv0kE2ehskwLXLlUKNRlycGClvvDm5oqU G90vq+uveSnbyOhYgJ6Kx/YP0gH0DP9bU8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheehgdeftdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Oct 2023 06:45:02 -0400 (EDT) Message-ID: <8e63688d-5d2d-fad2-7d42-e4ff690eeaec@gutov.dev> Date: Tue, 10 Oct 2023 13:45:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Eshel Yaron , Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> <86ttqzfx8p.fsf@mail.linkov.net> <2d548b54-82df-be3c-0523-cdcb0137e2c5@gutov.dev> <8634yjotrn.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: Eli Zaretskii , 66317@debbugs.gnu.org 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.2 (---) On 10/10/2023 10:10, Eshel Yaron wrote: > Juri Linkov writes: > >>>>>>>> Agreed. No need to support it in older versions. Moreover, >>>>>>>> I'm trying to add another option to join project and vc indicators >>>>>>>> on the mode-line that won't be possible to support in older versions. >>>>>>> Then that needs to be explained in the docstring. project.el is installable >>>>>>> in older versions. >>>>>> Hopefully I explained this sufficiently well in the docstring >>>>>> both for users of older versions and users who customized the >>>>>> default mode line. >>>>> Not sure: I imagine that most users don't customize mode-line-format >>>>> themselves, and thus don't know which contents it has. >>>>> >>>>> I would append some clarification that in Emacs 30 the mode-line has that >>>>> element by default. >>>> I'm not sure if this helps because a user might run Emacs 30 >>>> and still using some package that heavily modifies the mode line. >>>> This will puzzle the user: why it doesn't work in Emacs 30 >>>> as documented. >>> >>> Hence "by default". >>> >>> Mode-line package authors might be helped out by this explanation as well. >> >> Maybe this would be sufficient: >> >> diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el >> index 2475d7c403e..1d6c9c1cf1b 100644 >> --- a/lisp/progmodes/project.el >> +++ b/lisp/progmodes/project.el >> @@ -2109,7 +2109,8 @@ project-uniquify-dirname-transform >> (defcustom project-mode-line nil >> "Show the current project name with the menu on the mode line. >> This feature requires the presence of the following item in >> -`mode-line-format': `(project-mode-line project-mode-line-format)'." >> +`mode-line-format': `(project-mode-line project-mode-line-format)' >> +that already exists by default in Emacs 30." > > To me, this description looks a bit too implementation-focused. How > about the following? I'm fine with either, but... > Show the name of the current project on the mode line. > > This option only works in Emacs 30 or later, for a similar effect in > Emacs 29 or earlier add `project-mode-line-format' to your > `mode-line-format' instead of using this option. There might be a problem in the fact that it still won't work in Emacs 30 if the user had customized the mode-line (or installed one of the packages that do). Also: "in addition", not "instead". From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 07:34:50 2023 Received: (at 66317) by debbugs.gnu.org; 10 Oct 2023 11:34:50 +0000 Received: from localhost ([127.0.0.1]:34138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqB0k-0005s0-7R for submit@debbugs.gnu.org; Tue, 10 Oct 2023 07:34:50 -0400 Received: from mail.eshelyaron.com ([107.175.124.16]:54754 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqB0g-0005rr-SX for 66317@debbugs.gnu.org; Tue, 10 Oct 2023 07:34:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1696937665; bh=g9WiT7fSgvjImRiWyDsqD3b4l0JBzDs8lJc2Iiv+j+g=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gSVdR8G7SiGJlHLOTfOc0WUuAr+Gpxu/qqeH8WVqQvmofKKtC7ns0S4id78Y8hs9I s+QkXGeE2KoTWfgXbNHTaOEYDGxGOXmx2Lw6no1F7kMao9UzdFxla2yUPfAlkZGXj+ ZGzv8BaQcWc5SM7FTwTUZbmyVIBMdVio3OpeQ44TrQIa3OF7Zwo0zDhCAILhp6RVLj 4GP33VGhDqGGFqfX/KUw9afzETLHoR+siJRCsh8IgjJlGS5aJTX2ejf8+pSZam0fE0 uJQilrgnT76xgwNLrTQXx4HUCXTreNVNqSuX6WJTVWSBqvKebgfvUKyIfOabxwojfN BhlMtEk/1Q3BA== From: Eshel Yaron To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: <8e63688d-5d2d-fad2-7d42-e4ff690eeaec@gutov.dev> (Dmitry Gutov's message of "Tue, 10 Oct 2023 13:45:00 +0300") References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> <86ttqzfx8p.fsf@mail.linkov.net> <2d548b54-82df-be3c-0523-cdcb0137e2c5@gutov.dev> <8634yjotrn.fsf@mail.linkov.net> <8e63688d-5d2d-fad2-7d42-e4ff690eeaec@gutov.dev> Date: Tue, 10 Oct 2023 13:34:23 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66317 Cc: Eli Zaretskii , 66317@debbugs.gnu.org, Juri Linkov 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 (-) Dmitry Gutov writes: >> To me, this description looks a bit too implementation-focused. How >> about the following? > > I'm fine with either, but... > >> Show the name of the current project on the mode line. >> This option only works in Emacs 30 or later, for a similar >> effect in >> Emacs 29 or earlier add `project-mode-line-format' to your >> `mode-line-format' instead of using this option. > > There might be a problem in the fact that it still won't work in Emacs > 30 if the user had customized the mode-line (or installed one of the > packages that do). I agree, perhaps we could say: Note that this feature relies on the default value of `mode-line-format' in Emacs 30 and later. With a custom mode line, as well as on Emacs 29 or earlier, add `project-mode-line-format' to your `mode-line-format' instead of setting this option. > Also: "in addition", not "instead". There's no harm in adding `project-mode-line-format` to `mode-line-format` in addition to setting `project-mode-line`, but I did mean "instead" and not "in addition", since the value of `project-mode-line` is irrelevant if you follow the suggestion to add `project-mode-line-format` directly to `mode-line-format`. Best, Eshel From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 07:42:47 2023 Received: (at 66317) by debbugs.gnu.org; 10 Oct 2023 11:42:47 +0000 Received: from localhost ([127.0.0.1]:34156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqB8Q-00069w-1J for submit@debbugs.gnu.org; Tue, 10 Oct 2023 07:42:47 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38369) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqB8L-00069g-A0 for 66317@debbugs.gnu.org; Tue, 10 Oct 2023 07:42:44 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 002525C01BC; Tue, 10 Oct 2023 07:42:14 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 10 Oct 2023 07:42:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696938134; x=1697024534; bh=jenLKoQzB1xAX+x/ngHLI3CzgwS3K/MuVaC /oI6ZusY=; b=hoEi/zAI7yhOyYwYyboOjKFgXJXFINeV+byT0z4ZyIsXs8chu8K TR4L6R9mOvYxsqkr586O1+kADvgU7jtuwQLqdn4mepPTcxPXMkh7VHCLov9kfJF9 ZiYex9KUwm6wCQ8aYdz/hZOUyg//HTIMl87giScxZlb246CIPmTVkrDOKj74WVWJ Wm6DQIf86pQ7wUDg5mWCpzNABdQm37+gg9mcRbrNnBZuYARZCdwMCmPS1VC19sqK 8Y9QZOKVUK1+6h2CsCpY9yOnw/LYSAxsB9ZZrCVMGCI3mwGTrPvCPs+q/zGa0LJL uiCV06xGCfEYEUsxTYRm+c8BPE2bgddIvwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696938134; x=1697024534; bh=jenLKoQzB1xAX+x/ngHLI3CzgwS3K/MuVaC /oI6ZusY=; b=UT+0ehWbdeBFuAOcTfbqMOkmGMr+aaYKqx2mzMcDASiVqKDcQdS RCupgthJiGir6re8jchIsks22vhp5Oi5/jEDofwUT9GY2KClmhkr+zljsmWZvV8h UI31pueWthy8WybLyQ7ITVHYIjFjYboKZerBYkB3Va5tyztZluVssnGJmNNNvGFP te9LuYFrujtCqxWUrmLG2ZVlRnd81tPLwK8Pws5toEZhYjNrkxMoRZvLNil1NzLW HdEy4uKBIBHOHmBCux39QKdfvPXwyoAdkS0+ZMd4RjTg/oiav2DJG+Q5eA8RUKik W/SzRKxepwxm/mNJEaGTwRVpcz1ixZ86Siw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheehgdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Oct 2023 07:42:13 -0400 (EDT) Message-ID: <8242e20a-5cdf-8cb8-e3e6-5258c79ee8b2@gutov.dev> Date: Tue, 10 Oct 2023 14:42:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Eshel Yaron References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <456e170e-2934-9f8b-e34a-3076901f8de1@gutov.dev> <83cyxs2w3p.fsf@gnu.org> <86sf6ow8po.fsf@mail.linkov.net> <5f2ffce9-e7ee-d8c7-4fbe-da28c2ab114c@gutov.dev> <86h6mzhdk8.fsf@mail.linkov.net> <86ttqzfx8p.fsf@mail.linkov.net> <2d548b54-82df-be3c-0523-cdcb0137e2c5@gutov.dev> <8634yjotrn.fsf@mail.linkov.net> <8e63688d-5d2d-fad2-7d42-e4ff690eeaec@gutov.dev> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 66317 Cc: Eli Zaretskii , 66317@debbugs.gnu.org, Juri Linkov 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.2 (---) On 10/10/2023 14:34, Eshel Yaron wrote: > There's no harm in adding `project-mode-line-format` to > `mode-line-format` in addition to setting `project-mode-line`, but I did > mean "instead" and not "in addition", since the value of > `project-mode-line` is irrelevant if you follow the suggestion to add > `project-mode-line-format` directly to `mode-line-format`. Understood. That creates two different documented ways to enable the feature, though. Maybe that's okay. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 10 07:47:21 2023 Received: (at 66317) by debbugs.gnu.org; 10 Oct 2023 11:47:21 +0000 Received: from localhost ([127.0.0.1]:34161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqBCq-0006I3-RX for submit@debbugs.gnu.org; Tue, 10 Oct 2023 07:47:21 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:33751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqBCp-0006Hn-3g for 66317@debbugs.gnu.org; Tue, 10 Oct 2023 07:47:20 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id C474C5C0236; Tue, 10 Oct 2023 07:46:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 10 Oct 2023 07:46:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1696938412; x=1697024812; bh=Zus7QM9m6nd8IWoyQTOBi2L5G6z6Y3pGAmY m42ifUoM=; b=vuVBa7zJw2ClMl0Y+TzaG8MUaCQPBl8SN0A0zbf2PMbfQ0v1IMr Yr0XAMWRH9odhRSbhk38GUvei2HwvdzNzKFnJbb2vkheBL3sn1Nm2I9/74/rSSQp zVSltzxRzxt699yWJPTA9CaMu4wGyzMT9ZweZPqt0/uPS6hBkC76fAQj1pFZf7O7 KMjYlD8JjNZ1K6ZGas79KXmidAu9xdmw9haq8pC/X1UqllkIYpLOjgOJ70u7VQ58 JQGhnXU/dHbSEd4asgtwkYQGnUPQuAcq0JIqUwvD2My9e3hiU/r3iWx2mvc14wPv RdgJOgcTSefJklhrwQM8FMUtvkj7n0bW5Mw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696938412; x=1697024812; bh=Zus7QM9m6nd8IWoyQTOBi2L5G6z6Y3pGAmY m42ifUoM=; b=kwcusBzU7HX26vSBnC860DQScvaMadvxTUEKbAwBfLpp1Z0XpIZ ZTbhqfIUDXj1AMHM4FKHdshqPEIDcyfbB24dQucfo8Xq9+bhOEo+Hi68Vs8uSgQa HcYrfDN+kVEM/eBe05ab1+f9aYc3ijDXQM69keOXhOT7Ibdj+yzh6gfJ9Vzwn1B/ +F88zFukMJ2ENZvU5WPFT8PqK892ocHqqei/qFceZkte6/8vz5drCtkJ59x4rThR 5BZBMMiB/XWyKB2lPWEeDRRg+VtCE7g6Ty/JVEyyIL8qL6oV2+YDoKujK3b2UQfs WACs/W/vzQwxkv5Ud1kNi2GM2ZOijD41xAg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheehgdegfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 10 Oct 2023 07:46:51 -0400 (EDT) Message-ID: <0d89af0c-070b-f681-7486-e923799c4c2e@gutov.dev> Date: Tue, 10 Oct 2023 14:46:49 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov , Eshel Yaron References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <867co29v1y.fsf@mail.linkov.net> <8634yjhbxq.fsf@mail.linkov.net> <86o7h7nex8.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86o7h7nex8.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: Eli Zaretskii , 66317@debbugs.gnu.org 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.2 (---) On 10/10/2023 09:56, Juri Linkov wrote: >>>>> Thanks, I've tried this patch on top of Emacs master and it seems to >>>>> work well. One small suggestion is to consider giving the project name >>>>> in the mode line a dedicated face, so people/themes could customize its >>>>> appearance. (By default, it could just inherit from `default`.) >>>> Thanks for suggestion, will do on the second round after pushing the >>>> initial version. >>> I'm not yet sure whether better to add a new face or a new variable like >>> grep-hit-face and xref-num-matches-face that refers to the existing face. >>> Then it would be possible to set such variable e.g. to the face `vc-state-base` >>> that inherits from `default`. >> Personally I think a variable pointing to a face name is a somewhat >> redundant indirection, since customizing the face to inherit from some >> other face is just as easy as customizing the variable to point to a >> different face. But either way works, of course. > Probably adding a variable would be more suitable since currently > there are no faces defined in project.el at all. FWIW, I don't have a strong opinion. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 11 02:29:34 2023 Received: (at 66317) by debbugs.gnu.org; 11 Oct 2023 06:29:34 +0000 Received: from localhost ([127.0.0.1]:37356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqSis-0003T6-4g for submit@debbugs.gnu.org; Wed, 11 Oct 2023 02:29:34 -0400 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]:53555) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqSim-0003Sn-3t for 66317@debbugs.gnu.org; Wed, 11 Oct 2023 02:29:32 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 295C61BF203; Wed, 11 Oct 2023 06:28:57 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: <0d89af0c-070b-f681-7486-e923799c4c2e@gutov.dev> (Dmitry Gutov's message of "Tue, 10 Oct 2023 14:46:49 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <867co29v1y.fsf@mail.linkov.net> <8634yjhbxq.fsf@mail.linkov.net> <86o7h7nex8.fsf@mail.linkov.net> <0d89af0c-070b-f681-7486-e923799c4c2e@gutov.dev> Date: Wed, 11 Oct 2023 09:27:50 +0300 Message-ID: <867cntd66x.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org, Eli Zaretskii , Eshel Yaron 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, I've tried this patch on top of Emacs master and it seems to >>>>>> work well. One small suggestion is to consider giving the project name >>>>>> in the mode line a dedicated face, so people/themes could customize its >>>>>> appearance. (By default, it could just inherit from `default`.) >>>>> Thanks for suggestion, will do on the second round after pushing the >>>>> initial version. >>>> I'm not yet sure whether better to add a new face or a new variable like >>>> grep-hit-face and xref-num-matches-face that refers to the existing face. >>>> Then it would be possible to set such variable e.g. to the face `vc-state-base` >>>> that inherits from `default`. >>> Personally I think a variable pointing to a face name is a somewhat >>> redundant indirection, since customizing the face to inherit from some >>> other face is just as easy as customizing the variable to point to a >>> different face. But either way works, of course. >> Probably adding a variable would be more suitable since currently >> there are no faces defined in project.el at all. > > FWIW, I don't have a strong opinion. Ok, added a face variable. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 15 18:43:27 2023 Received: (at 66317) by debbugs.gnu.org; 15 Oct 2023 22:43:27 +0000 Received: from localhost ([127.0.0.1]:54739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qs9pX-0002VD-53 for submit@debbugs.gnu.org; Sun, 15 Oct 2023 18:43:27 -0400 Received: from s.wfbtzhsw.outbound-mail.sendgrid.net ([159.183.224.105]:29116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qs9pU-0002Ut-B9 for 66317@debbugs.gnu.org; Sun, 15 Oct 2023 18:43:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=7K8bzv3Q2Qjv0k6KCnp+UudR4bLF4sj+oo802fDMOYw=; b=Mqot3fcFeQyIGQwUPc8NyRlKWIljUpx4i1GJDTo54MvSqp4Vm/jwuOTrvY0W70tXpFVA j+1G3eJWwXaUwiLijLZ7INMAqqT3/EYNb+W7q5jyYQu5AaIgfGyKk2I4ghUy/ESP1/gVJE 6k93iT8fE13V1Y7jhKTDp7g0OvdqPKd7cfyW1S1PUhAHlVu5hh6HDB3PQ198/N8Om5zxcO gpyCzU+PcNDMCDlSfuaHtPQT6ZfZVEpG3LDzIGM1jL4V2Zx+CME9lrOC7xWaqinsAkJkQi 4lApqRWR6ErzzjrCOxRBCZ1yY3wazh2qlnlWvpzN5OJMMLR3w/cbNHTv/wTd2Axg== Received: by filterdrecv-65785c9b6c-2q8f8 with SMTP id filterdrecv-65785c9b6c-2q8f8-1-652C6AEC-D 2023-10-15 22:42:52.635575677 +0000 UTC m=+440396.793906227 Received: from earth.catern.com (unknown) by geopod-ismtpd-28 (SG) with ESMTP id e9YEsMgRSt6l_ZtpJMnQdw Sun, 15 Oct 2023 22:42:52.401 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=linkov.net Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id CB9286568A; Sun, 15 Oct 2023 18:42:51 -0400 (EDT) From: sbaugh@catern.com Subject: Re: bug#66317: Project mode-line In-Reply-To: <86jzs4ntxb.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 03 Oct 2023 09:29:23 +0300") References: <86jzs4ntxb.fsf@mail.linkov.net> Date: Sun, 15 Oct 2023 22:42:52 +0000 (UTC) Message-ID: <87cyxfy0b8.fsf@catern.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?ZgbRq7gjGrt0q=2FPjvxk7wM0yQFRdOkTJAtEbkjCkHbLuQb7im4NG8z=2F1+4iF5k?= =?us-ascii?Q?NPiUhR+XnB6UNHi5zTqFvnFEoNqLjWUr+CBZqWO?= =?us-ascii?Q?3KkNOAuDjmPtKiwYNxlNGx9ZjxmFFpeeCNeTS8X?= =?us-ascii?Q?AIRNHBYJVsWoeVac3GPdBEuYz9S0cPeUUTiZVdA?= =?us-ascii?Q?tsU=2FpalZD6JdLeLtHxf+0wNJ0KId7AjRLoQ=3D=3D?= To: Juri Linkov X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 66317 Cc: Dmitry Gutov , 66317@debbugs.gnu.org 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.5 (-) An issue with this as installed in master: If I navigate to a file and one of its ancestors is not readable by emacs, I'll get an error. For example, when I visit /home/other/foo.txt, which is readable by me even though /home/other is not, I get: Error during redisplay: (eval (project-mode-line-format)) signaled (permission-denied "Opening directory" "Permission denied" "/home/other") Here's one idea for a patch... but maybe we should be just flat-out wrapping it in ignore-errors? (BTW, I actually discovered this class of bug through project-uniquify-dirname-transform, which is also affected by it, since like project-mode-line, it runs project-current for basically every buffer. So if we ignore-errors in project-mode-line-format, we also need that in project-uniquify-dirname-transform. Maybe they should share the lookup?) diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index fd9c146a1fd..8bf1f4d0738 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -245,7 +245,8 @@ project-current pr)) (defun project--find-in-directory (dir) - (run-hook-with-args-until-success 'project-find-functions dir)) + (ignore-error (permission-denied) + (run-hook-with-args-until-success 'project-find-functions dir))) (defvar project--within-roots-fallback nil) From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 15 20:57:42 2023 Received: (at 66317) by debbugs.gnu.org; 16 Oct 2023 00:57:42 +0000 Received: from localhost ([127.0.0.1]:55023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsBvS-0007I3-7O for submit@debbugs.gnu.org; Sun, 15 Oct 2023 20:57:42 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:45991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsBvO-0007Hk-R8 for 66317@debbugs.gnu.org; Sun, 15 Oct 2023 20:57:40 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E2CCF5C024F; Sun, 15 Oct 2023 20:57:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 15 Oct 2023 20:57:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1697417828; x=1697504228; bh=DEDgG6cOhD4dQhlSUqwmV1S2MveKVixlA7H Lum3QfI0=; b=xynoQRxoHKJMCQicbtc6fWsUQCMhPsJycnPeHChL3eY3Kvrd9kd VLRaR0gCI9esAy5x6A6dE9ys0SAbCOagdAaamtkZNjjmPIK+DPpXpdVyrdskuS28 Ubvif/EiV0j8VImCynpcBypjmjETRv/yMchBZUw30ivj1Qybri4ZSYVt9swzg5xD dcVs+Y7agU7mqIUxjaf2hxJvZa+agR/2LJahHPbZZ4/PNC/jsoIdP0XgdCR/kU0p jrMq/mC6vUeIccSxtZ1qXboNA7vazXVpwNQ3ixE3UNgNSKw9Xn+ybpNn/DPXodgS s51KJJxHMpHQQl5XeFZ5yvlW6TYZ7b1Y8tw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1697417828; x=1697504228; bh=DEDgG6cOhD4dQhlSUqwmV1S2MveKVixlA7H Lum3QfI0=; b=ZcporSiJgkwZLF7aEuK5Jb1ICo3B05RH6iG9pV0bhcD5haPn31h CX7yNTLk5WrN7fMN6lxphVh04DjmTN1xtm3ay/YNRavT+C1KcJbAXvLRLGeU1b8S edt+vFWVAfGIDcj/vWJtOM4QGOla7GnuPdzKyusAgB92RxBWIOUEVP2GECqe+smd sibOyyCZY5CkcdedZCNZHmkKkVCTsMb/ZDt3EKYjrLJh4PCPmuqHCqSHBgf3rc+w e8/qlaQEmSIn8YGxOLoGaqQXERcasJiwpEPLGRXarJiiOPJoOc+FkaPS/KdduD8h Msn5EVkc5X+6Qye0bTBlEJ1xdKLQwVHP/fA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrieelgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 15 Oct 2023 20:57:07 -0400 (EDT) Message-ID: <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> Date: Mon, 16 Oct 2023 03:57:05 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: sbaugh@catern.com, Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> From: Dmitry Gutov In-Reply-To: <87cyxfy0b8.fsf@catern.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org 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.2 (---) On 16/10/2023 01:42, sbaugh@catern.com wrote: > - (run-hook-with-args-until-success 'project-find-functions dir)) > + (ignore-error (permission-denied) > + (run-hook-with-args-until-success 'project-find-functions dir))) One minor problem: 'ignore-error' was added in Emacs 27, while project.el maintains compatibility with Emacs 26.1+. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 16 13:04:29 2023 Received: (at 66317) by debbugs.gnu.org; 16 Oct 2023 17:04:29 +0000 Received: from localhost ([127.0.0.1]:57789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsR12-0003FI-Tf for submit@debbugs.gnu.org; Mon, 16 Oct 2023 13:04:29 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:40311) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsR10-0003F1-F3 for 66317@debbugs.gnu.org; Mon, 16 Oct 2023 13:04:27 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2AB7940003; Mon, 16 Oct 2023 17:03:52 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> (Dmitry Gutov's message of "Mon, 16 Oct 2023 03:57:05 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> Date: Mon, 16 Oct 2023 20:01:36 +0300 Message-ID: <86jzrmcxhr.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: sbaugh@catern.com, 66317@debbugs.gnu.org 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 (-) There is another problem: calling 'project-name' while evaluating 'mode-line-format' often changes the coding system mode-line indicator from U (utf-8) to raw-text during saving the current buffer. Here is a backtrace: - project-name - project--value-in-dir (that uses with-temp-buffer) - hack-dir-local-variables-non-file-buffer - hack-local-variables-apply Then in the last function the coding system is broken in two different ways: 1. by 'hack-one-local-variable' in `emacs -Q` 2. by (run-hooks 'hack-local-variables-hook) in buffers where flyspell-mode is enabled 'flyspell-hack-local-variables-hook' breaks the coding system too. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 16 15:13:06 2023 Received: (at 66317) by debbugs.gnu.org; 16 Oct 2023 19:13:06 +0000 Received: from localhost ([127.0.0.1]:58041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsT1W-0007bJ-8F for submit@debbugs.gnu.org; Mon, 16 Oct 2023 15:13:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43106) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsT1T-0007an-Dh for 66317@debbugs.gnu.org; Mon, 16 Oct 2023 15:13:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qsT0y-0004MU-U0; Mon, 16 Oct 2023 15:12:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=e/Rfl2eHlNKm/E4TI/kplsBtXOj95LI7yNgUephf75w=; b=C0Io9bQuAdN0 IoL0kjzOWiHl6OzdWlUwPJrK0CBWe9rFc8xMME1EvlE4NN0d9IUZ3XjkdFzSq+qFuIds0HNXzJL/Z FRxDw6lv/Tqm7S/0tBwbcuwAV5DhYkzzwNCpmtkQhIwNADG1uolPfxaVb3ZT2vgKuYTYkrnc4PTKb ZK0Pqa5/p4fGEHBDcMduZN1EU3hdbTfWMt+3kJ6HkT0swGQAQYq1uxyhRdP+xbJSRc64NoOqjgHY6 Fk8BVK/rZUrf63beM2UCHHM+OrfhXdF4v+90OWjlSKe3A25Lw1Z4XXVes0c1H+hAwfU3wjjqNbDo5 hTc+kH5dIuA7ggVubAKUYA==; Date: Mon, 16 Oct 2023 22:12:19 +0300 Message-Id: <83r0lunzzg.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <86jzrmcxhr.fsf@mail.linkov.net> (message from Juri Linkov on Mon, 16 Oct 2023 20:01:36 +0300) Subject: Re: bug#66317: Project mode-line References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> <86jzrmcxhr.fsf@mail.linkov.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, 66317@debbugs.gnu.org, sbaugh@catern.com 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 (---) > Cc: sbaugh@catern.com, 66317@debbugs.gnu.org > From: Juri Linkov > Date: Mon, 16 Oct 2023 20:01:36 +0300 > > There is another problem: calling 'project-name' while evaluating > 'mode-line-format' often changes the coding system mode-line indicator > from U (utf-8) to raw-text during saving the current buffer. > > Here is a backtrace: > > - project-name > - project--value-in-dir (that uses with-temp-buffer) > - hack-dir-local-variables-non-file-buffer > - hack-local-variables-apply > > Then in the last function the coding system is broken > in two different ways: > > 1. by 'hack-one-local-variable' in `emacs -Q` How and where? > 2. by (run-hooks 'hack-local-variables-hook) > in buffers where flyspell-mode is enabled > 'flyspell-hack-local-variables-hook' breaks > the coding system too. Why? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 13:36:33 2023 Received: (at 66317) by debbugs.gnu.org; 18 Oct 2023 17:36:33 +0000 Received: from localhost ([127.0.0.1]:34600 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtATB-0002uv-61 for submit@debbugs.gnu.org; Wed, 18 Oct 2023 13:36:33 -0400 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]:51953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtAT8-0002ug-Jg for 66317@debbugs.gnu.org; Wed, 18 Oct 2023 13:36:31 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 97B0B1C0002; Wed, 18 Oct 2023 17:35:56 +0000 (UTC) From: Juri Linkov To: Eli Zaretskii Subject: Re: bug#66317: Project mode-line In-Reply-To: <83r0lunzzg.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 16 Oct 2023 22:12:19 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> <86jzrmcxhr.fsf@mail.linkov.net> <83r0lunzzg.fsf@gnu.org> Date: Wed, 18 Oct 2023 20:20:31 +0300 Message-ID: <86y1fzvp7c.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, 66317@debbugs.gnu.org, sbaugh@catern.com 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 (-) >> There is another problem: calling 'project-name' while evaluating >> 'mode-line-format' often changes the coding system mode-line indicator >> from U (utf-8) to raw-text during saving the current buffer. >> >> Here is a backtrace: >> >> - project-name >> - project--value-in-dir (that uses with-temp-buffer) >> - hack-dir-local-variables-non-file-buffer >> - hack-local-variables-apply >> >> Then in the last function the coding system is broken >> in two different ways: >> >> 1. by 'hack-one-local-variable' in `emacs -Q` > > How and where? > >> 2. by (run-hooks 'hack-local-variables-hook) >> in buffers where flyspell-mode is enabled >> 'flyspell-hack-local-variables-hook' breaks >> the coding system too. > > Why? The bug occurs when multiple lines are displayed in the echo area. Then '(:eval (project-mode-line-format)) is called twice. At the end of the first call 'buffer-file-coding-system' is still correct: utf-8. But at the beginning of the second call it's already wrong: raw-text. I guess it was a mistake to allow specifying the project name in .dir-locals.el. A better place would be in ~/.emacs.d/projects. From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 14:42:33 2023 Received: (at 66317) by debbugs.gnu.org; 18 Oct 2023 18:42:33 +0000 Received: from localhost ([127.0.0.1]:34674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtBV3-0007gB-DR for submit@debbugs.gnu.org; Wed, 18 Oct 2023 14:42:33 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:51955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtBUz-0007fw-TL for 66317@debbugs.gnu.org; Wed, 18 Oct 2023 14:42:32 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 60B0B3200A4C; Wed, 18 Oct 2023 14:41:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 18 Oct 2023 14:41:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1697654516; x=1697740916; bh=SYE0fUpr+tMFZ5P4UpkeVQ4FK+T1WXo3DAJ kR58O11Q=; b=0aD4gOQB7Ntg+L4eZQyLEbjDNIO0SnfQ42FMxOSR/GLWk5b4Exo QfX8Mk93Pi5sF+p+5v6LsmIDYf5olDVos1cblhXJK4nnt1JHQj90SQq+tHAZpaso coLfH25q9HDpohn17cwOpHYky43CZqyIsO5KFuRDyqWUAFCxLNtQ0PEE8wM3tm7x 8MGizbcjK4eezg9MhXY5Y68IZGIju3l7QodDxjE47MJ7DcWHBJBTgnqfNZEMjR3d 0ZWSBoWEEKDuoHr0F0gJSEO7aBh2Mbc/pe+TcGD2P1Bu4iH5xySOfaEfoxkOnINz jSYfsgLjjSR0LGE4yoj4qblJHx/XQrxFlJw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1697654516; x=1697740916; bh=SYE0fUpr+tMFZ5P4UpkeVQ4FK+T1WXo3DAJ kR58O11Q=; b=G2dw2MB7uwuTwblyIJkAQL/6BpvTP9I1nJN+r1bMhQjgKWCF1ov juwa8AEH0O829BFyVoS4dUwlQvjQ7a0R+y+gWQkHER0/JpzA1I3AG5bxRmceIfFd F+SGZt3LKdplutrPAQu3WGB3ePvd3LGi0XSNNqj7Mo4Pb+5J59a1wUednm94OFm5 owHqibjykJXfHU3X+xjFwzt8po8F32jvianQxOAUnR+YCPKVAHDCmQ0aXJUQFp0g eFY2Lj038zz4RicAtUJS9zcsWjGYj4VbZV2NkxWldScv/K7iVpVsPD09YMY7coIq DySajPqS1TCtoW8QIQ4gS16eRFo/8usSRxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeeggdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Oct 2023 14:41:55 -0400 (EDT) Message-ID: <86e34144-5ac6-2819-b242-fa9bc8fef098@gutov.dev> Date: Wed, 18 Oct 2023 21:41:53 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov , Eli Zaretskii References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> <86jzrmcxhr.fsf@mail.linkov.net> <83r0lunzzg.fsf@gnu.org> <86y1fzvp7c.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86y1fzvp7c.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: sbaugh@catern.com, 66317@debbugs.gnu.org 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.2 (---) On 18/10/2023 20:20, Juri Linkov wrote: > I guess it was a mistake to allow specifying the project name > in .dir-locals.el. A better place would be in ~/.emacs.d/projects. But project-name uses project--value-in-dir which uses a temporary buffer to apply all variables in. Does that affect the original buffer somehow? From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 18 14:56:19 2023 Received: (at 66317) by debbugs.gnu.org; 18 Oct 2023 18:56:19 +0000 Received: from localhost ([127.0.0.1]:34693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtBiM-0008BP-Ps for submit@debbugs.gnu.org; Wed, 18 Oct 2023 14:56:19 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:55385) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtBiK-0008BB-2S for 66317@debbugs.gnu.org; Wed, 18 Oct 2023 14:56:17 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id AE9FF3200B9D; Wed, 18 Oct 2023 14:55:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 18 Oct 2023 14:55:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1697655343; x=1697741743; bh=ASIAyuk8j7xzpbuMX0HBi5woY4Ou3fy5oC8 ImJwgR/Q=; b=hUbX/yTOYAImdArfyfBBC2vSdmNARVPjaIN89bZZVYQTcfu1n1i USuDY4PGm+uXhVtOTRuLFXyhIiHVyNQraxSXyG/Rue7E8p9PX4W+y8zlboKESKEh lrYnFCWAhp+r/WdPhJ/IbTEkvi6sJp7Xc6qVVtMPyogbIAskeGMPkw2H4E5Aa7Nc Pw8aSyT+xCVsaokuMd4Iwa8mimP14VxodaNJBTa4NpRuln77iZtSR2LKrgDiZarY hYXsCRBrjZ0GPAaXYth8Wo9liBP0W7Mme8fuL4BdJwXUQQ6svlgVjgZRIBj+rWcW Sf8qFII8tOHMSEpF92HTu+ZhnWiww8Er49w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1697655343; x=1697741743; bh=ASIAyuk8j7xzpbuMX0HBi5woY4Ou3fy5oC8 ImJwgR/Q=; b=aKsgZMVaPNFQ14PTNlvyWm92CL8duknleKPsEBYpsVs9YJnCY/q vrsz3ona8YfutNVuITKxscxBXP2KWlH1L2cdzlLPhi9sweqF9r75de/JRhEASMaP LFDBZama8CLi7beykjxUrh0ZjX/q+FGBJfu7IzSCwN5jtTBLJ+c/Sze01huAbeL5 whlklTzGoXTdBQiV8tW6ikFM1b6iETJKxJRbttUQybGbIJL+LFsqi3CPY4Fabdes 5E+WJuW9/PV5kafBm6jhDED35wL6YmXD0QEZmKJQCKh3g/hp00w+P5WIWVG+nsbi ziAOgRMwAQz5wyg/yQfWfI6Yz6Zc0jiVoNg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeeggdduvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhepiefgteevheevveffheeltdeukeeiieekueefgedugfefgefhudelgfefveel vdevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepug hmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 18 Oct 2023 14:55:41 -0400 (EDT) Message-ID: Date: Wed, 18 Oct 2023 21:55:40 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> <86jzrmcxhr.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86jzrmcxhr.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: sbaugh@catern.com, 66317@debbugs.gnu.org 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.2 (---) On 16/10/2023 20:01, Juri Linkov wrote: > There is another problem: calling 'project-name' while evaluating > 'mode-line-format' often changes the coding system mode-line indicator > from U (utf-8) to raw-text during saving the current buffer. > > Here is a backtrace: > > - project-name > - project--value-in-dir (that uses with-temp-buffer) > - hack-dir-local-variables-non-file-buffer > - hack-local-variables-apply FWIW, I haven't been able to reproduce this so far. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 02:59:16 2023 Received: (at 66317) by debbugs.gnu.org; 19 Oct 2023 06:59:16 +0000 Received: from localhost ([127.0.0.1]:35716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtMzz-0003Id-Vw for submit@debbugs.gnu.org; Thu, 19 Oct 2023 02:59:16 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:47655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtMzx-0003IJ-R0 for 66317@debbugs.gnu.org; Thu, 19 Oct 2023 02:59:14 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id A74731BF209; Thu, 19 Oct 2023 06:58:39 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: <86e34144-5ac6-2819-b242-fa9bc8fef098@gutov.dev> (Dmitry Gutov's message of "Wed, 18 Oct 2023 21:41:53 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> <86jzrmcxhr.fsf@mail.linkov.net> <83r0lunzzg.fsf@gnu.org> <86y1fzvp7c.fsf@mail.linkov.net> <86e34144-5ac6-2819-b242-fa9bc8fef098@gutov.dev> Date: Thu, 19 Oct 2023 09:40:23 +0300 Message-ID: <86mswfxgh6.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: sbaugh@catern.com, Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) > FWIW, I haven't been able to reproduce this so far. Unfortunately it's not easily reproducible. >> The bug occurs when multiple lines are displayed in the echo area. >> Then '(:eval (project-mode-line-format)) is called twice. >> At the end of the first call 'buffer-file-coding-system' >> is still correct: utf-8. But at the beginning of the >> second call it's already wrong: raw-text. >> >> I guess it was a mistake to allow specifying the project name >> in .dir-locals.el. A better place would be in ~/.emacs.d/projects. > > But project-name uses project--value-in-dir which uses a temporary buffer > to apply all variables in. So it does this extensive work several times per second every time when the mode-line is updated? Then maybe better to cache the project name somewhere? > Does that affect the original buffer somehow? Actually it doesn't affect the original buffer directly. When saving a buffer and the message is multi-line during saving, then '(project-mode-line-format)' is called twice, and the buffer coding is changed between these calls. I don't know where is this code that decides to evaluate mode-line-format twice in a row, and how this code is affected by temporary buffers used by project--value-in-dir. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 19 07:24:20 2023 Received: (at 66317) by debbugs.gnu.org; 19 Oct 2023 11:24:20 +0000 Received: from localhost ([127.0.0.1]:35940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtR8L-0000y8-4T for submit@debbugs.gnu.org; Thu, 19 Oct 2023 07:24:20 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:55765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtR8G-0000xT-FY for 66317@debbugs.gnu.org; Thu, 19 Oct 2023 07:24:08 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id B60EC3200AA0; Thu, 19 Oct 2023 07:23:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 19 Oct 2023 07:23:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1697714611; x=1697801011; bh=ux6hFSsHVPw+cuRX9awSXyUI+Sdum99HGCt PcrTu0MU=; b=Oiq6RrD4NNHL5WH10EW7P6cn5kxgmGoUddkUeOn5LbBT82nFPcI nseFxtp571CvY3zVDZO9RXeqxMLLWaOlNTtwhZnszxP1X8xD/QKQoBNoLdqMPb9V ufcbWMQLwlrrMOFkQN8fMpbp6EnHhHgPqH2pkSrbtTDzeLTmgOX4lt6O2zC0SVGd w07r9W8LWyqE3KOX2DEKP27KzU6xTwMelEN/w//1SIe1WRu9joLz17skyHHhRBBN O+Dsw2rXr+UQ5yuGi3MLfgjL9uBBNDCidZD3AsvKPmYWEmkeqCb3U2w8xYC5b/Xu QEFZY/TqABOGNUthROi1oxjgGV+Jtk7rYSw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1697714611; x=1697801011; bh=ux6hFSsHVPw+cuRX9awSXyUI+Sdum99HGCt PcrTu0MU=; b=SINUyp2kFcJ6R9kEqKzusnsAFWXn31ZbYzqJmPvUraq73kT7jXo 9zBveUkA2unWsbgnoATvxtCJV3Cu0GJxuZpcz+/hWuasM6qL00mAK1ZxdJPCxaFg N2wB4dTG/nf2E/x2E72Gi1bMaepfHencYnGBtjYBzRuSTG+s7eZcsvrWnAOLn3BV FQMfF8lEAP/bwkoB6/BmaKeu+I7Ik7LnB65O1gnHQgm05Fen2T3x7rG6p+I0lS6F PRB1SN2SDSrJR0AuSPrU05MhHpJfx4Q5n5Vb3E6A3tJdSnKOmcN8lR768nOF9w1H nrS+ZqqbYAj6Sd2rAwGbtGcn9LFtYwkD2/g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeeigdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 19 Oct 2023 07:23:29 -0400 (EDT) Message-ID: <3aebbc13-06af-54b2-6e7b-d96ff79d46fd@gutov.dev> Date: Thu, 19 Oct 2023 14:23:28 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> <86jzrmcxhr.fsf@mail.linkov.net> <83r0lunzzg.fsf@gnu.org> <86y1fzvp7c.fsf@mail.linkov.net> <86e34144-5ac6-2819-b242-fa9bc8fef098@gutov.dev> <86mswfxgh6.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86mswfxgh6.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: sbaugh@catern.com, Eli Zaretskii , 66317@debbugs.gnu.org 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.5 (--) On 19/10/2023 09:40, Juri Linkov wrote: >> FWIW, I haven't been able to reproduce this so far. > > Unfortunately it's not easily reproducible. > >>> The bug occurs when multiple lines are displayed in the echo area. >>> Then '(:eval (project-mode-line-format)) is called twice. >>> At the end of the first call 'buffer-file-coding-system' >>> is still correct: utf-8. But at the beginning of the >>> second call it's already wrong: raw-text. >>> >>> I guess it was a mistake to allow specifying the project name >>> in .dir-locals.el. A better place would be in ~/.emacs.d/projects. >> >> But project-name uses project--value-in-dir which uses a temporary buffer >> to apply all variables in. > > So it does this extensive work several times per second every time > when the mode-line is updated? > > Then maybe better to cache the project name somewhere? There is an existing caching mechanism IIUC based on the dir-locals' file mtime (see the description in dir-locals-find-file), which is better than nothing. We could add something on top of it, but it would have to be a cache keyed on the directory (because project-name should return the right value inside C-x p p k, for example), and it would be invalidated once every 5 seconds or so (or use some other more advanced logic, but I'm not sure which). >> Does that affect the original buffer somehow? > > Actually it doesn't affect the original buffer directly. > When saving a buffer and the message is multi-line > during saving, then '(project-mode-line-format)' is called twice, > and the buffer coding is changed between these calls. I suppose some global value like last-coding-system-used might create an interrelation between such calls. The use of a temp buffer should protect us from adverse effects, though. > I don't know where is this code that decides to evaluate > mode-line-format twice in a row, and how this code is affected > by temporary buffers used by project--value-in-dir. I'm not sure what to recommend, but some print-debugging could help. E.g. just add a (backtrace) call inside project-mode-line-format. But that's a lot of output to sort through, so there's definitely room for improvement in this recipe. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 05:00:43 2023 Received: (at 66317) by debbugs.gnu.org; 20 Oct 2023 09:00:43 +0000 Received: from localhost ([127.0.0.1]:38612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtlN5-0007j4-4b for submit@debbugs.gnu.org; Fri, 20 Oct 2023 05:00:43 -0400 Received: from mout02.posteo.de ([185.67.36.66]:50469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtlMz-0007ii-7g for 66317@debbugs.gnu.org; Fri, 20 Oct 2023 05:00:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 294C6240101 for <66317@debbugs.gnu.org>; Fri, 20 Oct 2023 11:00:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697792404; bh=WKFU/FE06f1twXDeu1xcw9h12ZIAZI+sb9qN6P7ONpI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=RkN3182jAlsWWgArYnvDBa0cLbAYpblJLxFR5p6+E3r74Z3G6Yd3bynpO7IkzMm/y ry6fdiVnM/ovjb93ncTsW3y2XVNoA1a65+d+qq8P091tZQXNiEDCuB6uSBRw1wBX5A PBRWCKAOFWNWE+2kr5b6WTd+u9Dyag5d+FLkyBxkLuj2nUhbcA/D8LDIDuxuhSGbRV OVds0O1FODl1phXCjGTF6bd3sp0b/go09W2YWkJtN16MZwjQX5mcyu1CYVyYc6s1OJ J8VaG9ERu2Sfbo5kvQJWOUfy6ljUJrT56yNhhQfepYG4voNENLhMw/KNbzwIDfWDVY nuSUsOtcVKS9w== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4SBdnt64jWz6twn; Fri, 20 Oct 2023 11:00:02 +0200 (CEST) From: Ihor Radchenko To: Juri Linkov Subject: Re: bug#66317: Project mode-line In-Reply-To: <86il7mc3xr.fsf@mail.linkov.net> References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> Date: Fri, 20 Oct 2023 09:01:46 +0000 Message-ID: <87cyx9d5vp.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 66317 Cc: dmitry@gutov.dev, Eli Zaretskii , me@eshelyaron.com, 66317@debbugs.gnu.org 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 (---) Juri Linkov writes: > +(defvar project-menu-entry > + `(menu-item "Project" ,menu-bar-project-menu)) > + This does not work in Emacs <=28: (void-variable menu-bar-project-menu) (list 'menu-item "Project" menu-bar-project-menu) (defvar project-menu-entry (list 'menu-item "Project" menu-bar-proje require(project) -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 20 11:53:15 2023 Received: (at 66317) by debbugs.gnu.org; 20 Oct 2023 15:53:15 +0000 Received: from localhost ([127.0.0.1]:41260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtroJ-0003uy-8z for submit@debbugs.gnu.org; Fri, 20 Oct 2023 11:53:15 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:50351) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtroE-0003uh-W1 for 66317@debbugs.gnu.org; Fri, 20 Oct 2023 11:53:13 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 7C9D732009DB; Fri, 20 Oct 2023 11:52:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 20 Oct 2023 11:52:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1697817157; x=1697903557; bh=5gvBGI6vfiIJWwaFvOlwDIYaOimFhBl+EK4 4rx+X7FU=; b=t0j0iMGlof/1bTF9GVHQQk6ONYEwfeUvL3AYhLAvhWUU3rKbqrK fGIE2gMmdFC/tlNcjMDztrhhBdJIce74miHqvVF/Tihhq4dh8A05l75HshsTsXCO 91S9g/5aZfidrgCPRVRl9ODGq9pElfmp5axVF2ZD5hDdJLLQJ1jCe5L3nxgmFkgp YpOFMHNMLpHcxwZ3ihko4xdcmCHI/Ogo1BGIR8JF0iZ5jo+RV/scjGw5nIk/LT0H Mz016T9+7rWs5KfW9NNxhS3QfSl+KZlHdOi0/wwcqvOw2kNzqoCcjSvUQNI6aXCj o/xUG8f2nhQC5gHvQZDx+fSjtQ1m92J4LRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1697817157; x=1697903557; bh=5gvBGI6vfiIJWwaFvOlwDIYaOimFhBl+EK4 4rx+X7FU=; b=vOp7mpZN6FRcZbPZFRsDN8i60rMd4yhXZ+bz9pe6zJ+M86ClJ4k t/DZo69gJwhwpsqPnXT/CUB6x+g81fOrxT3j6kXoCl80bYyvQZ049ryct8DV+B/x qK81K7OfoJph4gUEIUf2gTuoo127SZlZHTSDca9VxsUxNVa3o4rAZMWFzcSRW8wa 0ziEj/bbTvgqnuem85Mv6f9AP7dNxi/yMRcy3T+mqR/7A7KI6v4d1eOHlCbW54ci Hpir68mSb/AEg3gzj9k7MuC9/N0Q3x/J6wNGw7lyiV8mOQmpE53vEgaM3pzmutlD HaApCiaNZOWbn2oozrJACGqKH4oCxDYEsHA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjeekgdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Oct 2023 11:52:35 -0400 (EDT) Message-ID: Date: Fri, 20 Oct 2023 18:52:34 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Ihor Radchenko , Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <87cyx9d5vp.fsf@localhost> From: Dmitry Gutov In-Reply-To: <87cyx9d5vp.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org, Eli Zaretskii , me@eshelyaron.com 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.2 (---) On 20/10/2023 12:01, Ihor Radchenko wrote: > Juri Linkov writes: > >> +(defvar project-menu-entry >> + `(menu-item "Project" ,menu-bar-project-menu)) >> + > This does not work in Emacs <=28: > > (void-variable menu-bar-project-menu) > (list 'menu-item "Project" menu-bar-project-menu) > (defvar project-menu-entry (list 'menu-item "Project" menu-bar-proje > require(project) I guess we'll need a compatibility definition for it. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 23 13:26:24 2023 Received: (at 66317) by debbugs.gnu.org; 23 Oct 2023 17:26:24 +0000 Received: from localhost ([127.0.0.1]:51549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quyh5-0004Vy-Pl for submit@debbugs.gnu.org; Mon, 23 Oct 2023 13:26:24 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]:41281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1quyh2-0004VV-3u for 66317@debbugs.gnu.org; Mon, 23 Oct 2023 13:26:20 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 595B760002; Mon, 23 Oct 2023 17:25:42 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: <3aebbc13-06af-54b2-6e7b-d96ff79d46fd@gutov.dev> (Dmitry Gutov's message of "Thu, 19 Oct 2023 14:23:28 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> <86jzrmcxhr.fsf@mail.linkov.net> <83r0lunzzg.fsf@gnu.org> <86y1fzvp7c.fsf@mail.linkov.net> <86e34144-5ac6-2819-b242-fa9bc8fef098@gutov.dev> <86mswfxgh6.fsf@mail.linkov.net> <3aebbc13-06af-54b2-6e7b-d96ff79d46fd@gutov.dev> Date: Mon, 23 Oct 2023 20:23:06 +0300 Message-ID: <864jihp81x.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: sbaugh@catern.com, Eli Zaretskii , 66317@debbugs.gnu.org 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 (-) > I'm not sure what to recommend, but some print-debugging could > help. E.g. just add a (backtrace) call inside project-mode-line-format. > > But that's a lot of output to sort through, so there's definitely room for > improvement in this recipe. Ok, here is 100% reproducible minimal test case: 0. emacs-30 -Q 1. eval: (progn (require 'project) (setq project-mode-line t) (setq set-message-functions '(set-multi-message))) 2. in a temporary directory: M-! git init RET 3. C-x C-f .dir-locals.el RET 4. insert: ((fundamental-mode . ((mode . flyspell)))) 5. C-x C-s At this point even buffer-file-coding-system of .dir-locals.el is changed to 't' (raw-text-unix). The same happens when saving any file in that project. The problem doesn't occur when flyspell-mode is enabled from file-local variables, only from dir-locals. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 24 19:49:07 2023 Received: (at 66317) by debbugs.gnu.org; 24 Oct 2023 23:49:07 +0000 Received: from localhost ([127.0.0.1]:56881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvR91-0003MB-Fi for submit@debbugs.gnu.org; Tue, 24 Oct 2023 19:49:07 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:35569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvR8x-0003L0-AF for 66317@debbugs.gnu.org; Tue, 24 Oct 2023 19:49:06 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 527D63200A88; Tue, 24 Oct 2023 19:48:27 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 24 Oct 2023 19:48:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1698191306; x=1698277706; bh=HWR9n/93DXeFSaVBwekHD8wAdnyVq5zKwCd yCkLKBYw=; b=CBTEEZE1BHtTygCTtJFe6W+1D2DnkL5Z8eLxGbGRWfRJpFHZBQ0 d1XBUVrm5YMSho2XYMRPtS+tE+6wU1eK3gBOUcC1n1baRF+fChj7KFAVAfWk6zOq 1SUxsvzQXeVKEkViEykj7OrV7nAz/JK95pj3hytzirMG1uySGgmZZIv0h5lbyzsA pT/HHNamSVVtF6DDIrUhubmOrKsF9hMwgKGMcIhCQZR99OsqT0YcNAiPtCLBbyj3 o84qFy/mJzfCXHO1LqxNwNIaT8i87rtoFC1qbD1/elNPIuv8JqOFJ0CHk/R/dMeS /JUiUiRZYqT1/WxVERLKu4wpVp7stUBcjHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698191306; x=1698277706; bh=HWR9n/93DXeFSaVBwekHD8wAdnyVq5zKwCd yCkLKBYw=; b=dqO6R7fDbRttCZPCZ9knuoODLN9eki0AzdSuIaByCG4PDNV3WCt +1oGJfPaLeQLtcTW1Cniw+nOi/EkSK160RuHaA6tf25zYuRzSazwfdU/x6YYfUTo /zaRpmuwPCtXxYM9mksv5hiwyjO1q+oItdAvHa4/gfedSYxlX5tbE2qnlk8euGZJ 6NVzbf+2/P0TkEprBCGLdlVVwfdu+mqqobYNyzCFsuQUR5JbM6AeI2TrSDhqEzS9 pANf7B+38MdbZsRQInj3xfo5IvmYvQte7JC+JWy7YV3DZZPTAZiqV8Hf/wgogDtT p59tTzErcnP63QjdFEPMQrcOm8Lx3A66hEg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrkeelgddviecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 Oct 2023 19:48:25 -0400 (EDT) Message-ID: <456705ba-c791-5a79-7840-c3410441ed7d@gutov.dev> Date: Wed, 25 Oct 2023 02:48:22 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <87cyxfy0b8.fsf@catern.com> <39cff21a-e0af-9386-8d99-b98988348aba@gutov.dev> <86jzrmcxhr.fsf@mail.linkov.net> <83r0lunzzg.fsf@gnu.org> <86y1fzvp7c.fsf@mail.linkov.net> <86e34144-5ac6-2819-b242-fa9bc8fef098@gutov.dev> <86mswfxgh6.fsf@mail.linkov.net> <3aebbc13-06af-54b2-6e7b-d96ff79d46fd@gutov.dev> <864jihp81x.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <864jihp81x.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: sbaugh@catern.com, Eli Zaretskii , 66317@debbugs.gnu.org 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.2 (---) On 23/10/2023 20:23, Juri Linkov wrote: >> I'm not sure what to recommend, but some print-debugging could >> help. E.g. just add a (backtrace) call inside project-mode-line-format. >> >> But that's a lot of output to sort through, so there's definitely room for >> improvement in this recipe. > Ok, here is 100% reproducible minimal test case: > > 0. emacs-30 -Q > 1. eval: > > (progn > (require 'project) > (setq project-mode-line t) > (setq set-message-functions '(set-multi-message))) > > 2. in a temporary directory: M-! git init RET > 3. C-x C-f .dir-locals.el RET > 4. insert: ((fundamental-mode . ((mode . flyspell)))) > 5. C-x C-s > > At this point even buffer-file-coding-system of .dir-locals.el > is changed to 't' (raw-text-unix). The same happens when saving > any file in that project. > > The problem doesn't occur when flyspell-mode is enabled from > file-local variables, only from dir-locals. I can repro. But it's as weird a bug as they come. I guess it's a combination of using flyspell-mode and editing .dir-locals.el? Or have you seen other buffers' b-f-c-s changed this way too? If not, it might have something to do with flyspell-mode's use of sit-for?.. But I'm only saying that because it's the only feature of this mode that I'm regularly reminded of. I tried using a variable watcher: (add-variable-watcher 'buffer-file-coding-system (lambda (_sym value op where) (message "%s %s %s" value op where) (if (eq 'raw-text-unix value) (backtrace)) )) but it just prints prefer-utf-8-unix set *temp*-925453 [2 times] raw-text-unix set .dir-locals.el backtrace() (if (eq 'raw-text-unix value) (backtrace)) (closure (t) (_sym value op where) (message "%s %s %s" value op where) (if (eq 'raw-text-unix value) (backtrace)))(buffer-file-coding-system raw-text-unix set #) basic-save-buffer(t) save-buffer(1) funcall-interactively(save-buffer 1) call-interactively(save-buffer nil nil) command-execute(save-buffer) OTOH, the bug is very reliable to reproduce: add the aforementioned line to dir-locals and save -> the coding system changes to raw-text. Delete the line and save -> and it's prefer-utf-8 again. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 31 03:36:07 2023 Received: (at 66317) by debbugs.gnu.org; 31 Oct 2023 07:36:07 +0000 Received: from localhost ([127.0.0.1]:47382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxjIE-0003ZF-RY for submit@debbugs.gnu.org; Tue, 31 Oct 2023 03:36:07 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]:54749) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxjIC-0003Yg-EM for 66317@debbugs.gnu.org; Tue, 31 Oct 2023 03:36:05 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7B6CC60002; Tue, 31 Oct 2023 07:35:22 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: (Dmitry Gutov's message of "Fri, 20 Oct 2023 18:52:34 +0300") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <87cyx9d5vp.fsf@localhost> Date: Tue, 31 Oct 2023 09:34:41 +0200 Message-ID: <86bkcfutwu.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org, Ihor Radchenko , me@eshelyaron.com, Eli Zaretskii 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 (-) >>> +(defvar project-menu-entry >>> + `(menu-item "Project" ,menu-bar-project-menu)) >>> + >> This does not work in Emacs <=28: >> (void-variable menu-bar-project-menu) >> (list 'menu-item "Project" menu-bar-project-menu) >> (defvar project-menu-entry (list 'menu-item "Project" menu-bar-proje >> require(project) > > I guess we'll need a compatibility definition for it. This is fixed now. To be able to close bug#66317, we also need to decide what to do with these remaining patches: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66317#53 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66317#118 From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 31 22:03:56 2023 Received: (at 66317) by debbugs.gnu.org; 1 Nov 2023 02:03:56 +0000 Received: from localhost ([127.0.0.1]:49572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy0aK-0006tt-Fn for submit@debbugs.gnu.org; Tue, 31 Oct 2023 22:03:56 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:40197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy0aI-0006tb-0x for 66317@debbugs.gnu.org; Tue, 31 Oct 2023 22:03:54 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id B33BE5C030A; Tue, 31 Oct 2023 22:03:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 31 Oct 2023 22:03:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1698804193; x=1698890593; bh=cpjFPQc1RJK5n0ObBKJgXmr6cX2Oswg1s1p c/iln254=; b=qGuoq7DfDPxWajAdQlTlW7AeKnWG0gjFuD75YUaw/IxFmn2ercD fyM5Dym2jME1wn+w4IJeG3tTgMxIk0WMFrW9isM1mfYns6iceUJMMdI4fAmXD8dS bEl1kUcjfQ6QTLmSW78oE/8Bobhqeobmgq/1rLP8U731xyRCVJilBN4ovJVEBSNc cMr30hh5XEBzZnJ4ng3ux+9raKufDYInXfT5G6msg3gmLN0mKsVDP3w41bIUnots wt+RPzRfKPwJvY6Ji9fEIlWWImcPm/dUsDMDE9dxdEUg5IEG2R6oJEL+byp6c+T1 oU+Vx/wTI/HXa8lNKlXJAcPelNaGDmlSBTg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1698804193; x=1698890593; bh=cpjFPQc1RJK5n0ObBKJgXmr6cX2Oswg1s1p c/iln254=; b=DoFxTFTRxGh2FIAZKdGiA1tJBmfoWSeLEUBTxtJrEfSmRe62kRQ wf7EehVxiVyXvlYP5z7Bb3X1kWlNwx4AIGuFXiixGfKRfNgdevX/8jjWStTlP6m1 kqWbh6KhR4Ko88oakhlazbzUH+b7/O1SWuN3tfw+f0WNwZA1t4OgS2mjr2e11+NR pSqILLgqDZwc/QBjCnbg5cfxMyoZ2OHnKVmCBbtn1Mp4TTsgLG2WeFVHud0a/w4I QRybSEbnfgpiMLjlHs3G7p8xqAXHNHli4p45/ACuEb8b9/rixFfGrTZQjCwgJWOj HiI/CRUYN4UrV18GUPbw39axYbYmcRdZGOg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddtfedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeffmhhi thhrhicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrth htvghrnhephfeutdekveeggeetteekfeejffegudduudfhueevleeftdffffeggeeivddv jeelnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 Oct 2023 22:03:11 -0400 (EDT) Message-ID: Date: Wed, 1 Nov 2023 04:03:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#66317: Project mode-line Content-Language: en-US To: Juri Linkov References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <87cyx9d5vp.fsf@localhost> <86bkcfutwu.fsf@mail.linkov.net> From: Dmitry Gutov In-Reply-To: <86bkcfutwu.fsf@mail.linkov.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.2 (--) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org, Ihor Radchenko , me@eshelyaron.com, Eli Zaretskii 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.2 (---) On 31/10/2023 09:34, Juri Linkov wrote: >>>> +(defvar project-menu-entry >>>> + `(menu-item "Project" ,menu-bar-project-menu)) >>>> + >>> This does not work in Emacs <=28: >>> (void-variable menu-bar-project-menu) >>> (list 'menu-item "Project" menu-bar-project-menu) >>> (defvar project-menu-entry (list 'menu-item "Project" menu-bar-proje >>> require(project) >> >> I guess we'll need a compatibility definition for it. > > This is fixed now. Thanks! > To be able to close bug#66317, we also need to decide > what to do with these remaining patches: > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66317#53 > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66317#118 I've pushed the fixes for these two, let's see if anything comes up to invalidate those solutions. From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 01 03:38:04 2023 Received: (at 66317) by debbugs.gnu.org; 1 Nov 2023 07:38:04 +0000 Received: from localhost ([127.0.0.1]:49764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy5nc-0007V2-DO for submit@debbugs.gnu.org; Wed, 01 Nov 2023 03:38:04 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:39501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qy5nW-0007Uh-Mn; Wed, 01 Nov 2023 03:37:58 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7B643240003; Wed, 1 Nov 2023 07:37:12 +0000 (UTC) From: Juri Linkov To: Dmitry Gutov Subject: Re: bug#66317: Project mode-line In-Reply-To: (Dmitry Gutov's message of "Wed, 1 Nov 2023 04:03:09 +0200") Organization: LINKOV.NET References: <86jzs4ntxb.fsf@mail.linkov.net> <86sf6r4omc.fsf@mail.linkov.net> <86jzs34mg6.fsf@mail.linkov.net> <83zg0z6062.fsf@gnu.org> <86il7mc3xr.fsf@mail.linkov.net> <87cyx9d5vp.fsf@localhost> <86bkcfutwu.fsf@mail.linkov.net> Date: Wed, 01 Nov 2023 09:32:54 +0200 Message-ID: <86r0la9bdl.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: juri@linkov.net X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 66317 Cc: 66317@debbugs.gnu.org, Ihor Radchenko , me@eshelyaron.com, Eli Zaretskii 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 (-) close 66317 30.0.50 thanks >> To be able to close bug#66317, we also need to decide >> what to do with these remaining patches: >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66317#53 >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66317#118 > > I've pushed the fixes for these two, let's see if anything comes up to > invalidate those solutions. Thanks. So now closing this feature request since it seems everything is done here. From unknown Tue Jun 17 01:28:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 29 Nov 2023 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator