From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19865: tar-untar-buffer: should honor default-directory Date: Mon, 16 Feb 2015 21:49:14 +0200 Message-ID: <83twyltz5x.fsf@gnu.org> References: <87a90gd91b.fsf@violet.siamics.net> <83sie8wn8z.fsf@gnu.org> <831tlpvp35.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1424116225 15378 80.91.229.3 (16 Feb 2015 19:50:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Feb 2015 19:50:25 +0000 (UTC) Cc: ivan@siamics.net, 19865@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 16 20:50:13 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 1YNRgK-0000nx-Kc for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Feb 2015 20:50:13 +0100 Original-Received: from localhost ([::1]:41737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNRgJ-0005oR-SC for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Feb 2015 14:50:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNRgE-0005gi-Cz for bug-gnu-emacs@gnu.org; Mon, 16 Feb 2015 14:50:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNRgB-000204-89 for bug-gnu-emacs@gnu.org; Mon, 16 Feb 2015 14:50:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54393) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNRgA-0001zD-TV for bug-gnu-emacs@gnu.org; Mon, 16 Feb 2015 14:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YNRgA-0003WB-8p for bug-gnu-emacs@gnu.org; Mon, 16 Feb 2015 14:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Feb 2015 19:50: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.142411615913469 (code B ref 19865); Mon, 16 Feb 2015 19:50:02 +0000 Original-Received: (at 19865) by debbugs.gnu.org; 16 Feb 2015 19:49:19 +0000 Original-Received: from localhost ([127.0.0.1]:45633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YNRfT-0003VA-0R for submit@debbugs.gnu.org; Mon, 16 Feb 2015 14:49:19 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:54507) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YNRfP-0003Us-7Y for 19865@debbugs.gnu.org; Mon, 16 Feb 2015 14:49:17 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NJV00I00R0RJY00@a-mtaout21.012.net.il> for 19865@debbugs.gnu.org; Mon, 16 Feb 2015 21:49:08 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJV00I9NR1VI230@a-mtaout21.012.net.il>; Mon, 16 Feb 2015 21:49:08 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il 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:99478 Archived-At: > From: Stefan Monnier > Cc: ivan@siamics.net, 19865@debbugs.gnu.org > Date: Mon, 16 Feb 2015 14:34:02 -0500 > > > I can only re-iterate what I already said: we shouldn't cater to > > marginal use cases like that with code that is "tricky" (a.k.a. > > "maintenance headache"). People who change directories of their > > buffers should (and do) know what they are doing. If doing that > > causes them annoyances, they will know better next time. > > Hmm... so you're considering `M-x cd' as harmful? Not harmful, potentially dangerous, especially in buffers that have associated files, or where default-directory plays some other significant role. People who do that should "M-x cd" back before they invoke functions that use the value. It's the same as working in the shell: if you changed a directory, you need to go back before you operate on files, or risk operate on wrong files. > I agree that having to be careful in which buffer we are when we read > a given variable because it might be buffer-local is a source of > maintenance headaches, but we have that all over the place in Elisp, > and we don't really have any "better solution". 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. Doing so for such a weak reason is unwise, and no amount of cruft we have elsewhere can justify adding to that.