all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Teemu Likonen <tlikonen@iki.fi>
To: Roland Winkler <winkler@gnu.org>
Cc: 44647@debbugs.gnu.org
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	[thread overview]
Message-ID: <87eektcs81.fsf@iki.fi> (raw)
In-Reply-To: <64387.9639.499249.24497@gargle.gargle.HOWL>

[-- Attachment #1: Type: text/plain, Size: 2174 bytes --]

* 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

  reply	other threads:[~2020-11-16 14:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 21:18 bug#44647: 27.1.50; `bibtex-contline-indentation' doesn't work as file local variable Teemu Likonen
2020-11-14 21:27 ` Teemu Likonen
2020-11-15  9:39   ` Teemu Likonen
2020-11-16  4:09   ` Roland Winkler
2020-11-16 14:05     ` Teemu Likonen [this message]
2020-11-16 16:36       ` Roland Winkler
2020-11-16 22:58   ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eektcs81.fsf@iki.fi \
    --to=tlikonen@iki.fi \
    --cc=44647@debbugs.gnu.org \
    --cc=winkler@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.