unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36830: 26.2; find-file-visit-truename is not honored as file local variable
@ 2019-07-28 15:21 Gustavo Barros
  2019-08-23  5:05 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Gustavo Barros @ 2019-07-28 15:21 UTC (permalink / raw)
  To: 36830

Hi all,

`find-file-visit-truename` is defined in "files.el" and is included 
there as a safe-local-variable (as long as boolean).  However, its use 
as a file local variable does not seem to be honored.

Steps to reproduce.

Consider a scenario with the following directory tree:

#+begin_example
~/
~/FolderA/
~/FolderA/TargetFile.txt
~/FolderB/
~/FolderB/LinkToTargetFile.txt -> ~/FolderA/TargetFile.txt
#+end_example

"~/FolderA/TargetFile.txt" has `find-file-visit-truename` set to true as 
a file local variable.

Start ~emacs -Q~ and visit "~/FolderB/LinkToTargetFile.txt".

Eval ~(buffer-file-name)~ and the result is: 
"~/FolderB/LinkToTargetFile.txt" (substituted home folder). Whereas 
=(file-truename (buffer-file-name))= reports "~/FolderA/TargetFile.txt", 
which would be the expected visited file, given the local file variable.


Best regards,
Gustavo Barros.

PS: I’ve asked about this elsewhere 
(https://emacs.stackexchange.com/q/51495/18951). But, since then, 
investigating this further, and considering this works for 
`vc-follow-symlinks` (which is being discussed at 
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33264), I came to think 
this indeed might be unexpected behavior. Thus this report.




In GNU Emacs 26.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2019-04-19 built on gusbrs-laptop
Windowing system distributor 'The X.Org Foundation', version 
11.0.11906000
System Description:	Linux Mint 19.1 Tessa

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
"/home/gustavo/FolderB/LinkToTargetFile.txt"
Making completion list...
"/home/gustavo/FolderA/TargetFile.txt"
Configured using:
 'configure --with-mailutils --with-xwidgets --with-modules'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD LCMS2

Important settings:
  value of $LC_MONETARY: pt_BR.UTF-8
  value of $LC_NUMERIC: pt_BR.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Text

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 96167 6183)
 (symbols 48 20414 1)
 (miscs 40 54 104)
 (strings 32 28445 1315)
 (string-bytes 1 748145)
 (vectors 16 14078)
 (vector-slots 8 502466 7254)
 (floats 8 51 146)
 (intervals 56 523 0)
 (buffers 992 13))





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-10-14 21:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-28 15:21 bug#36830: 26.2; find-file-visit-truename is not honored as file local variable Gustavo Barros
2019-08-23  5:05 ` Lars Ingebrigtsen
2019-08-23 13:04   ` Gustavo Barros
2019-08-23 18:59     ` Lars Ingebrigtsen
2019-08-23 20:07       ` Eli Zaretskii
2019-08-23 21:38         ` Gustavo Barros
2019-08-25  5:39         ` Lars Ingebrigtsen
2019-08-25  7:31           ` Eli Zaretskii
2019-10-14 21:38             ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).