[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19865: tar-untar-buffer: should honor default-directory
From: |
Ivan Shmakov |
Subject: |
bug#19865: tar-untar-buffer: should honor default-directory |
Date: |
Sat, 14 Feb 2015 12:27:45 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
>>>>> Eli Zaretskii <eliz@gnu.org> writes:
[…]
> The doc string of tar-untar-buffer says:
> "Extract all archive members in the tar-file into the current
> directory."
> which seems to match what it does. Why isn't default-directory of
> tar-data-buffer the right choice for doing that?
Because the default-directory of the tar-mode buffer may be
changed by the user (with M-x cd or otherwise) with the intent
of directing tar-untar-buffer to extract the archive members
into an arbitrary directory, per its docstring.
Which fails, as the tar-data-buffer’s value for that same
variable doesn’t get changed at that point.
Another solution is to wrap with-current-buffer just around
write-region, so that the rest of the code will still be
evaluated with the tar-mode buffer being current.
--
FSF associate member #7257 http://boycottsystemd.org/ … 3013 B6A0 230E 334A
- bug#19865: tar-untar-buffer: should honor default-directory, Ivan Shmakov, 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,
Ivan Shmakov <=
- bug#19865: tar-untar-buffer: should honor default-directory, Eli Zaretskii, 2015/02/14
- bug#19865: tar-untar-buffer: should honor default-directory, Ivan Shmakov, 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, Ivan Shmakov, 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, Ivan Shmakov, 2015/02/14
bug#19865: tar-untar-buffer: should honor default-directory, Stefan Monnier, 2015/02/14