all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: kbrown@cornell.edu, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 0528a7c: Ensure that expand-file-name returns an absolute file name
Date: Tue, 09 Jul 2019 17:50:57 +0300	[thread overview]
Message-ID: <83sgrf5kj2.fsf@gnu.org> (raw)
In-Reply-To: <jwvtvbvanc4.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Mon, 08 Jul 2019 23:46:06 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: kbrown@cornell.edu,  emacs-devel@gnu.org
> Date: Mon, 08 Jul 2019 23:46:06 -0400
> 
> > In the bug discussion I explained why I thought this alternative was
> > better.
> 
> I didn't see it there.

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36502#46

> You mentioned that you preferred to avoid the inf-loop, but that
> doesn't mean you prefer for expand-file-name to use an arbitrary
> (hopefully) absolute file name as default default directory over
> signaling an error.

It isn't entirely arbitrary.  A relative file name can be interpreted
by taking some directory as cwd.  Is there a better candidate for that
than invocation-directory?  We cannot use "." and we cannot use nil in
this case, for obvious reasons.

> Signaling a clear error here would have helped the programmer find the
> real problem and fix it quickly, whereas the patch we installed caters
> to broken code, encouraging bad practices.

I think expand-file-name should try to avoid signaling an error as
much as possible, because it is called by many primitives and core
functions.  If we signal an error, we risk getting the users into a
situation where they cannot even shut down Emacs, let alone do
something less trivial.



  parent reply	other threads:[~2019-07-09 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190708223951.10291.7621@vcs0.savannah.gnu.org>
     [not found] ` <20190708223953.3172920BD5@vcs0.savannah.gnu.org>
2019-07-08 23:13   ` [Emacs-diffs] master 0528a7c: Ensure that expand-file-name returns an absolute file name Stefan Monnier
2019-07-09  2:35     ` Eli Zaretskii
2019-07-09  2:40       ` Daniel Sutton
2019-07-09  3:46       ` Stefan Monnier
2019-07-09 11:56         ` Ken Brown
2019-07-09 14:50         ` Eli Zaretskii [this message]
2019-07-09 15:25           ` Stefan Monnier
2019-07-09 16:07             ` Eli Zaretskii
2019-07-09 22:34     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83sgrf5kj2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kbrown@cornell.edu \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.