From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 28 06:42:45 2025 Received: (at submit) by debbugs.gnu.org; 28 Mar 2025 10:42:45 +0000 Received: from localhost ([127.0.0.1]:53008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ty7Ai-0002z0-NX for submit@debbugs.gnu.org; Fri, 28 Mar 2025 06:42:45 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55210) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ty7Ah-0002yn-5l for submit@debbugs.gnu.org; Fri, 28 Mar 2025 06:42:43 -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 1ty7AZ-0000Cp-NX for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2025 06:42:35 -0400 Received: from fhigh-b3-smtp.messagingengine.com ([202.12.124.154]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ty7AX-0003DM-V5 for bug-gnu-emacs@gnu.org; Fri, 28 Mar 2025 06:42:35 -0400 Received: from phl-compute-13.internal (phl-compute-13.phl.internal [10.202.2.53]) by mailfhigh.stl.internal (Postfix) with ESMTP id BEAC22540096 for ; Fri, 28 Mar 2025 06:42:30 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-13.internal (MEProxy); Fri, 28 Mar 2025 06:42:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pengjiz.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm3; t=1743158550; x=1743244950; bh=beKfLrn0Zb17xfb3c9Ls3lr6vIdJcjUN iWEkZcbK97s=; b=LHb34SXwAnrYpOQQibCfHYWGCBo1VfR1t0T9s+KqdowRc/Ts WbSWPwyo3EAcSDPGcrR+yc8MZnu4ttJYvZH+mzPjKpCvZ0FGwevAlo3/+35CLsYP kvOhuXgu68zB6jC6CMstd8AQyuE6f63Z6KjznDYaz8R6+MnrOS4X1v9/lIpgtLGz hhNHZ9Ynkk5wmVUZke/xnjGxqzfhsRZ678jtMZM4FNm7gtGfeh/SbzovrsRwulVR rqrgKEE2Ow2Q4bKMeYLy2IMDpgnR8kjQV6jjxSMT2V39g/mh7tE/LU1gQ1ZW/1LF mS9lfayZde8acT/kdw7F6ANi3e4t+SLFNbACrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1743158550; x= 1743244950; bh=beKfLrn0Zb17xfb3c9Ls3lr6vIdJcjUNiWEkZcbK97s=; b=w ozy2OKH5mw9CM2p7eSHkzQZRFOX/UgBUDXqVQ2DNIKsNW/uwU9PqekNPr3lvZZPr hz9bdjnbTyadTS0EBvQuX8cbnRoBZPXwDJoAQj58q8JC/zER3yQgpgGut40jtQ5u m/gf9Zf5P6VHTyfkG4SSxovpN85FtzfsGIBrSJBAy03gOZ9xUT080ZTx8NTi2yF9 xQxiGeucC7mQ67r3fi2egEObfqJY7Pm9VMOySCCTZakXtwc2AG4C/0mp3Ir6dQBg fhgXw0gJ1QhvVQY0Ap3iiu+bWt7qgdYLGk7GnwjAywc32g1PeQ5RFD/abfDaGIwZ 7I0Hfz5zt4kU6E+l0Y54A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddujedutdekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvf fufffkgggtsehmtderredttddtnecuhfhrohhmpefrvghnghhjihcukghhrghnghcuoehm vgesphgvnhhgjhhiiidrtghomheqnecuggftrfgrthhtvghrnhepfffgiefhgfduleelvd eiiedtvdefieegkedtkefftdeljefgheelvdffjeegteegnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgvsehpvghnghhjihiirdgtohhmpd hnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegsuhhg qdhgnhhuqdgvmhgrtghssehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i16614472:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 28 Mar 2025 06:42:29 -0400 (EDT) From: Pengji Zhang To: bug-gnu-emacs@gnu.org Subject: 30.1; RefTeX: Move some 'setq' expressions out of loop Date: Fri, 28 Mar 2025 18:42:22 +0800 Message-ID: <87ldsp4esx.fsf@pengjiz.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=202.12.124.154; envelope-from=me@pengjiz.com; helo=fhigh-b3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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 Hello, (I am not sure if this is the right list to submit a patch for RefTeX. Please let me know if it is not. Thanks!) In the function 'reftex-offer-label-menu', there are two 'setq' expressions inside a loop. That makes it hard for users to change those settings. For example, I would like to remove 'global-mode-string' from the mode line of the label buffer, but there is no easy way to do so. This patch moves the two 'setq' expressions to the definition of the major mode for the buffer, so users could use the mode hook to tweak those two settings. Thanks! --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Move-some-RefTeX-setq-s-to-major-mode-definition.patch >From 6a73bba1a2954daabe728e007eb55e839993e1d8 Mon Sep 17 00:00:00 2001 From: Pengji Zhang Date: Sun, 23 Mar 2025 11:48:14 +0800 Subject: [PATCH] Move some RefTeX 'setq's to major mode definition Move two 'setq' expressions from the RefTeX label selection loop to the body of the major mode definition, so to make it easier to adjust the settings of the buffer via the mode hook. * lisp/textmodes/reftex-ref.el (reftex-offer-label-menu): Move two 'setq' expressions from here... * lisp/textmodes/reftex-sel.el (reftex-select-label-mode): ...to here. --- lisp/textmodes/reftex-ref.el | 6 ------ lisp/textmodes/reftex-sel.el | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/textmodes/reftex-ref.el b/lisp/textmodes/reftex-ref.el index 30e9968a8e5..cac5ad65e86 100644 --- a/lisp/textmodes/reftex-ref.el +++ b/lisp/textmodes/reftex-ref.el @@ -569,12 +569,6 @@ reftex-offer-label-menu (unless (eq major-mode 'reftex-select-label-mode) (reftex-select-label-mode)) (cl-pushnew (current-buffer) selection-buffers) - (setq truncate-lines t) - (setq mode-line-format - (list "---- " 'mode-line-buffer-identification - " " 'global-mode-string " (" mode-name ")" - " S<" 'reftex-refstyle ">" - " -%-")) (cond ((= 0 (buffer-size)) (let ((buffer-read-only nil)) diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el index 1f1c74550a5..4fbbb1fdeb0 100644 --- a/lisp/textmodes/reftex-sel.el +++ b/lisp/textmodes/reftex-sel.el @@ -98,6 +98,12 @@ reftex-select-label-mode \\{reftex-select-label-mode-map}" (setq-local reftex-select-marked nil) + (setq truncate-lines t) + (setq mode-line-format + (list "---- " 'mode-line-buffer-identification + " " 'global-mode-string " (" mode-name ")" + " S<" 'reftex-refstyle ">" + " -%-")) (when (syntax-table-p reftex-latex-syntax-table) (set-syntax-table reftex-latex-syntax-table)) ;; We do not set a local map - reftex-select-item does this. -- 2.49.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 14 15:52:00 2025 Received: (at 77335-done) by debbugs.gnu.org; 14 Jul 2025 19:52:00 +0000 Received: from localhost ([127.0.0.1]:36665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ubPDU-0004PD-8e for submit@debbugs.gnu.org; Mon, 14 Jul 2025 15:52:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37594) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ubPDP-0004Op-Ps for 77335-done@debbugs.gnu.org; Mon, 14 Jul 2025 15:51:57 -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 1ubPDG-0003mS-Vs; Mon, 14 Jul 2025 15:51:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=ph4l0ijNOWgOIlr4YRYxa/XZUqbo5/PEdUgHOIdCq2I=; b=RmPIDa05yPTSxeE/3eVY iTu1cpEq7x8/U/+TqzjFWDf17tnRzmnw6RZ7mijl3slp/3EWDVOHBsG5Km3+guSBCkvyJ3aSMXCNc ZwzDi6YpgOd0KvypZjQCHX4Kt0HfRRjdX06hmJxcqQP/poM9RztRE3ALpxz8EqJIRNFGDnN/RCpLo Urw9yQLeICvZVjAoKIqNMYj9n9bsB50tc8lQJ6brVa11WhdUgX/xvWLtJd3627rDjjnfFlLkOgRP6 v8exuDGQC+byKPyXfJrhvIcoKVXIGHrk/Ky0rVEpWa788xWcBn4p134WUR0g5k6B6S3ydJ68W7lxf Zx9b0FXmwOubHA==; From: Arash Esbati To: Pengji Zhang Subject: Re: bug#77335: 30.1; RefTeX: Move some 'setq' expressions out of loop In-Reply-To: <87ldsp4esx.fsf@pengjiz.com> References: <87ldsp4esx.fsf@pengjiz.com> Date: Mon, 14 Jul 2025 21:51:38 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77335-done Cc: 77335-done@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 (---) Pengji Zhang writes: > (I am not sure if this is the right list to submit a patch for RefTeX. > Please let me know if it is not. Thanks!) I'd say here or bug-auctex@gnu.org should work. > In the function 'reftex-offer-label-menu', there are two 'setq' > expressions inside a loop. That makes it hard for users to change those > settings. For example, I would like to remove 'global-mode-string' from > the mode line of the label buffer, but there is no easy way to do so. > > This patch moves the two 'setq' expressions to the definition of the > major mode for the buffer, so users could use the mode hook to tweak > those two settings. I installed your patch (commit 5d9a67e4). My apologies it took so long; I managed to miss this report which I'm now closing. Best, Arash From unknown Thu Aug 14 17:25:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 12 Aug 2025 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator