[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH v2] fix SETUPFILE pathname expansion with subdirectories

From: Kyle Meyer
Subject: Re: [O] [PATCH v2] fix SETUPFILE pathname expansion with subdirectories
Date: Sun, 20 Sep 2015 01:07:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Richard Hansen <address@hidden> writes:

> Should I use cd-absolute instead of setting default-directory
> directly?  It does some sanity checks (among other things) that seem
> worthwhile.

Looking at these checks, I don't think they are useful in this context,
and some change the intended behavior.

* One check makes sure the directory ends in a slash, but this will
  already be the case because your changes call file-name-directory.

* Another calls expand-file-name, but all these functions already expand
  the original file name upstream.

* Another signals an error if the directory doesn't exist, is not a
  directory, or isn't accessible.  All but one of these functions call
  org-file-contents with a non-nil NOERROR, so the intent is to message
  rather than raise an error when a file doesn't exist.
  (org--setup-collect-keywords is the one function that doesn't use
  org-file-contents, but it does check that the file is readable before
  calling insert-file-contents.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]