all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: Shell commands in deleted directories
Date: Mon, 14 Feb 2011 09:00:05 -0600	[thread overview]
Message-ID: <87aahyveyy.fsf@lifelogs.com> (raw)
In-Reply-To: 87sjvrfv3v.fsf@gmail.com

On Sun, 13 Feb 2011 23:05:56 +0100 Antoine Levitt <antoine.levitt@gmail.com> wrote: 

AL> 13/02/11 22:34, Ted Zlatanov
>> On Sun, 13 Feb 2011 22:21:38 +0100 Antoine Levitt <antoine.levitt@gmail.com> wrote: 
>> 
AL> 13/02/11 22:07, Paul Eggert
>>>> On 02/13/2011 01:02 PM, Antoine Levitt wrote:
>>>>> +	/* If current_dir is unreachable (typically, does not exist), use
>>>>> +	   ~/ as default */
>>>> 
>>>> This looks like a bad idea.  Suppose I run the shell
>>>> command "rm *" in a deleted directory?
>>>> The change would cause me to remove files in
>>>> my home directory.  Better safe than sorry.
>> 
AL> Mmh, true. But then again, if you're using "rm *" as a shell command
AL> without being absolutely sure where you are, you're just asking for
AL> trouble.
>> 
>> I am strongly against this kind of surprise and hope it doesn't go into
>> Emacs.

AL> I wasn't suggesting it be merged after the objection Paul raised (see
AL> the other half of my post).

I agreed with you :)

AL> In the end, it's probably better to be handled by the user or by
AL> error-catching from calling code. Maybe there should be some kind of
AL> checks when creating new buffers though? Like if a new buffer is
AL> created that isn't associated with a file, then if its pwd doesn't
AL> exist, it's reset to ~/?

There are many situations where this solution would be a problem.  I
don't know if there is a good solution that doesn't involve lots of
error-catching at some level.

Ted




  reply	other threads:[~2011-02-14 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-13 21:02 Shell commands in deleted directories Antoine Levitt
2011-02-13 21:07 ` Paul Eggert
2011-02-13 21:21   ` Antoine Levitt
2011-02-13 21:34     ` Ted Zlatanov
2011-02-13 22:05       ` Antoine Levitt
2011-02-14 15:00         ` Ted Zlatanov [this message]
2011-02-13 21:13 ` Eli Zaretskii
2011-02-13 21:16   ` Antoine Levitt
2011-02-14 18:30 ` Stefan Monnier

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=87aahyveyy.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@gnu.org \
    /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.