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

From: Eli Zaretskii <[email-masked]>
Date: Tue, 17 Feb 2015 05:37:23 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked], [email-masked]
> 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.