GNU bug report logs -
#77666
Question/discussion about `trusted-content'
Previous Next
Full log
Message #14 received at 77666 <at> debbugs.gnu.org (full text, mbox):
> From: Dominik Schrempf <dominik.schrempf <at> gmail.com>
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 77666 <at> debbugs.gnu.org
> Date: Wed, 09 Apr 2025 16:22:58 +0200
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> Use abbreviated file names. For example, an entry "~/mycode/" means
> >> that Emacs will trust all the files in your directory "mycode".
> >>
> >> Why is this second requirement in place?
> >
> > For speed, I believe. (But Stefan will correct me if I'm wrong.)
>
> Do you mean comparing "/home/user/mycode" is slower than comparing
> "~/mycode/"?
No, but comparing "~/mycode" with "/home/user/mycode" is slower, if we
want them to compare equal.
> > HOME-relative file names are considered absolute file names in Emacs:
> >
> > (file-name-absolute-p "~/.emacs.d/")
> > => t
>
> Thank you, I didn't know that. Does this make sense? The file will be
> different for two different users, which is not the case for absolute
> file names in the classical sense.
There's only one user in a given Emacs session.
Outside of Emacs, these will be different file names, but since Emacs
always records the abbreviated name, it will become ~/something only
for the user of the current Emacs session; file names relative to HOME
of other users will remain in their absolute form.
> > Emacs always abbreviates HOME-relative file names, so adhering to that
> > convention means we can compare file names as strings, instead of
> > using file-truename (which hits the disk) and similar APIs to
> > "normalize" the file names before comparing.
>
> Thanks for your explanation.
>
> I believe that by now, we are having a discussion about two different
> but somewhat related concepts: "absolute" vs "relative" filenames and
> the "true" vs "real" filenames.
>
> I still wanted to state that the term "true filename" confused me and is
> still confusing me. I think it should be "real", at least to me this
> seems more of a Linux/Unix? standard.
Emacs predates realpath and friends, so we had this terminology first,
and we cannot change it now, since it's so old.
This bug report was last modified 123 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.