From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Gustavo Barros Newsgroups: gmane.emacs.bugs Subject: bug#36830: 26.2; find-file-visit-truename is not honored as file local variable Date: Sun, 28 Jul 2019 12:21:21 -0300 Message-ID: <87d0hufamm.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="140766"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: mu4e 1.2.0; emacs 26.2 To: 36830@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 28 17:22:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrkzy-000aTm-2k for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jul 2019 17:22:10 +0200 Original-Received: from localhost ([::1]:45650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrkzw-0006VJ-JV for geb-bug-gnu-emacs@m.gmane.org; Sun, 28 Jul 2019 11:22:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54082) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrkzr-0006Uq-UR for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 11:22:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrkzq-0001Bj-Cj for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 11:22:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38178) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrkzq-0001Bf-9W for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 11:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hrkzq-0007XX-2S for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 11:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gustavo Barros Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 28 Jul 2019 15:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36830 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156432729228939 (code B ref -1); Sun, 28 Jul 2019 15:22:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jul 2019 15:21:32 +0000 Original-Received: from localhost ([127.0.0.1]:46999 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrkzL-0007Wg-QM for submit@debbugs.gnu.org; Sun, 28 Jul 2019 11:21:32 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrkzK-0007WZ-3B for submit@debbugs.gnu.org; Sun, 28 Jul 2019 11:21:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53951) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrkzI-0005yb-KE for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 11:21:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrkzH-00010i-3J for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 11:21:28 -0400 Original-Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]:45677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrkzG-00010I-Vh for bug-gnu-emacs@gnu.org; Sun, 28 Jul 2019 11:21:27 -0400 Original-Received: by mail-qt1-x843.google.com with SMTP id x22so52353081qtp.12 for ; Sun, 28 Jul 2019 08:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:user-agent:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=BpLVkM8IqXjfIA5ZIyZ5Qmv3muTMtgqMeYijqa8O9dQ=; b=WRglEizw+PP0b0c4ZZHmuoouwawR/vVGeHkIJ2wONBjXyvoxDweRMzCpmG28uiAWAW C8lHouyZbgolByFaD2rK89L4qSXill2DIqddTgr2T3tqneUs4Vmki5oFRb8vd7l6vNlb lVZE3IETQQy1GENbynFSkIZDRV4JXQ84RL+2Gce/544W/HG2i2gMS37yCveQpqfP7MmA 2MYBbs2S28j+UuJfUgASeWC9wr24YA09xqYS/7A2Pff7YRvAk0eMFLpzHCvFFP3882L1 J5etv4M4fddQstfXbC5sQtz/R36SIUvhAdrXGIdRF0hyGXxaVeo8Evp+wopOkl3bnOxU 1hcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:user-agent:from:to:subject:date :message-id:mime-version:content-transfer-encoding; bh=BpLVkM8IqXjfIA5ZIyZ5Qmv3muTMtgqMeYijqa8O9dQ=; b=TXpOHBCOBnpCyvFv8jjc2MiyAwO4/XXELmdIxDJ6NVdUO96LGTMAy3TpKFd8ZFi/fM wqvBBriVxImPeg1g0YvFbZfYeOBNfKZVKDhNMaemHfaH3v9KK3a6KhD3uj/0gJwwwAnr FHrBJ/b/nUyM71QAQzTb6fgN192inXke97jKdPwl+PlqSUxZARW4iKfdnml6OoHXzEF1 a+167bebpYOeswb0OWVbcIKvC0qYnaWEm5hI/GCAG6G8D+vmATk33D6EuxGDhHQx1cKV TJc6Yj5dOFjsGqqGyumsoRAswWMaRqABy+WoJ20IvS2O38ZwgwmNfENtCt+C0Xl3Be02 94Pg== X-Gm-Message-State: APjAAAVBKgLzcWA/CPh+lqprOH7mRZZrgXzaZpIopZF7QZQYNGz7+xI9 vLLx/r+ZkaWn5zgz/vtpS0Ko2lwHqkU= X-Google-Smtp-Source: APXvYqw0/0LQ6DgawA+zBH01GAc2Tnb8kNrvdPcCrAJe6Fq6V407aq7aJlus9z14v4JGnR+SsFdNYg== X-Received: by 2002:ac8:36b9:: with SMTP id a54mr75702540qtc.300.1564327285989; Sun, 28 Jul 2019 08:21:25 -0700 (PDT) Original-Received: from gusbrs-laptop (ip-68-2-52-196.nyc.us.northamericancoax.com. [196.52.2.68]) by smtp.gmail.com with ESMTPSA id h18sm23365499qkj.134.2019.07.28.08.21.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 28 Jul 2019 08:21:25 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163972 Archived-At: Hi all, `find-file-visit-truename` is defined in "files.el" and is included=20 there as a safe-local-variable (as long as boolean). However, its use=20 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=20 a file local variable. Start ~emacs -Q~ and visit "~/FolderB/LinkToTargetFile.txt". Eval ~(buffer-file-name)~ and the result is:=20 "~/FolderB/LinkToTargetFile.txt" (substituted home folder). Whereas=20 =3D(file-truename (buffer-file-name))=3D reports "~/FolderA/TargetFile.txt"= ,=20 which would be the expected visited file, given the local file variable. Best regards, Gustavo Barros. PS: I=E2=80=99ve asked about this elsewhere=20 (https://emacs.stackexchange.com/q/51495/18951). But, since then,=20 investigating this further, and considering this works for=20 `vc-follow-symlinks` (which is being discussed at=20 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D33264), I came to think=20 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=20 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))