From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ivan Shmakov Newsgroups: gmane.emacs.bugs Subject: bug#19865: tar-untar-buffer: should honor default-directory Date: Sat, 14 Feb 2015 12:27:45 +0000 Message-ID: <8761b4d6f2.fsf@violet.siamics.net> References: <87a90gd91b.fsf@violet.siamics.net> <834mqoy9h8.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1423916907 5669 80.91.229.3 (14 Feb 2015 12:28:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2015 12:28:27 +0000 (UTC) To: 19865@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 14 13:28:17 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMbpY-0005pK-NL for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 13:28:16 +0100 Original-Received: from localhost ([::1]:59566 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMbpY-0006Gg-1E for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Feb 2015 07:28:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMbpS-0006DK-44 for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 07:28:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMbpL-0007F9-QU for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 07:28:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMbpK-0007Er-LX for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 07:28:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YMbpK-0004ZP-6P for bug-gnu-emacs@gnu.org; Sat, 14 Feb 2015 07:28:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ivan Shmakov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Feb 2015 12:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19865 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 19865-submit@debbugs.gnu.org id=B19865.142391687717557 (code B ref 19865); Sat, 14 Feb 2015 12:28:02 +0000 Original-Received: (at 19865) by debbugs.gnu.org; 14 Feb 2015 12:27:57 +0000 Original-Received: from localhost ([127.0.0.1]:42762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMbpF-0004Z6-1I for submit@debbugs.gnu.org; Sat, 14 Feb 2015 07:27:57 -0500 Original-Received: from fely.am-1.org ([78.47.74.50]:43751) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YMbpC-0004Yw-O5 for 19865@debbugs.gnu.org; Sat, 14 Feb 2015 07:27:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=4LWkKcBj+rLOkYMH2dx2Pqa+adQUYoX7kLqB7d1S4ho=; b=OwSjFlbU0PHPO8vsRMwwp35l+7c91YT7s6xj3afvEptqJ1dinGOrjiUxAyqKl71HDztyy4dR3mrvNUvnyBORSR21sc4OOHudstLdEn2qtqEGs1F3jp3gHVHPPOj95LIsxeJYt0RC5ikLgGLp7marMLIJXO0N3NTFQ7+IIZm5OvU=; Original-Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YMbpA-0001hI-G2 for 19865@debbugs.gnu.org; Sat, 14 Feb 2015 12:27:52 +0000 Original-Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YMbp3-0001m3-Sj for 19865@debbugs.gnu.org; Sat, 14 Feb 2015 19:27:45 +0700 Mail-Followup-To: 19865@debbugs.gnu.org In-Reply-To: <834mqoy9h8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Feb 2015 14:16:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99374 Archived-At: >>>>> Eli Zaretskii writes: [=E2=80=A6] > 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=E2=80=99s value for that same variable doesn=E2=80=99t 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. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A