From unknown Mon Jun 23 07:52:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation Resent-From: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Nov 2020 12:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44618 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 44618@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160527157231868 (code B ref -1); Fri, 13 Nov 2020 12:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Nov 2020 12:46:12 +0000 Received: from localhost ([127.0.0.1]:47243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdYSu-0008Hr-1v for submit@debbugs.gnu.org; Fri, 13 Nov 2020 07:46:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:34826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdYSp-0008Hh-4r for submit@debbugs.gnu.org; Fri, 13 Nov 2020 07:46:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdYSo-0000CP-Sp for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 07:46:02 -0500 Received: from smtp-clients1.isti.cnr.it ([146.48.28.36]:43672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdYSn-0007m5-3I for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 07:46:02 -0500 Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) (Authenticated sender: pot) by smtp-clients1.isti.cnr.it (Postfix) with ESMTPSA id 990B0AE6E0 for ; Fri, 13 Nov 2020 13:45:58 +0100 (CET) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at smtp-out.isti.cnr.it Received: from pot by tucano.isti.cnr.it with local (Exim 4.94) (envelope-from ) id 1kdYSk-00EHxr-5C for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 13:45:58 +0100 From: Francesco =?UTF-8?Q?Potort=C3=AC?= Date: Fri, 13 Nov 2020 13:45:58 +0100 Organization: X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-Id: Received-SPF: softfail client-ip=146.48.28.36; envelope-from=pot@gnu.org; helo=smtp-clients1.isti.cnr.it X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/13 07:03:07 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2020-05-17, modified by Debian built on x86-csail-01 I set bibtex-contline-indentation as a file variable, yeet it is ignored by bibtex-mode. I am not sure how file variables and minor modes interact, but it looks like when the minor mode is fired, the local variables have not been set yet. Whatever the reason, bibtex-mode sets fill-prefix as a local variable irrespective of the file variable bibtex-contline-indentation. The fix for my case is simple: avoid setting fill-prefix as a local variable in the minor mode, and just set it inside the bibtex-fill-field-bounds function. A patch follows. However, I don't know if this is a hint of some more general problem on how bibtex-mode trets file variables. --- bibtex-2019.el 2020-11-13 11:54:34.000000000 +0100 +++ bibtex.el 2020-11-13 13:34:24.000000000 +0100 @@ -3399,8 +3409,6 @@ (set (make-local-variable 'defun-prompt-regexp) "^[ \t]*@[[:alnum:]]+[ \t]*") (set (make-local-variable 'outline-regexp) "[ \t]*@") (set (make-local-variable 'fill-paragraph-function) 'bibtex-fill-field) - (set (make-local-variable 'fill-prefix) - (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s)) (set (make-local-variable 'font-lock-defaults) '(bibtex-font-lock-keywords nil t ((?$ . "\"") @@ -4830,7 +4838,9 @@ "Fill BibTeX field delimited by BOUNDS. If JUSTIFY is non-nil justify as well. If optional arg MOVE is non-nil move point to end of field." - (let ((end-field (copy-marker (bibtex-end-of-field bounds)))) + (let ((fill-prefix + (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s)) + (end-field (copy-marker (bibtex-end-of-field bounds)))) (if (not justify) (goto-char (bibtex-start-of-text-in-field bounds)) (goto-char (bibtex-start-of-field bounds)) From unknown Mon Jun 23 07:52:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Nov 2020 16:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44618 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Francesco =?UTF-8?Q?Potort=C3=AC?= Cc: 44618@debbugs.gnu.org Received: via spool by 44618-submit@debbugs.gnu.org id=B44618.160537084627601 (code B ref 44618); Sat, 14 Nov 2020 16:21:01 +0000 Received: (at 44618) by debbugs.gnu.org; 14 Nov 2020 16:20:46 +0000 Received: from localhost ([127.0.0.1]:51726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdyIA-0007B7-4v for submit@debbugs.gnu.org; Sat, 14 Nov 2020 11:20:46 -0500 Received: from quimby.gnus.org ([95.216.78.240]:44156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdyI8-0007Ar-Ar for 44618@debbugs.gnu.org; Sat, 14 Nov 2020 11:20:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=RHTEQJZzVc4eMK4dDR5kVDuI6JsdKPteX858N+HR68k=; b=XePvOXfrq+vcJT3zSTd3uAmlhB edugndn6eA6KT3d1qPqfHd1sTr/1I9wx3LoNQXozcowDYqi/KBTGDnBuAZc/mZwbqiwl0HoDuor2c Szg3qMlfFtn0oO87cQ51e6DMyItD+drL3KjiVyhCCmhUh6VKPS886iR6/BdtenQXQUFs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kdyHz-0000Zq-4m; Sat, 14 Nov 2020 17:20:37 +0100 From: Lars Ingebrigtsen References: X-Now-Playing: Genesis's _Duke_: "Heathaze" Date: Sat, 14 Nov 2020 17:20:34 +0100 In-Reply-To: ("Francesco =?UTF-8?Q?Potort=C3=AC?="'s message of "Fri, 13 Nov 2020 13:45:58 +0100") Message-ID: <877dqnzz8t.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Francesco =?UTF-8?Q?Potort=C3=AC?= writes: > Whatever the reason, bibtex-mode sets fill-prefix as a local variable > irrespective of the file variable bibtex-contline-indentation. > > The fix for my case is simple: avoid setting fill-prefix as [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Francesco Potort=C3=AC writes: > Whatever the reason, bibtex-mode sets fill-prefix as a local variable > irrespective of the file variable bibtex-contline-indentation. > > The fix for my case is simple: avoid setting fill-prefix as a local > variable in the minor mode, and just set it inside the > bibtex-fill-field-bounds function. A patch follows. > > However, I don't know if this is a hint of some more general problem on > how bibtex-mode trets file variables. [...] > - (set (make-local-variable 'fill-prefix) > - (make-string (+ bibtex-entry-offset bibtex-contline-indentation) = ?\s)) [...] > - (let ((end-field (copy-marker (bibtex-end-of-field bounds)))) > + (let ((fill-prefix > + (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s)) > + (end-field (copy-marker (bibtex-end-of-field bounds)))) This patch would make it impossible for people to alter fill-prefix (from the mode hook, for instance), so I don't think this is the right solution. Looking at hack-local-variables/normal-mode, file-local variables are set after the mode has been set up, so you can't have your mode set up variables based on file-local variables. (If I'm wrong here, please somebody correct me.) So you can't usefully set bibtex-entry-offset/bibtex-contline-indentation as file-local variables without also setting fill-prefix that way, I think? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 17:58:35 2020 Received: (at control) by debbugs.gnu.org; 16 Nov 2020 22:58:35 +0000 Received: from localhost ([127.0.0.1]:57673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kenSF-0006ea-HN for submit@debbugs.gnu.org; Mon, 16 Nov 2020 17:58:35 -0500 Received: from quimby.gnus.org ([95.216.78.240]:40132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kenSD-0006eO-Kc for control@debbugs.gnu.org; Mon, 16 Nov 2020 17:58:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=r8GZZpehDas4xBOs5c9gH6xMHF/vgq5v2Ct6fFlRmlw=; b=PhNBzIc3FC88dbH0HDPnqmPAo6 RSM5hyDtoziMYPml7EHOpQbYxKvcPDrVf03dhH5MLQ17YUz8EjSZgXOCNRQt9NtSgu/5Wwez0XebR kD/2mO96y7WTKqDADcVE+SRT5c3NDjhONwsv0G4qHO3AfMDvQodDz7rym7oV68P6EeW8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kenS5-0006u7-QH for control@debbugs.gnu.org; Mon, 16 Nov 2020 23:58:28 +0100 Date: Mon, 16 Nov 2020 23:58:24 +0100 Message-Id: <878sb0ucxb.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #44647 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: forcemerge 44647 44618 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 (-) forcemerge 44647 44618 quit From unknown Mon Jun 23 07:52:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation Resent-From: "Roland Winkler" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2020 23:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44618 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Francesco =?UTF-8?Q?Potort=EF=BF=BD=3DAC?= Cc: Lars Ingebrigtsen , 44618@debbugs.gnu.org Received: via spool by 44618-submit@debbugs.gnu.org id=B44618.160556948317426 (code B ref 44618); Mon, 16 Nov 2020 23:32:02 +0000 Received: (at 44618) by debbugs.gnu.org; 16 Nov 2020 23:31:23 +0000 Received: from localhost ([127.0.0.1]:57761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kenxz-0004Wj-Ae for submit@debbugs.gnu.org; Mon, 16 Nov 2020 18:31:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kenxw-0004Pa-63 for 44618@debbugs.gnu.org; Mon, 16 Nov 2020 18:31:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44779) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kenxq-0006C9-Qo; Mon, 16 Nov 2020 18:31:14 -0500 Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=47766 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1kenxo-00008j-2c; Mon, 16 Nov 2020 18:31:13 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="whd3TPpDnD" Content-Transfer-Encoding: 7bit Message-ID: <3006.31876.328410.24499@gargle.gargle.HOWL> Date: Mon, 16 Nov 2020 17:31:10 -0600 From: "Roland Winkler" In-Reply-To: <877dqnzz8t.fsf@gnus.org> References: <877dqnzz8t.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --whd3TPpDnD Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit On Sat Nov 14 2020 Lars Ingebrigtsen wrote: > > - (let ((end-field (copy-marker (bibtex-end-of-field bounds)))) > > + (let ((fill-prefix > > + (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s)) > > + (end-field (copy-marker (bibtex-end-of-field bounds)))) > > This patch would make it impossible for people to alter fill-prefix > (from the mode hook, for instance), so I don't think this is the right > solution. Can you please try the attached patch using hack-local-variables-hook? This was partly inspired by the related comment https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21764#15 which had somehow escaped my attention. The issues mentioned in this comment should likewise be fixed by the attached patch. --whd3TPpDnD Content-Type: application/octet-stream; name="bibtex.diff" Content-Disposition: attachment; filename="bibtex.diff" Content-Transfer-Encoding: base64 LS0tIGJpYnRleC5lbH4JMjAyMC0xMS0xNSAyMToxMzo1Ni40NDAyMTY1NjMgLTA2MDAKKysrIGJp YnRleC5lbAkyMDIwLTExLTE1IDIxOjI4OjQ3LjMxMzE4MDA2MiAtMDYwMApAQCAtODkwLDcgKzg5 MCw4IEBACiAoZGVmY3VzdG9tIGJpYnRleC1jb21tZW50LXN0YXJ0ICJAQ29tbWVudCIKICAgIlN0 cmluZyBzdGFydGluZyBhIEJpYlRlWCBjb21tZW50LiIKICAgOmdyb3VwICdiaWJ0ZXgKLSAgOnR5 cGUgJ3N0cmluZykKKyAgOnR5cGUgJ3N0cmluZworICA6c2FmZSAjJ3N0cmluZ3ApCiAKIChkZWZj dXN0b20gYmlidGV4LWFkZC1lbnRyeS1ob29rIG5pbAogICAiTGlzdCBvZiBmdW5jdGlvbnMgdG8g Y2FsbCB3aGVuIEJpYlRlWCBlbnRyeSBoYXMgYmVlbiBpbnNlcnRlZC4iCkBAIC0xMjE5LDcgKzEy MjAsOCBAQAogICAiT2Zmc2V0IGZvciBCaWJUZVggZW50cmllcy4KIEFkZGVkIHRvIHRoZSB2YWx1 ZSBvZiBhbGwgb3RoZXIgdmFyaWFibGVzIHdoaWNoIGRldGVybWluZSBjb2x1bW5zLiIKICAgOmdy b3VwICdiaWJ0ZXgKLSAgOnR5cGUgJ2ludGVnZXIpCisgIDp0eXBlICdpbnRlZ2VyCisgIDpzYWZl ICMnaW50ZWdlcnApCiAKIChkZWZjdXN0b20gYmlidGV4LWZpZWxkLWluZGVudGF0aW9uIDIKICAg IlN0YXJ0aW5nIGNvbHVtbiBmb3IgdGhlIG5hbWUgcGFydCBpbiBCaWJUZVggZmllbGRzLiIKQEAg LTEyMzIsMTMgKzEyMzQsMTUgQEAKICAgIlN0YXJ0aW5nIGNvbHVtbiBmb3IgdGhlIHRleHQgcGFy dCBpbiBCaWJUZVggZmllbGRzLgogU2hvdWxkIGJlIGVxdWFsIHRvIHRoZSBzcGFjZSBuZWVkZWQg Zm9yIHRoZSBsb25nZXN0IG5hbWUgcGFydC4iCiAgIDpncm91cCAnYmlidGV4Ci0gIDp0eXBlICdp bnRlZ2VyKQorICA6dHlwZSAnaW50ZWdlcgorICA6c2FmZSAjJ2ludGVnZXJwKQogCiAoZGVmY3Vz dG9tIGJpYnRleC1jb250bGluZS1pbmRlbnRhdGlvbgogICAoKyBiaWJ0ZXgtdGV4dC1pbmRlbnRh dGlvbiAxKQogICAiU3RhcnRpbmcgY29sdW1uIGZvciBjb250aW51YXRpb24gbGluZXMgb2YgQmli VGVYIGZpZWxkcy4iCiAgIDpncm91cCAnYmlidGV4Ci0gIDp0eXBlICdpbnRlZ2VyKQorICA6dHlw ZSAnaW50ZWdlcgorICA6c2FmZSAjJ2ludGVnZXJwKQogCiAoZGVmY3VzdG9tIGJpYnRleC1hbGln bi1hdC1lcXVhbC1zaWduIG5pbAogICAiSWYgbm9uLW5pbCwgYWxpZ24gZmllbGRzIGF0IGVxdWFs IHNpZ24gaW5zdGVhZCBvZiBmaWVsZCB0ZXh0LgpAQCAtMjk0MSw3ICsyOTQ1LDcgQEAKICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDErIChtYXRjaC1iZWdpbm5pbmcg MykpICgxLSAobWF0Y2gtZW5kIDMpKSkpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICh1bmxlc3MgKGFzc29jIGtleSBjcm9zc3JlZi1rZXlzKQogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHB1c2ggKGxpc3Qga2V5KSBjcm9zc3JlZi1rZXlzKSkpKQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDs7IFdlIGhhdmUgcHJvYmFibHkgaGF2ZSBhIG5vbi1iaWJ0ZXgg ZmlsZS4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA7OyBXZSBwcm9iYWJseSBoYXZlIGEg bm9uLWJpYnRleCBmaWxlLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICgobm90IChtYXRj aC1iZWdpbm5pbmcgYmlidGV4LXR5cGUtaW4taGVhZCkpCiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICh0aHJvdyAndXNlcmtleSBuaWwpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAg IDs7IG9ubHkga2V5cyBvZiBrbm93biBlbnRyaWVzCkBAIC0zNDM1LDE1ICszNDM5LDEwIEBACiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpYnRleC1wYXJzZS1rZXlzLXRpbWVv dXQgdAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYmlidGV4LXBhcnNlLWJ1 ZmZlcnMtc3RlYWx0aGlseSkpKQogICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdwYXJhZ3Jh cGgtc3RhcnQpICJbIFxmXG5cdF0qJCIpCi0gIChzZXQgKG1ha2UtbG9jYWwtdmFyaWFibGUgJ2Nv bW1lbnQtc3RhcnQpIGJpYnRleC1jb21tZW50LXN0YXJ0KQotICAoc2V0IChtYWtlLWxvY2FsLXZh cmlhYmxlICdjb21tZW50LXN0YXJ0LXNraXApCi0gICAgICAgKGNvbmNhdCAocmVnZXhwLXF1b3Rl IGJpYnRleC1jb21tZW50LXN0YXJ0KSAiXFw+WyBcdF0qIikpCiAgIChzZXQgKG1ha2UtbG9jYWwt dmFyaWFibGUgJ2NvbW1lbnQtY29sdW1uKSAwKQogICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxl ICdkZWZ1bi1wcm9tcHQtcmVnZXhwKSAiXlsgXHRdKkBbWzphbG51bTpdXStbIFx0XSoiKQogICAo c2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdvdXRsaW5lLXJlZ2V4cCkgIlsgXHRdKkAiKQogICAo c2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdmaWxsLXBhcmFncmFwaC1mdW5jdGlvbikgIydiaWJ0 ZXgtZmlsbC1maWVsZCkKLSAgKHNldCAobWFrZS1sb2NhbC12YXJpYWJsZSAnZmlsbC1wcmVmaXgp Ci0gICAgICAgKG1ha2Utc3RyaW5nICgrIGJpYnRleC1lbnRyeS1vZmZzZXQgYmlidGV4LWNvbnRs aW5lLWluZGVudGF0aW9uKSA/XHMpKQogICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdmb250 LWxvY2stZGVmYXVsdHMpCiAgICAgICAgJyhiaWJ0ZXgtZm9udC1sb2NrLWtleXdvcmRzCiAgICAg ICAgICBuaWwgdCAoKD8kIC4gIlwiIikKQEAgLTM0NjIsOSArMzQ2MSwxOCBAQAogICAoc2V0ICht YWtlLWxvY2FsLXZhcmlhYmxlICdzeW50YXgtcHJvcGVydGl6ZS1mdW5jdGlvbikKICAgICAgICAo c3ludGF4LXByb3BlcnRpemUtdmlhLWZvbnQtbG9jawogICAgICAgICBiaWJ0ZXgtZm9udC1sb2Nr LXN5bnRhY3RpYy1rZXl3b3JkcykpCi0gIChiaWJ0ZXgtc2V0LWRpYWxlY3QgbmlsIHQpCi0gIDs7 IEFsbG93IGBiaWJ0ZXgtZGlhbGVjdCcgYXMgYSBmaWxlLWxvY2FsIHZhcmlhYmxlLgotICAoYWRk LWhvb2sgJ2hhY2stbG9jYWwtdmFyaWFibGVzLWhvb2sgIydiaWJ0ZXgtc2V0LWRpYWxlY3Qgbmls IHQpKQorICAobGV0ICgoZnVuIChsYW1iZGEgKCkKKyAgICAgICAgICAgICAgIChiaWJ0ZXgtc2V0 LWRpYWxlY3QpCisgICAgICAgICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdjb21t ZW50LXN0YXJ0KSBiaWJ0ZXgtY29tbWVudC1zdGFydCkKKyAgICAgICAgICAgICAgIChzZXQgKG1h a2UtbG9jYWwtdmFyaWFibGUgJ2NvbW1lbnQtc3RhcnQtc2tpcCkKKyAgICAgICAgICAgICAgICAg ICAgKGNvbmNhdCAocmVnZXhwLXF1b3RlIGJpYnRleC1jb21tZW50LXN0YXJ0KSAiXFw+WyBcdF0q IikpCisgICAgICAgICAgICAgICAoc2V0IChtYWtlLWxvY2FsLXZhcmlhYmxlICdmaWxsLXByZWZp eCkKKyAgICAgICAgICAgICAgICAgICAgKG1ha2Utc3RyaW5nICgrIGJpYnRleC1lbnRyeS1vZmZz ZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpYnRleC1jb250bGluZS1p bmRlbnRhdGlvbikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID9ccykpKSkpCisg ICAgKGlmIGJ1ZmZlci1maWxlLW5hbWUKKyAgICAgICAgKGFkZC1ob29rICdoYWNrLWxvY2FsLXZh cmlhYmxlcy1ob29rIGZ1biBuaWwgdCkKKyAgICAgIChmdW5jYWxsIGZ1bikpKSkKIAogKGRlZnVu IGJpYnRleC1lbnRyeS1hbGlzdCAoZGlhbGVjdCkKICAgIlJldHVybiBlbnRyeS1hbGlzdCBmb3Ig RElBTEVDVC4iCg== --whd3TPpDnD-- From unknown Mon Jun 23 07:52:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2020 23:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44618 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Roland Winkler" Cc: pot@gnu.org, 44618@debbugs.gnu.org Received: via spool by 44618-submit@debbugs.gnu.org id=B44618.160556982321430 (code B ref 44618); Mon, 16 Nov 2020 23:38:01 +0000 Received: (at 44618) by debbugs.gnu.org; 16 Nov 2020 23:37:03 +0000 Received: from localhost ([127.0.0.1]:57766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keo3T-0005ZZ-2D for submit@debbugs.gnu.org; Mon, 16 Nov 2020 18:37:03 -0500 Received: from quimby.gnus.org ([95.216.78.240]:40552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keo3R-0005Z3-1Y for 44618@debbugs.gnu.org; Mon, 16 Nov 2020 18:37:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ifYbxep6LOfWWXMFCo36LRDahJp29o/+NMZz5bWuoQw=; b=q0Tpq4eZcCnFH77iCgW0EahIDW zZwgnXYWsPEEHnZNeEKe7wP+wFfWlhxSUtYLu8y7Uu1CEWvghKnMAaDxa9Dsj0wee9uz1vDmu1TbB QJUTGjqFwciF6QK2b9PdAGrTeLV+HiSPDOp9lqCi022Z6GY/a7qSYi22fCKKrhDrYz7c=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1keo3H-0007RC-LY; Tue, 17 Nov 2020 00:36:54 +0100 From: Lars Ingebrigtsen References: <877dqnzz8t.fsf@gnus.org> <3006.31876.328410.24499@gargle.gargle.HOWL> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEUHBgUmKxCkqa3u 8fNHWBxpig65uwiZYir///+9cxmfAAAAAWJLR0QIht6VegAAAAd0SU1FB+QLEBYvDRLODqgAAAG4 SURBVDjLrZMxT+QwEIVn7gy1B5y9dhWQaBFb0MacE+pIO6mRbnENp0P8fcb2JHEOShxpvdnPnvf8 xgtgEZaBJANJv1/dGRdC6Jk5ynie/jwc9gkc7oz87jPKIP4+3Ar4195kQJ5kCgnkHWABUqVwLJXi c4zdrKkSYfoCiDLDbgvaawHU84jnCh7bl+Q3ufLQjN3QKMiuCujA+G4Y4qlJoLgCtC549N66XTw+ TQJssJqE88aTpV8xPA1cuQLqEOk1vEc67Vbw+CrVDFjXj29gB54i5VIiLidJUhKP8Yan1ZV8ZHAe 8QQ9K0ilFDSpesPRtat8Bm6wCUwWYAPQscyG2S5LFZBXkJubxTMwXZ+iZr7IkczAyA7RcNKZy+Kq vS5Nme9JrzvKe/B5TnKuX12ZiccSWnrCCs6ORLrDWVRAopFu4LLKuovcWpNc1YDocg2xBsb/nFu7 BTgiLfJYAWjqBAOvSRtd/5D6wfkg+lcx792SVVPtgMoVoIclEwWgMekhcqm/dWtne/DFSDeo6nd1 mrEA3LS2AHW1n0NUwLXdubXZYJl+tHv41oGVBswaL1tX/4d4/xns4QOJpWnFhPsSQAAAACV0RVh0 ZGF0ZTpjcmVhdGUAMjAyMC0xMS0xNlQyMjo0NzoxMyswMDowMERbfFUAAAAldEVYdGRhdGU6bW9k aWZ5ADIwMjAtMTEtMTZUMjI6NDc6MTMrMDA6MDA1BsTpAAAAAElFTkSuQmCC X-Now-Playing: Yes's _The Yes Album_: "Clap (Studio Version)" Date: Tue, 17 Nov 2020 00:36:50 +0100 In-Reply-To: <3006.31876.328410.24499@gargle.gargle.HOWL> (Roland Winkler's message of "Mon, 16 Nov 2020 17:31:10 -0600") Message-ID: <87ft58swkt.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: "Roland Winkler" writes: > Can you please try the attached patch using hack-local-variables-hook? > This was partly inspired by the related comment > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21764#15 > > which had some [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Roland Winkler" writes: > Can you please try the attached patch using hack-local-variables-hook? > This was partly inspired by the related comment > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21764#15 > > which had somehow escaped my attention. The issues mentioned in > this comment should likewise be fixed by the attached patch. If I'm reading the patch correctly, it looks good to me -- it'll still allow people to set fill-prefix from bibtex-mode-hook, and it fixes the reported problem in these two bug reports. (I haven't tested the patch, though, just read it.) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 07:52:22 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Francesco =?UTF-8?Q?Potort=C3=AC?= Subject: bug#44618: closed (Re: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation) Message-ID: References: <57115.88742.877010.24519@gargle.gargle.HOWL> X-Gnu-PR-Message: they-closed 44618 X-Gnu-PR-Package: emacs Reply-To: 44618@debbugs.gnu.org Date: Wed, 02 Dec 2020 18:39:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1606934342-24526-1" This is a multi-part message in MIME format... ------------=_1606934342-24526-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 44618@debbugs.gnu.org. --=20 44618: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D44618 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1606934342-24526-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 44618-done) by debbugs.gnu.org; 2 Dec 2020 18:38:32 +0000 Received: from localhost ([127.0.0.1]:37373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkX1L-0006Mr-VU for submit@debbugs.gnu.org; Wed, 02 Dec 2020 13:38:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkX1K-0006MY-DN; Wed, 02 Dec 2020 13:38:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55342) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkX1D-0001lV-ND; Wed, 02 Dec 2020 13:38:23 -0500 Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=45312 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1kkX1C-00039J-0v; Wed, 02 Dec 2020 13:38:22 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <57115.88742.877010.24519@gargle.gargle.HOWL> Date: Wed, 2 Dec 2020 12:38:19 -0600 From: "Roland Winkler" To: Lars Ingebrigtsen Subject: Re: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation In-Reply-To: <87ft58swkt.fsf@gnus.org> References: <877dqnzz8t.fsf@gnus.org> <3006.31876.328410.24499@gargle.gargle.HOWL> <87ft58swkt.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44618-done Cc: pot@gnu.org, Teemu Likonen , 44647-done@debbugs.gnu.org, 44618-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 (---) On Tue Nov 17 2020 Lars Ingebrigtsen wrote: > If I'm reading the patch correctly, it looks good to me -- it'll still > allow people to set fill-prefix from bibtex-mode-hook, and it fixes the > reported problem in these two bug reports. (I haven't tested the patch, > though, just read it.) Installed as patch d9167d940ac9d0504cc38a044c7cba897c103eaf. I am closing both bug#44618 and bug#44647. ------------=_1606934342-24526-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Nov 2020 12:46:12 +0000 Received: from localhost ([127.0.0.1]:47243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdYSu-0008Hr-1v for submit@debbugs.gnu.org; Fri, 13 Nov 2020 07:46:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:34826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdYSp-0008Hh-4r for submit@debbugs.gnu.org; Fri, 13 Nov 2020 07:46:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42298) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdYSo-0000CP-Sp for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 07:46:02 -0500 Received: from smtp-clients1.isti.cnr.it ([146.48.28.36]:43672) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdYSn-0007m5-3I for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 07:46:02 -0500 Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) (Authenticated sender: pot) by smtp-clients1.isti.cnr.it (Postfix) with ESMTPSA id 990B0AE6E0 for ; Fri, 13 Nov 2020 13:45:58 +0100 (CET) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at smtp-out.isti.cnr.it Received: from pot by tucano.isti.cnr.it with local (Exim 4.94) (envelope-from ) id 1kdYSk-00EHxr-5C for bug-gnu-emacs@gnu.org; Fri, 13 Nov 2020 13:45:58 +0100 From: =?utf-8?Q?Francesco_Potort=C3=AC?= Date: Fri, 13 Nov 2020 13:45:58 +0100 To: bug-gnu-emacs@gnu.org Subject: 26.3; bibtex.el ignores file variable bibtex-contline-indentation Organization: X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-Id: Received-SPF: softfail client-ip=146.48.28.36; envelope-from=pot@gnu.org; helo=smtp-clients1.isti.cnr.it X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/13 07:03:07 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) 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: -3.3 (---) In GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2020-05-17, modified by Debian built on x86-csail-01 I set bibtex-contline-indentation as a file variable, yeet it is ignored by bibtex-mode. I am not sure how file variables and minor modes interact, but it looks like when the minor mode is fired, the local variables have not been set yet. Whatever the reason, bibtex-mode sets fill-prefix as a local variable irrespective of the file variable bibtex-contline-indentation. The fix for my case is simple: avoid setting fill-prefix as a local variable in the minor mode, and just set it inside the bibtex-fill-field-bounds function. A patch follows. However, I don't know if this is a hint of some more general problem on how bibtex-mode trets file variables. --- bibtex-2019.el 2020-11-13 11:54:34.000000000 +0100 +++ bibtex.el 2020-11-13 13:34:24.000000000 +0100 @@ -3399,8 +3409,6 @@ (set (make-local-variable 'defun-prompt-regexp) "^[ \t]*@[[:alnum:]]+[ \t]*") (set (make-local-variable 'outline-regexp) "[ \t]*@") (set (make-local-variable 'fill-paragraph-function) 'bibtex-fill-field) - (set (make-local-variable 'fill-prefix) - (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s)) (set (make-local-variable 'font-lock-defaults) '(bibtex-font-lock-keywords nil t ((?$ . "\"") @@ -4830,7 +4838,9 @@ "Fill BibTeX field delimited by BOUNDS. If JUSTIFY is non-nil justify as well. If optional arg MOVE is non-nil move point to end of field." - (let ((end-field (copy-marker (bibtex-end-of-field bounds)))) + (let ((fill-prefix + (make-string (+ bibtex-entry-offset bibtex-contline-indentation) ?\s)) + (end-field (copy-marker (bibtex-end-of-field bounds)))) (if (not justify) (goto-char (bibtex-start-of-text-in-field bounds)) (goto-char (bibtex-start-of-field bounds)) ------------=_1606934342-24526-1-- From unknown Mon Jun 23 07:52:22 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Teemu Likonen Subject: bug#44647: closed (Re: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation) Message-ID: References: <57115.88742.877010.24519@gargle.gargle.HOWL> <87d00fmycn.fsf@iki.fi> X-Gnu-PR-Message: they-closed 44647 X-Gnu-PR-Package: emacs Reply-To: 44647@debbugs.gnu.org Date: Wed, 02 Dec 2020 18:39:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1606934342-24526-3" This is a multi-part message in MIME format... ------------=_1606934342-24526-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #44618: 27.1.50; `bibtex-contline-indentation' doesn't work as file local v= ariable which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 44647@debbugs.gnu.org. --=20 44618: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D44618 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1606934342-24526-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 44618-done) by debbugs.gnu.org; 2 Dec 2020 18:38:32 +0000 Received: from localhost ([127.0.0.1]:37373 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkX1L-0006Mr-VU for submit@debbugs.gnu.org; Wed, 02 Dec 2020 13:38:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkX1K-0006MY-DN; Wed, 02 Dec 2020 13:38:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55342) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkX1D-0001lV-ND; Wed, 02 Dec 2020 13:38:23 -0500 Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=45312 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1kkX1C-00039J-0v; Wed, 02 Dec 2020 13:38:22 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <57115.88742.877010.24519@gargle.gargle.HOWL> Date: Wed, 2 Dec 2020 12:38:19 -0600 From: "Roland Winkler" To: Lars Ingebrigtsen Subject: Re: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation In-Reply-To: <87ft58swkt.fsf@gnus.org> References: <877dqnzz8t.fsf@gnus.org> <3006.31876.328410.24499@gargle.gargle.HOWL> <87ft58swkt.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44618-done Cc: pot@gnu.org, Teemu Likonen , 44647-done@debbugs.gnu.org, 44618-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 (---) On Tue Nov 17 2020 Lars Ingebrigtsen wrote: > If I'm reading the patch correctly, it looks good to me -- it'll still > allow people to set fill-prefix from bibtex-mode-hook, and it fixes the > reported problem in these two bug reports. (I haven't tested the patch, > though, just read it.) Installed as patch d9167d940ac9d0504cc38a044c7cba897c103eaf. I am closing both bug#44618 and bug#44647. ------------=_1606934342-24526-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 14 Nov 2020 21:18:42 +0000 Received: from localhost ([127.0.0.1]:52176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ke2wT-0006Bf-QP for submit@debbugs.gnu.org; Sat, 14 Nov 2020 16:18:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:58126) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ke2wS-0006BY-O5 for submit@debbugs.gnu.org; Sat, 14 Nov 2020 16:18:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ke2wS-0003EW-II for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 16:18:40 -0500 Received: from lahtoruutu.iki.fi ([185.185.170.37]:33062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ke2wQ-0005qQ-0y for bug-gnu-emacs@gnu.org; Sat, 14 Nov 2020 16:18:39 -0500 Received: from mithlond (mobile-access-bcee73-255.dhcp.inet.fi [188.238.115.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: tlikonen) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 2BA861B00193 for ; Sat, 14 Nov 2020 23:18:25 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1605388705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=zg8XnSC4v+TW8IV/h2rBzf3+WN0zDkz6p/3sb/B4thA=; b=YKGnLjaPcnCMt3sybF/CkiLolwkXbo6iHElMogujkeDrl+RLbabDjWpiD1It/JCC9dnSCB Hr0FPzV6cjJgP6C83EZrpZo1w/QUplbhToOpSxyKlHWW1mc6CT0B7sHdA/txWx0HFSf0l+ nRNy8ehIkGWSayaVyFXBU2JomMExbJ7FVQvIYBPrQbbn0cAXGPmNLvrYSqBrJADq79wgwj zmbYl0Ni6vrIXeObrwO6YmSkooMJs/CW1FSpZX+dlMbq8FSiRwhnUhR6LikJQR0W7qXtbP tmYo39N9ZBt7j1CsR3TiMtJS6G4u0eISb942CPizEXmKT/FUHFo+M4lWROAzVQ== From: Teemu Likonen To: bug-gnu-emacs@gnu.org Subject: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable Date: Sat, 14 Nov 2020 23:18:16 +0200 Message-ID: <87d00fmycn.fsf@iki.fi> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1605388705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=zg8XnSC4v+TW8IV/h2rBzf3+WN0zDkz6p/3sb/B4thA=; b=Uz8ptzttLX2nSzgRtvJkkLZZzn5E0ERwOwpVfAZ3SVp09WxU85HmTtLdEiZLqFFYJZV4aA oChWjQn9+aqn8vjazP43ZBC7QvqixqUuUkAXfkKJKhxTke4Pd67/hdzbEQSEyRpuuJFSUC 9uT+W4EFXtS18ChxjBMgd1fbJyeo3fpXNTx9HBdOng3Oftd/32/lwbY8mMHyv1/sHEwqZL XxiotinqY19YgzxCpeUDa4n1IPkCvuTI5HQ28yoqvV923dZCX0AXZHouPh3SloCyX4Brax c6ZrcU6Lm1gWQJSuV4ldVYfQBnW1RXyR6ee0zpuHj4G3gobYTqZW5EchkhjJvw== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=tlikonen smtp.mailfrom=tlikonen@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1605388705; a=rsa-sha256; cv=none; b=p+T/hvUnx0GyKZu0lF2tqnuVOrqMLjtPdntFnsBOZuG5VUI7BtmKw8g6oJz6AFayVQbihU /VYgeES9rbwMpypCWZa00m0LO6wOpoprzEOqNScLb/Wi44a9MExyPgYbfSLac0GixRjLp5 Tx6NRDRShfBOu94G4Goj11RfJyjbyvPPJqZ9P74KnhxUOhPV0fqYslaba56GKgVC0bwxaE ATgLto4rq+kA6j2N9oYqiIB/IObat+KIcyQt+zlhrBg0XqgAlXnodwm9a/JNc1iWaprwcZ iwwlKqMfCvhkqcI9H2mV3oNBahiXTjt39JUtR9Jfg8wwqwrgxsfHE8XbpABwyQ== Received-SPF: pass client-ip=185.185.170.37; envelope-from=tlikonen@iki.fi; helo=lahtoruutu.iki.fi X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/14 16:18:26 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Variable bibtex-contline-indentation does not work as file local variable. The reason is that bibtex-mode command initializes variable fill-prefix before the possible file local variable is available. It gets always the global value of bibtex-contline-indentation. This can be fixed by locally let-binding fill-prefix every time in the relevant filling function. Patch for that is attached. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Make-bibtex-contline-indentation-work-as-file-local-.patch Content-Transfer-Encoding: quoted-printable From=20a776cae4fcd34987e30b6eab3df45bd2ae66fbd9 Mon Sep 17 00:00:00 2001 From: Teemu Likonen Date: Sat, 14 Nov 2020 22:53:18 +0200 Subject: [PATCH] Make `bibtex-contline-indentation' work as file local variable * lisp/textmodes/bibtex.el (bibtex-mode): Don't make fill-prefix a buffer local variable. It would use the global value, not possible file local variable. * lisp/textmodes/bibtex.el (bibtex-fill-field-bounds): Let-bind fill-prefix variable locally (and dynamically) for use with filling bibtex fields. The variable is initialized every time by using the current value of bibtex-contline-indentation variable. =2D-- lisp/textmodes/bibtex.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index fcf63ed5ec..151dca6fab 100644 =2D-- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -3442,8 +3442,6 @@ bibtex-mode (set (make-local-variable 'defun-prompt-regexp) "^[ \t]*@[[:alnum:]]+[ \= t]*") (set (make-local-variable 'outline-regexp) "[ \t]*@") (set (make-local-variable 'fill-paragraph-function) #'bibtex-fill-field) =2D (set (make-local-variable 'fill-prefix) =2D (make-string (+ bibtex-entry-offset bibtex-contline-indentation) = ?\s)) (set (make-local-variable 'font-lock-defaults) '(bibtex-font-lock-keywords nil t ((?$ . "\"") @@ -4902,7 +4900,10 @@ bibtex-fill-field-bounds "Fill BibTeX field delimited by BOUNDS. If JUSTIFY is non-nil justify as well. If optional arg MOVE is non-nil move point to end of field." =2D (let ((end-field (copy-marker (bibtex-end-of-field bounds)))) + (let ((end-field (copy-marker (bibtex-end-of-field bounds))) + (fill-prefix (make-string (+ bibtex-entry-offset + bibtex-contline-indentation) + ?\s))) (if (not justify) (goto-char (bibtex-start-of-text-in-field bounds)) (goto-char (bibtex-start-of-field bounds)) =2D-=20 2.20.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIYEARYIAC4WIQTJW2wqtelxC1gHdbitnXWr7pTCcwUCX7BJmBAcdGxpa29uZW5A aWtpLmZpAAoJEK2ddavulMJzpVgA/2m6V1SD9O3DNz0/AKmAFADPZYnDZ2hVyC8O QK3QnIegAP9g/GMOdiT/Z9ZT2vGG7PSPvXrTHBknBnA/nHBbUfUWAQ== =ocoi -----END PGP SIGNATURE----- --==-=-=-- ------------=_1606934342-24526-3-- From unknown Mon Jun 23 07:52:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44618: 26.3; bibtex.el ignores file variable bibtex-contline-indentation Resent-From: Francesco =?UTF-8?Q?Potort=C3=AC?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 03 Dec 2020 19:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44618 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Roland Winkler" Cc: Lars Ingebrigtsen , 44618@debbugs.gnu.org Received: via spool by 44618-submit@debbugs.gnu.org id=B44618.160702437117508 (code B ref 44618); Thu, 03 Dec 2020 19:40:02 +0000 Received: (at 44618) by debbugs.gnu.org; 3 Dec 2020 19:39:31 +0000 Received: from localhost ([127.0.0.1]:41828 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkuRu-0004YJ-Md for submit@debbugs.gnu.org; Thu, 03 Dec 2020 14:39:30 -0500 Received: from smtp-clients1.isti.cnr.it ([146.48.28.36]:41618) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkuRt-0004YB-1c for 44618@debbugs.gnu.org; Thu, 03 Dec 2020 14:39:29 -0500 Received: from tucano.isti.cnr.it (tucano.isti.cnr.it [146.48.81.102]) (Authenticated sender: pot) by smtp-clients1.isti.cnr.it (Postfix) with ESMTPSA id 18F93B0512; Thu, 3 Dec 2020 20:39:26 +0100 (CET) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at smtp-out.isti.cnr.it Received: from pot by tucano.isti.cnr.it with local (Exim 4.94) (envelope-from ) id 1kkuRq-00Fsgn-HK; Thu, 03 Dec 2020 20:39:26 +0100 From: Francesco =?UTF-8?Q?Potort=C3=AC?= Date: Thu, 03 Dec 2020 20:39:26 +0100 In-Reply-To: <3006.31876.328410.24499@gargle.gargle.HOWL> (winkler@gnu.org) References: <877dqnzz8t.fsf@gnus.org> <3006.31876.328410.24499@gargle.gargle.HOWL> Organization: X-fingerprint: 4B02 6187 5C03 D6B1 2E31 7666 09DF 2DC9 BE21 6115 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-Id: X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) >Can you please try the attached patch using hack-local-variables-hook? >This was partly inspired by the related comment > >https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21764#15 Sorry for the delay, I have now managed to test the latest version of bibtex.el which includes your patch, and it works for me. I made various tests and I saw no problems. Thanks -- fp