From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.bugs Subject: bug#44647: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable Date: Mon, 16 Nov 2020 16:05:18 +0200 Message-ID: <87eektcs81.fsf@iki.fi> References: <87d00fmycn.fsf@iki.fi> <87a6vjmxwy.fsf@iki.fi> <64387.9639.499249.24497@gargle.gargle.HOWL> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14643"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44647@debbugs.gnu.org To: Roland Winkler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 16 15:07:45 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kefAX-0003ez-5t for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 15:07:45 +0100 Original-Received: from localhost ([::1]:51132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kefAW-0001bv-0J for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Nov 2020 09:07:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kef8t-00083g-00 for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 09:06:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kef8s-0005PE-Lm for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 09:06:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kef8s-0004RB-Fb for bug-gnu-emacs@gnu.org; Mon, 16 Nov 2020 09:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Teemu Likonen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Nov 2020 14:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44647 X-GNU-PR-Package: emacs Original-Received: via spool by 44647-submit@debbugs.gnu.org id=B44647.160553553117021 (code B ref 44647); Mon, 16 Nov 2020 14:06:02 +0000 Original-Received: (at 44647) by debbugs.gnu.org; 16 Nov 2020 14:05:31 +0000 Original-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 Original-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 Original-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== In-Reply-To: <64387.9639.499249.24497@gargle.gargle.HOWL> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:193426 Archived-At: --=-=-= 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----- --=-=-=--