GNU bug report logs -
#19865
tar-untar-buffer: should honor default-directory
Previous Next
Reported by: Ivan Shmakov <ivan <at> siamics.net>
Date: Sat, 14 Feb 2015 11:32:01 UTC
Severity: minor
Tags: fixed, patch
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #101 received at 19865 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
> Cc: ivan <at> siamics.net, 19865 <at> 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.
This bug report was last modified 5 years and 331 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.