From unknown Tue Aug 19 10:03:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#66638: 29.1; `file-relative-name' and symbolic links Resent-From: Bogdan Ruslanovich Drozd Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Oct 2023 13:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66638 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 66638@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169772268017562 (code B ref -1); Thu, 19 Oct 2023 13:38:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Oct 2023 13:38:00 +0000 Received: from localhost ([127.0.0.1]:36114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtTDr-0004ZC-83 for submit@debbugs.gnu.org; Thu, 19 Oct 2023 09:37:59 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtTD7-0004Xw-Vt for submit@debbugs.gnu.org; Thu, 19 Oct 2023 09:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtTCW-0002hl-N9 for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 09:36:37 -0400 Received: from forward101b.mail.yandex.net ([178.154.239.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtTCS-0001e3-MN for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 09:36:35 -0400 Received: from mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net [IPv6:2a02:6b8:c14:150a:0:640:1aa5:0]) by forward101b.mail.yandex.net (Yandex) with ESMTP id 7967060ABC for ; Thu, 19 Oct 2023 16:36:22 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id LamJJU6Wra60-AAzhnfl8; Thu, 19 Oct 2023 16:36:21 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1697722582; bh=Z/4qMCyBN9OxmdZIYgEk/UmmBfRhPUNKMBIMdNEwg00=; h=Message-ID:Date:Subject:To:From; b=ielrGwMaTAKwh19nmyaBsLW77s7DBg6SnRnshqucF05Mxb+DH9VigsQa+t0u5kdu2 0Ea+4+sooqmGrGnZGGbDr7hqYAHUj3o2DgyhBWElnB2BAGtUGeuLMVFhh23XSTE+lE thFO4zJ1DVimQBiSV1O2bhvoIZK9QfHj7E0wtZ3E= Authentication-Results: mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.com From: Bogdan Ruslanovich Drozd Date: Thu, 19 Oct 2023 16:36:20 +0300 Message-ID: <87a5sed99n.fsf@yandex.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.154.239.148; envelope-from=bogdan.ruslanovich.drozd@yandex.com; helo=forward101b.mail.yandex.net X-Spam_score_int: 9 X-Spam_score: 0.9 X-Spam_bar: / X-Spam_report: (0.9 / 5.0 requ) AC_FROM_MANY_DOTS=2.999, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 3.0 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: How I found the bug: LaTeX previews were not displayed in Org mode because the path where the file lies contains a symbolic link (e.g. `/home/user/docs/org' directory where `/home/user/docs' is a symb [...] Content analysis details: (3.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (bogdan.ruslanovich.drozd[at]yandex.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.0 SPOOFED_FREEMAIL No description available. X-Mailman-Approved-At: Thu, 19 Oct 2023 09:37:58 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) How I found the bug: LaTeX previews were not displayed in Org mode because the path where the file lies contains a symbolic link (e.g. `/home/user/docs/org' directory where `/home/user/docs' is a symbolic link to a directory). Bug description: `file-relative-name' (in `files.el') doesn't take into account symbolic links. How to reproduce: 1. Run `mkdir -p ~/a_dir/org'. 2. Run `ln -s ~/a_dir/org ~/docs'. 3. Run `emacs -Q ~/docs/example.org'. 4. Insert into the file "$2+2=4$", press `C-c C-x C-l', and see that it does not work. 5. Kill emacs. 6. Run `emacs -Q ~/a_dir/org/example.org'. 7. Insert into the file "$2+2=4$, press `C-c C-x C-l', and see LaTeX preview. In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-09-30 built on localhost Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Gentoo Linux Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --disable-silent-rules --docdir=/usr/share/doc/emacs-29.1-r1 --htmldir=/usr/share/doc/emacs-29.1-r1/html --libdir=/usr/lib64 --program-suffix=-emacs-29 --includedir=/usr/include/emacs-29 --infodir=/usr/share/info/emacs-29 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --without-compress-install --without-hesiod --without-pop --with-file-notification=inotify --with-pdumper --enable-acl --with-dbus --with-modules --without-gameuser --with-libgmp --with-gpm --with-native-compilation=aot --with-json --without-kerberos --without-kerberos5 --with-lcms2 --with-xml2 --without-mailutils --without-selinux --with-sqlite3 --with-gnutls --with-libsystemd --with-threads --with-tree-sitter --without-wide-int --with-sound=alsa --with-zlib --with-x --without-pgtk --without-ns --without-gconf --without-gsettings --without-toolkit-scroll-bars --with-xpm --with-xft --with-cairo --with-harfbuzz --without-libotf --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-webp --with-imagemagick --with-dumping=pdumper 'CFLAGS=-O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_COLLATE: C.utf8 value of $LC_MONETARY: en_GB.utf8 value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix From unknown Tue Aug 19 10:03:22 2025 X-Loop: help-debbugs@gnu.org Subject: bug#66638: 29.1; `file-relative-name' and symbolic links Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Oct 2023 14:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66638 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Bogdan Ruslanovich Drozd Cc: 66638@debbugs.gnu.org Received: via spool by 66638-submit@debbugs.gnu.org id=B66638.169772480223659 (code B ref 66638); Thu, 19 Oct 2023 14:14:02 +0000 Received: (at 66638) by debbugs.gnu.org; 19 Oct 2023 14:13:22 +0000 Received: from localhost ([127.0.0.1]:37381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtTm6-00069W-5l for submit@debbugs.gnu.org; Thu, 19 Oct 2023 10:13:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtTm3-00069E-Iz; Thu, 19 Oct 2023 10:13:20 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtTlX-00068R-5e; Thu, 19 Oct 2023 10:12:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pZJgLc1J9XFVtvQCl7EAQE6tn3YnzFJSG0fxPMVdQQs=; b=QCMLzr/PX8uR Mv4L/HaVH2J7XAKIktqevTqaoks6u8XsjLLrrXiZMbWRAGk462B8ZjaxIj7+a5f84ZbcQXWELsXxP H4J4I4WCkDDJoBuYe3cWCOSBdRAS6Qgvi2SF6T+cPEJT2FbfjPf4wHLgY3CwApJppvIM/tBZl916c blehz3F4e3lSx9fj5/YBcVRcHMCQuxr5dTj4njEzOJ50G0eI23tDU/Fl2Lusg3FHgQp+6p/HTqfFh ankHz8lbmopRRokOjlI0MSgj5Is5d88dFKu8zHtF4pOL6xRfXovkc9bhf+SsynFmR58SrmiZ2P8w6 Qz+N3GRLl5RpElZXPTLeRA==; Date: Thu, 19 Oct 2023 17:12:39 +0300 Message-Id: <83fs26u2eg.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87a5sed99n.fsf@yandex.com> (message from Bogdan Ruslanovich Drozd on Thu, 19 Oct 2023 16:36:20 +0300) References: <87a5sed99n.fsf@yandex.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 66638 notabug thanks > From: Bogdan Ruslanovich Drozd > Date: Thu, 19 Oct 2023 16:36:20 +0300 > > How I found the bug: LaTeX previews were not displayed in Org mode > because the path where the file lies contains a symbolic link > (e.g. `/home/user/docs/org' directory where `/home/user/docs' is a > symbolic link to a directory). > > Bug description: `file-relative-name' (in `files.el') doesn't take into > account symbolic links. > > How to reproduce: > > 1. Run `mkdir -p ~/a_dir/org'. > > 2. Run `ln -s ~/a_dir/org ~/docs'. > > 3. Run `emacs -Q ~/docs/example.org'. > > 4. Insert into the file "$2+2=4$", press `C-c C-x C-l', and see that it > does not work. > > 5. Kill emacs. > > 6. Run `emacs -Q ~/a_dir/org/example.org'. > > 7. Insert into the file "$2+2=4$, press `C-c C-x C-l', and see LaTeX > preview. This is not a bug. If you want to resolve symlinks in a file name, use file-truename before calling file-relative-name. The latter is purely a syntactic function which merely analyzes its file name argument, and should not hit the disk. From unknown Tue Aug 19 10:03:22 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Bogdan Ruslanovich Drozd Subject: bug#66638: closed (Re: bug#66638: 29.1; `file-relative-name' and symbolic links) Message-ID: References: <87a5sed99n.fsf@yandex.com> X-Gnu-PR-Message: they-closed 66638 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Reply-To: 66638@debbugs.gnu.org Date: Fri, 22 Dec 2023 14:58:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1703257082-15520-1" This is a multi-part message in MIME format... ------------=_1703257082-15520-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #66638: 29.1; `file-relative-name' and symbolic links which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 66638@debbugs.gnu.org. --=20 66638: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D66638 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1703257082-15520-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 66638-done) by debbugs.gnu.org; 22 Dec 2023 14:57:39 +0000 Received: from localhost ([127.0.0.1]:47537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGgy3-00041b-EZ for submit@debbugs.gnu.org; Fri, 22 Dec 2023 09:57:39 -0500 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:42413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGgy1-00041M-W5 for 66638-done@debbugs.gnu.org; Fri, 22 Dec 2023 09:57:38 -0500 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-55359dc0290so3439619a12.1 for <66638-done@debbugs.gnu.org>; Fri, 22 Dec 2023 06:57:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703257048; x=1703861848; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=H5W8h8jAWROLoFjgFnpsmaSOQW3JnOYRTrlomVNDA+o=; b=QKo94kVNUmgCeqtJlIv5usHvjQHpGk5/MYdvCGXBtB+bQDVwwC4Z3t+D0peD4ZDKKT NWSueZYY+gMoTzAsViH2lEOcc5eamxarBhNEzJuf/ke3/2+p2UEYcw9+17XgIIQbRNuS mQShxIeiqr0GP5LlNEjbaDDTRQM0AG+bA/UUgCPjAoqRpCcjNSDQLcWLdvDtVpwNLmqP Sa6SKIU96r7ztG58AxYj3rB7MZGpcJIjuIpg8QqHxaQT6qb8DFyj614pD0Un1WWH+pf9 NusyUcR5snJRpkplRDt5ektUsoSmBjnQ7Z8vzmNSQ1Aqp7H0MhHaFb4N4AVtu0sdpZjQ yQMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703257048; x=1703861848; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=H5W8h8jAWROLoFjgFnpsmaSOQW3JnOYRTrlomVNDA+o=; b=B0eptgpHFOir/ZIdNEAOyioVmq9FXmW9AFUAQQV8boSj+hdnFVlPMgz0FOk/twsfXi hGVngak2plq8okCwfqhNZBPQVGxyY85150rzvDHyhDHu054D4suLSuBpCvTlF6wq7bFK nfIorq2stjiyD4teFF/VGXJcXljzSuPU41pQwvy4aliYyNOYvE/FsIz+e8IUC2aoLJ1t eP5Vp/glG9Ije8aGbeaT3u53Y+ukt9y9q9i0MQ6Y2cBABZJmyXzp8YR0fiD7sk8z+WDY DOtCcHHXUHzT6yhSJe36xgiY5TrcwfPB8HDl07Bpp+qX5RRuWgPug84R2ITOAdlDfqO+ aN+g== X-Gm-Message-State: AOJu0YwQ2DUFp+8fWxxvqegu4qa00DrsbvspRidwZZMgJY4B26JHmzEz 0iudvrTv+Iu1prksfONcXE7hXo8fx2ipZmJ3MgzPp20hdT7DbA== X-Google-Smtp-Source: AGHT+IEsc/IRKuTQw+R7zBcwZkopnAGzgcLVpj26u5fan1U3tpda2nLn2Fj6wJHwG7F27v7x2ehhnXvafCvx3RfQLc4= X-Received: by 2002:a05:6402:31f7:b0:553:451c:c047 with SMTP id dy23-20020a05640231f700b00553451cc047mr2435687edb.1.1703257047645; Fri, 22 Dec 2023 06:57:27 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 22 Dec 2023 06:57:27 -0800 From: Stefan Kangas In-Reply-To: <83fs26u2eg.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 19 Oct 2023 17:12:39 +0300") References: <87a5sed99n.fsf@yandex.com> <83fs26u2eg.fsf@gnu.org> MIME-Version: 1.0 Date: Fri, 22 Dec 2023 06:57:27 -0800 Message-ID: Subject: Re: bug#66638: 29.1; `file-relative-name' and symbolic links To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 66638-done Cc: 66638-done@debbugs.gnu.org, Bogdan Ruslanovich Drozd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: > tags 66638 notabug > thanks > >> From: Bogdan Ruslanovich Drozd >> Date: Thu, 19 Oct 2023 16:36:20 +0300 >> >> How I found the bug: LaTeX previews were not displayed in Org mode >> because the path where the file lies contains a symbolic link >> (e.g. `/home/user/docs/org' directory where `/home/user/docs' is a >> symbolic link to a directory). >> >> Bug description: `file-relative-name' (in `files.el') doesn't take into >> account symbolic links. >> >> How to reproduce: >> >> 1. Run `mkdir -p ~/a_dir/org'. >> >> 2. Run `ln -s ~/a_dir/org ~/docs'. >> >> 3. Run `emacs -Q ~/docs/example.org'. >> >> 4. Insert into the file "$2+2=4$", press `C-c C-x C-l', and see that it >> does not work. >> >> 5. Kill emacs. >> >> 6. Run `emacs -Q ~/a_dir/org/example.org'. >> >> 7. Insert into the file "$2+2=4$, press `C-c C-x C-l', and see LaTeX >> preview. > > This is not a bug. If you want to resolve symlinks in a file name, > use file-truename before calling file-relative-name. The latter is > purely a syntactic function which merely analyzes its file name > argument, and should not hit the disk. I'm therefore closing this bug report. ------------=_1703257082-15520-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Oct 2023 13:38:00 +0000 Received: from localhost ([127.0.0.1]:36114 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtTDr-0004ZC-83 for submit@debbugs.gnu.org; Thu, 19 Oct 2023 09:37:59 -0400 Received: from lists.gnu.org ([2001:470:142::17]:41574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qtTD7-0004Xw-Vt for submit@debbugs.gnu.org; Thu, 19 Oct 2023 09:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtTCW-0002hl-N9 for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 09:36:37 -0400 Received: from forward101b.mail.yandex.net ([178.154.239.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtTCS-0001e3-MN for bug-gnu-emacs@gnu.org; Thu, 19 Oct 2023 09:36:35 -0400 Received: from mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net [IPv6:2a02:6b8:c14:150a:0:640:1aa5:0]) by forward101b.mail.yandex.net (Yandex) with ESMTP id 7967060ABC for ; Thu, 19 Oct 2023 16:36:22 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id LamJJU6Wra60-AAzhnfl8; Thu, 19 Oct 2023 16:36:21 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1697722582; bh=Z/4qMCyBN9OxmdZIYgEk/UmmBfRhPUNKMBIMdNEwg00=; h=Message-ID:Date:Subject:To:From; b=ielrGwMaTAKwh19nmyaBsLW77s7DBg6SnRnshqucF05Mxb+DH9VigsQa+t0u5kdu2 0Ea+4+sooqmGrGnZGGbDr7hqYAHUj3o2DgyhBWElnB2BAGtUGeuLMVFhh23XSTE+lE thFO4zJ1DVimQBiSV1O2bhvoIZK9QfHj7E0wtZ3E= Authentication-Results: mail-nwsmtp-smtp-production-main-60.sas.yp-c.yandex.net; dkim=pass header.i=@yandex.com From: Bogdan Ruslanovich Drozd To: bug-gnu-emacs@gnu.org Subject: 29.1; `file-relative-name' and symbolic links Date: Thu, 19 Oct 2023 16:36:20 +0300 Message-ID: <87a5sed99n.fsf@yandex.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.154.239.148; envelope-from=bogdan.ruslanovich.drozd@yandex.com; helo=forward101b.mail.yandex.net X-Spam_score_int: 9 X-Spam_score: 0.9 X-Spam_bar: / X-Spam_report: (0.9 / 5.0 requ) AC_FROM_MANY_DOTS=2.999, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 3.0 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: How I found the bug: LaTeX previews were not displayed in Org mode because the path where the file lies contains a symbolic link (e.g. `/home/user/docs/org' directory where `/home/user/docs' is a symb [...] Content analysis details: (3.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (bogdan.ruslanovich.drozd[at]yandex.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 19 Oct 2023 09:37:58 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) How I found the bug: LaTeX previews were not displayed in Org mode because the path where the file lies contains a symbolic link (e.g. `/home/user/docs/org' directory where `/home/user/docs' is a symbolic link to a directory). Bug description: `file-relative-name' (in `files.el') doesn't take into account symbolic links. How to reproduce: 1. Run `mkdir -p ~/a_dir/org'. 2. Run `ln -s ~/a_dir/org ~/docs'. 3. Run `emacs -Q ~/docs/example.org'. 4. Insert into the file "$2+2=4$", press `C-c C-x C-l', and see that it does not work. 5. Kill emacs. 6. Run `emacs -Q ~/a_dir/org/example.org'. 7. Insert into the file "$2+2=4$, press `C-c C-x C-l', and see LaTeX preview. In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-09-30 built on localhost Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Gentoo Linux Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --disable-silent-rules --docdir=/usr/share/doc/emacs-29.1-r1 --htmldir=/usr/share/doc/emacs-29.1-r1/html --libdir=/usr/lib64 --program-suffix=-emacs-29 --includedir=/usr/include/emacs-29 --infodir=/usr/share/info/emacs-29 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --without-compress-install --without-hesiod --without-pop --with-file-notification=inotify --with-pdumper --enable-acl --with-dbus --with-modules --without-gameuser --with-libgmp --with-gpm --with-native-compilation=aot --with-json --without-kerberos --without-kerberos5 --with-lcms2 --with-xml2 --without-mailutils --without-selinux --with-sqlite3 --with-gnutls --with-libsystemd --with-threads --with-tree-sitter --without-wide-int --with-sound=alsa --with-zlib --with-x --without-pgtk --without-ns --without-gconf --without-gsettings --without-toolkit-scroll-bars --with-xpm --with-xft --with-cairo --with-harfbuzz --without-libotf --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-webp --with-imagemagick --with-dumping=pdumper 'CFLAGS=-O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LC_COLLATE: C.utf8 value of $LC_MONETARY: en_GB.utf8 value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix ------------=_1703257082-15520-1--