GNU bug report logs -
#44647
27.1.50; `bibtex-contline-indentation' doesn't work as file local variable
Previous Next
Reported by: Teemu Likonen <tlikonen <at> iki.fi>
Date: Sat, 14 Nov 2020 21:19:02 UTC
Severity: minor
Merged with 44618
Found in versions 26.3, 27.1.50
Done: "Roland Winkler" <winkler <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
* 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=21764#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äjohdanto,
author = {Oetiker, Tobias and Partl, Hubert and Hyna, Irene and
Schlegl, Elisabeth and Hell\-gren, Timo},
title = {Pitkänpuoleinen johdanto Latex 2ε:n käyttöön},
subtitle = {Eli opi Latex 2ε 133 minuutissa},
note = {Versio 4.17fi, lokakuu 2005},
date = 2005,
url = {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.
--
/// Teemu Likonen - .-.. https://www.iki.fi/tlikonen/
// OpenPGP: 4E1055DC84E9DFF613D78557719D69D324539450
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 4 years and 174 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.