GNU bug report logs - #39190
28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)

Previous Next

Package: emacs;

Reported by: Felician Nemeth <felician.nemeth <at> gmail.com>

Date: Sun, 19 Jan 2020 11:15:02 UTC

Severity: normal

Found in version 28.0.50

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juri Linkov <juri <at> linkov.net>
Cc: 39190 <at> debbugs.gnu.org, Felician Nemeth <felician.nemeth <at> gmail.com>
Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props)
Date: Fri, 24 Jan 2020 09:18:06 -0500
>> Yes, it's definitely borderline.  I remember feeling a bit uneasy about
>> it at the time.  Maybe a better fix would be to be able to pass the
>> file-name to `set-auto-mode` (or some new function created for that
>> purpose) as an argument (instead of passing it via dynamic scoping in
>> `buffer-file-name`).
>
> The problem is that the right value of buffer-file-name is required
> also by other more deep functions that set local variables like
> dir-locals-collect-variables.

Passing it down as an arg is indeed problematic.
Maybe we should just add yet-another buffer-<foo>-filename and change
the corresponding places to so that instead of consulting

    buffer-file-name

they consult

    (or buffer-file-name buffer-<foo>-filename)

Maybe this could also be used for things like `vc-revision-other-window`.


        Stefan





This bug report was last modified 5 years and 83 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.