From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 16:18:42 2020 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----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 14 16:27:52 2020 Received: (at 44647) by debbugs.gnu.org; 14 Nov 2020 21:27:53 +0000 Received: from localhost ([127.0.0.1]:52225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ke35M-0006R6-Lt for submit@debbugs.gnu.org; Sat, 14 Nov 2020 16:27:52 -0500 Received: from lahtoruutu.iki.fi ([185.185.170.37]:56716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ke35K-0006Qx-0E for 44647@debbugs.gnu.org; Sat, 14 Nov 2020 16:27:50 -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 3EA5A1B003A9; Sat, 14 Nov 2020 23:27:48 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1605389268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uw/aGFO6WIMFqmse8VIBMkZtdtJEpjsxitoaHFDYwes=; b=J0KOtfP9Eu7n7MdGSH5a24D2VN8E7acJnK4JQYDpRaNy8jKeVUaReC7WQRDVrDByD9gYFU guHYiS48yoSSWNCdoM/D6Uex+WALQNWmf2eRZYgNgMUdzc976CEXvZqxhVsb1eFAe7fVAv tEN/unx6GOiHSxi3X5bLgKtJglQbwJyecFzfZYjplTm3kAIQV5jo7jMmyIC2AuRXz/PS+l bVx4RXExe6jYq1CopkY2vUN1e8rcPnas2sTO7F0fYQUAmJ6U13Op59Vi7scD5NBpnaFQ07 SYnZB/LaKvYuktvztjbfZFnnCcwJ2zjBaizFZB6br+IEH1qUUiExwl6iN+0t0g== From: Teemu Likonen To: winkler@gnu.org Subject: Re: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable In-Reply-To: <87d00fmycn.fsf@iki.fi> References: <87d00fmycn.fsf@iki.fi> Date: Sat, 14 Nov 2020 23:27:41 +0200 Message-ID: <87a6vjmxwy.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=1605389268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uw/aGFO6WIMFqmse8VIBMkZtdtJEpjsxitoaHFDYwes=; b=vHwb9IwOUq29ePyx7kXww13nWzbXLLzF9m7OtAVTnSXmen/E9CLAW/EPSmivBQO2AVesvf IDV1TO9SwPZjX/9QyR8FaotlUow3vyjIK3fELaSSAVHIFyAdL1Frw1gQ4chWQ1FU09hjtV IbKhHzMetEQMLyLEamZsBf0Yl8DuFkcajPIU4SUZ3jvgq15CnuO93VOlscsxaon+zc1Qno TGLzCENJoCqQ+tuKfPhDn6DfLFjtYBhAvwDWfmDQTC+YbK/iK9jmo6XjYY2NhtA3u5IuQf 8romvra1itmLoj3PS9ErHd9gNb1x7oZ0dDCAYvMYUEKgf6UFZU86Sw0a+326cg== 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=1605389268; a=rsa-sha256; cv=none; b=A8ljHb/Wauuwp5Xc1KThigZ80/NfX7MxjqJcadbuWeUgpJzgJds4DgbG+JwmUsZ1j8QmyW HLP2A4QCGI+Ub25DYeBlcg+N29U8JBmzL5wA6brqyAqeiF1GsZp++ojqQnSPxRXycbmnbH u23r3j0S1ELxRA9VQ4JWBW4/Ak/qbPeFIOWZq46YdYbnpYi3U0IgjFyuiD5Asrv5cyRhKA z4QcjeFaEH/RCAVW1peZHrBaFOaytgR8IyaCckCqX5WLs8/cEbrM4c5koLW7wA5DamHnRB DW2msAgqkC9kXmo3SjMcu4M8X5lWv1ATiz4SDlnmwVBM6KHkF5y4CbD1H/aq/A== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44647 Cc: 44647@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 (-) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello Roland! I found and fixed a bug in Emacs bibtex.el file. Here's my description: * 2020-11-14 23:18:16+02, Teemu Likonen wrote: > 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. See: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D44647 What do you think of the patch which I attached to the bug report? =2D-=20 /// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/ // OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIYEARYIAC4WIQTJW2wqtelxC1gHdbitnXWr7pTCcwUCX7BLzRAcdGxpa29uZW5A aWtpLmZpAAoJEK2ddavulMJzNQYBAJpgv1B9/ehh/i+yJDYOeDUEo5rfQrTwgL0I RjrwiGIXAQDWE5DEZh6viDNlT7/XXZVpEyroLlUYJRmc9bMLRhTQCw== =Cdmc -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 04:40:13 2020 Received: (at 44647) by debbugs.gnu.org; 15 Nov 2020 09:40:13 +0000 Received: from localhost ([127.0.0.1]:52486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keEW5-0003Lx-BC for submit@debbugs.gnu.org; Sun, 15 Nov 2020 04:40:13 -0500 Received: from meesny.iki.fi ([195.140.195.201]:44832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keEW2-0003Lo-Aq for 44647@debbugs.gnu.org; Sun, 15 Nov 2020 04:40:11 -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 meesny.iki.fi (Postfix) with ESMTPSA id 4E4A720260; Sun, 15 Nov 2020 11:40:08 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1605433208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qPk9xEW7GdPALKJxVkw0cLulGp1QJkL+zB85xQ5b5wE=; b=cqhgilSS/4hQcNDVWJ6mQ77ZgVYBurlpXMqT91yomnprtoo8icZ3YXE4jwPwjgILxJW8n6 PcnaMbi1+8mVabUu20xpkCZvcJXn0RdmliW9fCR+VxsIxBdw4joH739DNdszmvV/iiAUcF eWJPNOEksPPbel5BZPh/W26wzfgPhvc= From: Teemu Likonen To: winkler@gnu.org Subject: Re: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable In-Reply-To: <87a6vjmxwy.fsf@iki.fi> References: <87d00fmycn.fsf@iki.fi> <87a6vjmxwy.fsf@iki.fi> Date: Sun, 15 Nov 2020 11:39:59 +0200 Message-ID: <87r1ovj6vk.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=meesny; t=1605433208; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qPk9xEW7GdPALKJxVkw0cLulGp1QJkL+zB85xQ5b5wE=; b=xIYDSjEAZg2K2VuM/VhFwGKAe4jf5lyFgjn3TDt6vCN35/soQKIBGEzFTO5olBvyPm7vnY Aekp+aHJT2GkcfbK2r2LmEySa/AgLhQeClBUmUbOHVwyL+FYfU8DJB+RZe8fCwzcgCITqq t8DbIupEsbQ93aso+Zm3bSfiDOKw/qw= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=tlikonen smtp.mailfrom=tlikonen@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1605433208; a=rsa-sha256; cv=none; b=PbRIKTJU2kYKWku/KS5yV+iQhr8nobf4/Mu3YYjBsvCl15P6wnSDOuT43PwgTnmFMi33CK lOlQXH5uorXdD/epB8uQdp2ivDcF7UrCj4g0dNmoPDyUn/x3zT+XP1LSkF70J9rZFs+K0n g0jzTrIeqTSzYsaTu7TfZozrp5Vmc+g= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44647 Cc: 44647@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 (-) --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain * 2020-11-14 23:27:41+02, Teemu Likonen wrote: > * 2020-11-14 23:18:16+02, Teemu Likonen wrote: >> 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. > > See: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44647 I'll add one example. Currently if we want to use file or directory local variable to define bibtex indentation we must do use variable bibtex-text-indentation for normal field value indentation and then use fill-prefix with spaces to define the indentation for continuation lines: ;; .dir-locals.el ((bibtex-mode . ((bibtex-text-indentation . 20) (fill-prefix . " ")))) ; 21 spaces Quite obviously more user-friendly way would be this: ;; .dir-locals.el ((bibtex-mode . ((bibtex-text-indentation . 20) (bibtex-contline-indentation . 21)))) My patch does this. It let-binds fill-prefix every time and initializes its value by using the (possibly buffer local) value of bibtex-contline-indentation. Here is inline version of the patch so that it is easier to read in debbugs.gnu.org page. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; 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: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 /// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/ // OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIYEARYIAC4WIQTJW2wqtelxC1gHdbitnXWr7pTCcwUCX7D3bxAcdGxpa29uZW5A aWtpLmZpAAoJEK2ddavulMJzrGoBAOB5Dg7+EJVhGZpdInk8vvRYNlPfMh/jcAiT 1/jo7pTfAQCH/ZEw1dc9YDb4j8Tfj3fOhkZeKbWHkNHLnSmdZbZaBw== =r5bS -----END PGP SIGNATURE----- --==-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 15 23:09:55 2020 Received: (at 44647) by debbugs.gnu.org; 16 Nov 2020 04:09:55 +0000 Received: from localhost ([127.0.0.1]:54760 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keVpy-0001kH-Uc for submit@debbugs.gnu.org; Sun, 15 Nov 2020 23:09:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1keVpt-0001k0-ON for 44647@debbugs.gnu.org; Sun, 15 Nov 2020 23:09:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53810) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1keVpn-00035P-PA; Sun, 15 Nov 2020 23:09:43 -0500 Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=45798 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1keVpm-0003Tz-Vd; Sun, 15 Nov 2020 23:09:43 -0500 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="zGlKVBTMv2" Content-Transfer-Encoding: 7bit Message-ID: <64387.9639.499249.24497@gargle.gargle.HOWL> Date: Sun, 15 Nov 2020 22:09:39 -0600 From: "Roland Winkler" To: Teemu Likonen Subject: Re: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable In-Reply-To: <87a6vjmxwy.fsf@iki.fi> References: <87d00fmycn.fsf@iki.fi> <87a6vjmxwy.fsf@iki.fi> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44647 Cc: 44647@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 (---) --zGlKVBTMv2 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit On Sat Nov 14 2020 Teemu Likonen wrote: > This can be fixed by locally let-binding fill-prefix every time in > the relevant filling function. Patch for that is attached. Your patch implies that the buffer-local value of fill-prefix is not what it should be (say, if any other command wants to use it). How about the rather different patch attached below, 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. --zGlKVBTMv2 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== --zGlKVBTMv2-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 09:05:31 2020 Received: (at 44647) by debbugs.gnu.org; 16 Nov 2020 14:05:31 +0000 Received: from localhost ([127.0.0.1]:55435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kef8M-0004QS-SO for submit@debbugs.gnu.org; Mon, 16 Nov 2020 09:05:31 -0500 Received: from lahtoruutu.iki.fi ([185.185.170.37]:53766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kef8K-0004QJ-C0 for 44647@debbugs.gnu.org; Mon, 16 Nov 2020 09:05:29 -0500 Received: from mithlond (mobile-access-5d6a34-58.dhcp.inet.fi [93.106.52.58]) (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 6B8281B0033E; Mon, 16 Nov 2020 16:05:26 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1605535526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=psdRUjGI9krE+IgKFSadGMlLLLjMPy25a1ttzHbUlFI=; b=DCd20jK9FPr4BKb0MZ2Jm05ceECeDav2KJRjZragVsTT4yzWa1y5kc4RmXuatoBQW4UEvQ MysqkUtYiV0XdpQ8QUmAUG+m+N8PDyRljpd+66B4mt9IvLK4sydOKoIOt7TVY3Xrx5SZwO x8z3C7zRdLC8OoTWJzzGT4Wg08mLc7tAFnarmddoLlHhH078h2h5SqX60IvdmjwoMj10Un sM/F2eKrMDnRdrM64M+GG08n5sFT/mDvzrwhih91CM+xQI+RmCTUPbqhlc60+QlPqNcGfg lG/Fr97JioAOAXRMLJszz5Dr8B6kt8wJy/PyYzr4STlm0WyuIwCmZsgSDDrJCQ== From: Teemu Likonen To: Roland Winkler Subject: Re: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable In-Reply-To: <64387.9639.499249.24497@gargle.gargle.HOWL> References: <87d00fmycn.fsf@iki.fi> <87a6vjmxwy.fsf@iki.fi> <64387.9639.499249.24497@gargle.gargle.HOWL> Date: Mon, 16 Nov 2020 16:05:18 +0200 Message-ID: <87eektcs81.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=1605535526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=psdRUjGI9krE+IgKFSadGMlLLLjMPy25a1ttzHbUlFI=; b=fqyLTncFbr+aJH/ZsZBUg30HlWVPY79KBX9gplrbqzGZQbtSzcvhEDcOPE6txH5IthgKHN lhB5ajcY0TPqtdRLK3t2nFLir7pfWK9k7Q5oHs/BNBkYUi+nvEsJ11ZQjP2c5RplnokllL BerKuLyI3WWapob3n/ahUgXSH92PniEEclZLY0d7mUmVEaXIvRy/Iv0c88mKwSnDrM3v9I spqaG53eG9HBoIbIG1qHUD1NHMBaRuGG0Ph3u7NnRLbewYDKi6pzMNd0Lp91fLUlOyxpKq H13lfbvY8qa6ohQNSDQN5O/V3gt9RxkYcK/1U0cFX1MUmpmoEn6v3NnH6SpANg== 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=1605535526; a=rsa-sha256; cv=none; b=VEXLz9IQwHy/jwlsmCOD/e31ByqhXPEBMp0xOUhVi4ufgHUuxT3LnrYuH0n7T45XNQ9qY/ 9kIK7yP3D9+ZzjPMVQMiLwlKuIEE+ZYpHuCjk88BfmoJAAZgpqu/y+VLrmOZANiPgxmax4 3hBYj3mTfHXSvM+GSnoAL4Mo+16BZXzCrmg81IcVp1P4UJOt9jSp6qo7UmToZ4NazCJw3y m0hAJ+xtTUTXj77h+rAP7NJD1RCNici97X2watPM4YBA3K2RpG+aum8XrK8DblKNooaSgQ KF4dg6tzdJ+b9UVNcBge7ZiHM5BfHcZrC+5F7VGgNL/m7qyLihZBeyjkFEjPig== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 44647 Cc: 44647@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 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable * 2020-11-15 22:09:39-06, Roland Winkler wrote: > On Sat Nov 14 2020 Teemu Likonen wrote: >> This can be fixed by locally let-binding fill-prefix every time in >> the relevant filling function. Patch for that is attached. > > Your patch implies that the buffer-local value of fill-prefix is not > what it should be (say, if any other command wants to use it). Yes. Bibtex-mode's filling uses fill-prefix and that variable must be set to correct value before filling. The correct moment may not be when a bibtex-mode buffer is initialized with buffer-local values. More about this below. > How about the rather different patch attached below, partly inspired > by the related comment > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21764#15 > > which had somehow escaped my attention. The issues mentioned in > this comment should likewise be fixed by the attached patch. That patch sets buffer-local value for fill-prefix correctly. I'm quite okay with that but it is not optimal. If user later changes the related settings, like (setq-local bibtex-text-indentation 25 bibtex-contline-indentation 26) and then tries to fill the current bibtex entry (C-c C-q) then only bibtex-text-indentation actually works but bibtex-contline-indentation doesn't have any effect. The wrong result is caused by the wrong value of fill-prefix, like this: @book{pitk=C3=A4johdanto, author =3D {Oetiker, Tobias and Partl, Hubert and Hyna,= Irene and Schlegl, Elisabeth and Hell\-gren, Timo}, title =3D {Pitk=C3=A4npuoleinen johdanto Latex 2=CE=B5= :n k=C3=A4ytt=C3=B6=C3=B6n}, subtitle =3D {Eli opi Latex 2=CE=B5 133 minuutissa}, note =3D {Versio 4.17fi, lokakuu 2005}, date =3D 2005, url =3D {https://www.ctan.org/pkg/lshort-finnish}, } That is why I think fill-prefix should be let-bound every time. User should be able to trust that bibtex-contline-indentation does the right thing. =2D-=20 /// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/ // OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIYEARYIAC4WIQTJW2wqtelxC1gHdbitnXWr7pTCcwUCX7KHHhAcdGxpa29uZW5A aWtpLmZpAAoJEK2ddavulMJzGfIA/0Q+8k1u5RHDAZCoMZJ5w9gLS+asmGSEeQdb K45KrFkXAQDQDGH3doDHgBNoRkmlFjW90Jjb7gMmXilwBF/yD8/TDQ== =N7wh -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 11:37:13 2020 Received: (at 44647) by debbugs.gnu.org; 16 Nov 2020 16:37:13 +0000 Received: from localhost ([127.0.0.1]:56905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kehVB-0003G9-0G for submit@debbugs.gnu.org; Mon, 16 Nov 2020 11:37:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kehVA-0003Fx-2S for 44647@debbugs.gnu.org; Mon, 16 Nov 2020 11:37:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36280) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kehV2-0000PB-R3; Mon, 16 Nov 2020 11:37:04 -0500 Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=46650 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1kehUr-0004PB-UQ; Mon, 16 Nov 2020 11:36:56 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <43675.43620.246196.24498@gargle.gargle.HOWL> Date: Mon, 16 Nov 2020 10:36:43 -0600 From: "Roland Winkler" To: Teemu Likonen Subject: Re: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable In-Reply-To: <87eektcs81.fsf@iki.fi> References: <87d00fmycn.fsf@iki.fi> <87a6vjmxwy.fsf@iki.fi> <64387.9639.499249.24497@gargle.gargle.HOWL> <87eektcs81.fsf@iki.fi> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44647 Cc: 44647@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 Mon Nov 16 2020 Teemu Likonen wrote: > > Your patch implies that the buffer-local value of fill-prefix is not > > what it should be (say, if any other command wants to use it). > > Yes. Bibtex-mode's filling uses fill-prefix and that variable must > be set to correct value before filling. The correct moment may not > be when a bibtex-mode buffer is initialized with buffer-local > values. Defcustom supports the keyword :set that can handle the case when a user variable such as bibtex-contline-indentation is changed which implies updating another variable such as fill-prefix. However, I assume that this is a rather rare case in the present context. On the other hand, it is a design principle of emacs that variables such as fill-prefix can be and are used by different commands. So they should have their proper value instead of only let-binding them on the fly. Such let-bindings are used only when it is the intent to use different values than the proper buffer-local values. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 16 17:58:24 2020 Received: (at 44647) by debbugs.gnu.org; 16 Nov 2020 22:58:24 +0000 Received: from localhost ([127.0.0.1]:57670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kenS4-0006eB-7x for submit@debbugs.gnu.org; Mon, 16 Nov 2020 17:58:24 -0500 Received: from quimby.gnus.org ([95.216.78.240]:40116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kenS2-0006dz-9x for 44647@debbugs.gnu.org; Mon, 16 Nov 2020 17:58:22 -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=mKCmAxBAWwKxVkOX3uivd8Hr4o8vNw222HcAhLNrpxk=; b=CiwF2EMI5dK+yy6C58w9hw8F3z 7ytpfWBH+9sb7+xh3GJZsYUXL1ZNH+fqcpEvvR/OOLEkDIAVokYpjIdfi4jpkmLkaRHowa5Q1KLxa nm/PkEZFyXKrMzGOSmrbulINtiVxG0cOGzYPKDEdb1kwhCFWqONtObfsyaJhV+pjPvaI=; 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 1kenRt-0006tt-Ky; Mon, 16 Nov 2020 23:58:16 +0100 From: Lars Ingebrigtsen To: Teemu Likonen Subject: Re: bug#44647: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable References: <87d00fmycn.fsf@iki.fi> <87a6vjmxwy.fsf@iki.fi> X-Now-Playing: Yes's _The Yes Album_: "Clap" Date: Mon, 16 Nov 2020 23:58:12 +0100 In-Reply-To: <87a6vjmxwy.fsf@iki.fi> (Teemu Likonen's message of "Sat, 14 Nov 2020 23:27:41 +0200") Message-ID: <87a6vgucxn.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: Teemu Likonen writes: > I found and fixed a bug in Emacs bibtex.el file. Here's my description: This is the same as bug#44618, so I'm merging these two. See my comments there. 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: 44647 Cc: 44647@debbugs.gnu.org, winkler@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 (-) Teemu Likonen writes: > I found and fixed a bug in Emacs bibtex.el file. Here's my description: This is the same as bug#44618, so I'm merging these two. See my comments there. -- (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 debbugs-submit-bounces@debbugs.gnu.org Wed Dec 02 13:38:32 2020 Received: (at 44647-done) by debbugs.gnu.org; 2 Dec 2020 18:38:32 +0000 Received: from localhost ([127.0.0.1]:37371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkX1L-0006Mp-NA for submit@debbugs.gnu.org; Wed, 02 Dec 2020 13:38:31 -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: 44647-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. From unknown Mon Jun 23 13:12:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 01 Jan 2021 12:24:06 +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