[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19865: tar-untar-buffer: should honor default-directory
From: |
Stefan Monnier |
Subject: |
bug#19865: tar-untar-buffer: should honor default-directory |
Date: |
Tue, 17 Feb 2015 22:38:05 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>> 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.
No: it would delete the wrong file if I had *not* changed directory.
> Comments cannot be a replacement for clear, self-explanatory code that
> has no hidden dependencies.
Of course, but in the case under discussion there is such a dependency,
and we're just considering two different versions of the code, both of
which have the exact same hidden dependency.
IOW this situation sucks, but the patch is not the cause of it and
doesn't make it worse (it makes it marginally better by adding
a comment and by making the behavior right).
>> 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.
Right: *as they should*. But there's no mechanism to keep them in sync.
So the next best thing is to make sure we only use the default-directory
from the proper buffer.
> To solve this problem, I proposed, in the beginning of this thread, to
> allow the user to specify a directory where to extract the tarball, by
> invoking the command with a prefix argument.
Your proposal is fine, but is orthogonal to the patch proposed by Ivan.
Stefan
- bug#19865: tar-untar-buffer: should honor default-directory, (continued)
bug#19865: tar-untar-buffer: should honor default-directory, Stefan Monnier, 2015/02/14
- bug#19865: tar-untar-buffer: should honor default-directory, Eli Zaretskii, 2015/02/14
- bug#19865: tar-untar-buffer: should honor default-directory, Stefan Monnier, 2015/02/15
- bug#19865: tar-untar-buffer: should honor default-directory, Eli Zaretskii, 2015/02/16
- bug#19865: tar-untar-buffer: should honor default-directory, Stefan Monnier, 2015/02/16
- bug#19865: tar-untar-buffer: should honor default-directory, Eli Zaretskii, 2015/02/16
- bug#19865: tar-untar-buffer: should honor default-directory, Stefan Monnier, 2015/02/16
- bug#19865: tar-untar-buffer: should honor default-directory, Eli Zaretskii, 2015/02/16
- bug#19865: tar-untar-buffer: should honor default-directory,
Stefan Monnier <=
- bug#19865: tar-untar-buffer: should honor default-directory, Wolfgang Jenkner, 2015/02/17
- bug#19865: tar-untar-buffer: should honor default-directory, Eli Zaretskii, 2015/02/17
bug#19865: tar-untar-buffer: should honor default-directory, Ivan Shmakov, 2015/02/17
bug#19865: tar-untar-buffer: should honor default-directory, Eli Zaretskii, 2015/02/17
bug#19865: tar-untar-buffer: should honor default-directory, Ivan Shmakov, 2015/02/17
bug#19865: tar-untar-buffer: should honor default-directory, Ivan Shmakov, 2015/02/14