* default-directory safe file local variable but no check for same if file-exists-p @ 2009-06-05 0:20 MON KEY 2009-06-05 14:31 ` Stefan Monnier 0 siblings, 1 reply; 4+ messages in thread From: MON KEY @ 2009-06-05 0:20 UTC (permalink / raw) To: emacs-devel `default-directory' can be marked a safe file local variable if it satisfies the stringp predicate. Does this not allow failure in unsafe ways when (not file-exists-p) is non-nil for same? - what gives? s_P ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: default-directory safe file local variable but no check for same if file-exists-p 2009-06-05 0:20 default-directory safe file local variable but no check for same if file-exists-p MON KEY @ 2009-06-05 14:31 ` Stefan Monnier 2009-06-05 15:50 ` MON KEY 0 siblings, 1 reply; 4+ messages in thread From: Stefan Monnier @ 2009-06-05 14:31 UTC (permalink / raw) To: MON KEY; +Cc: emacs-devel > Does this not allow failure in unsafe ways when (not file-exists-p) is > non-nil for same? It shouldn't. Even under normal circumstances, default-directory may point to a non-existing directory (e.g. because it existed when the buffer was created, but has been removed in the mean time). Stefan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: default-directory safe file local variable but no check for same if file-exists-p 2009-06-05 14:31 ` Stefan Monnier @ 2009-06-05 15:50 ` MON KEY 2009-06-05 19:35 ` Davis Herring 0 siblings, 1 reply; 4+ messages in thread From: MON KEY @ 2009-06-05 15:50 UTC (permalink / raw) To: Stefan Monnier; +Cc: emacs-devel On Fri, Jun 5, 2009 at 10:31 AM, Stefan Monnier<monnier@iro.umontreal.ca> wrote: > It shouldn't. Even under normal circumstances, default-directory may > point to a non-existing directory (e.g. because it existed when the > buffer was created, but has been removed in the mean time). Ok. Thank you. That makes sense. I'm sure this is all very well thought out, and I apologize if this comes across as foolish, but out of curiosity does this account for procedures such as `process-file', `call-process', `start-process', `start-file-process' etc. which base their file-handlers on the `default-directory' value? e.g. the default-directory doesn't exist at buffer creation, a sub-process (synchronous or otherwise) comes along, attempts to take residence in default directory, and not finding a 'there' there, proceeds to build himself a new home. s_P ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: default-directory safe file local variable but no check for same if file-exists-p 2009-06-05 15:50 ` MON KEY @ 2009-06-05 19:35 ` Davis Herring 0 siblings, 0 replies; 4+ messages in thread From: Davis Herring @ 2009-06-05 19:35 UTC (permalink / raw) To: MON KEY; +Cc: Stefan Monnier, emacs-devel > I'm sure this is all very well thought out, and I apologize if this > comes across as foolish, but out of curiosity does this account for > procedures such as `process-file', `call-process', `start-process', > `start-file-process' etc. which base their file-handlers on the > `default-directory' value? My thought on this subject is that values of `default-directory' that involve Tramp might be a problem, although I'm not sure how to exploit being able to have someone SSH somewhere or become root on their own machine. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-05 19:35 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-06-05 0:20 default-directory safe file local variable but no check for same if file-exists-p MON KEY 2009-06-05 14:31 ` Stefan Monnier 2009-06-05 15:50 ` MON KEY 2009-06-05 19:35 ` Davis Herring
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.