bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#19865: tar-untar-buffer: should honor default-directory


From: Eli Zaretskii
Subject: bug#19865: tar-untar-buffer: should honor default-directory
Date: Tue, 17 Feb 2015 05:37:23 +0200

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: ivan@siamics.net, 19865@debbugs.gnu.org
> Date: Mon, 16 Feb 2015 18:40:51 -0500
> 
> > if you changed a directory, you need to go back before you operate on
> > files, or risk operate on wrong files.
> 
> No: I changed directory specifically because I wanted to operate on
> other files.  And I often don't go back.

Then your next delete command will probably delete wrong files.

> > I don't really see a problem here that needs a solution.  A year from
> > now no one will remember or understand why we use with-current-buffer
> > in that place.
> 
> The comment explains why and the comment will still be there a year
> from now.

Comments cannot be a replacement for clear, self-explanatory code that
has no hidden dependencies.

> The code takes a file name from one buffer and uses it in another
> buffer: every time we do it, we have to be extra careful to make sure
> the file name is absolute, and that's what the patch does.

If both buffers has the same default-directory, as they should,
there's no need to do anything special.





reply via email to

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