all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ivan Shmakov <ivan@siamics.net>
To: 19865@debbugs.gnu.org
Subject: bug#19865: tar-untar-buffer: should honor default-directory
Date: Tue, 17 Feb 2015 18:05:49 +0000	[thread overview]
Message-ID: <87oaos8lc2.fsf@violet.siamics.net> (raw)
In-Reply-To: <83egpo7d87.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 17 Feb 2015 17:46:16 +0200")

>>>>> Eli Zaretskii <eliz@gnu.org> writes:
>>>>> From: Ivan Shmakov  Date: Tue, 17 Feb 2015 05:25:47 +0000

[…]

 > Emacs maintenance shouldn't pay a price for marginal use cases for
 > which simple workarounds (like "M-x cd BACK") are available.

	It is not a workaround for the problem in question.

[…]

 >> We’re using with-current-buffer there for the sole reason that
 >> write-region operates strictly on the current buffer.  It is so
 >> without this change, and it remains so with it; the change maintains
 >> this status quo just perfectly.  And as long as such use /is/
 >> acceptable in the current code, I fail to see why it wouldn’t be in
 >> the replacement being discussed.

 > I already explained that, more than once:

	And I’ve already provided an example where default-directory is
	changed by Emacs behind the back of the user.

 > the change is obscure,

	Yet it makes the code /less/ obscure that it currently is.

 > and is made for the sake of a marginal use case,

	It is made for the sake of consistency with the rest of the
	tar-mode.el code.  And sure: it fixes that marginal use case at
	the same time, too.

 > where the user should have returned to the original directory from
 > which she cd'ed, to avoid the problem.

	The use of M-x cd on a buffer does not influence the behavior of
	tar-untar-buffer for that same buffer in any way.  When it
	thinks – for whatever reason – that it should use
	/that/directory as its target, – it’s stuck that way, and no
	sensible user action is going to change its twisted mind.
	(Incidentally, this is the very description of this bug.)

	There’s simply /no/ problem which the user could solve by
	changing the value of default-directory – whether back, forth,
	or sideways.

 >> What /is/ changed is that with-current-buffer will now go
 >> immediately before write-region:

 >> (with-current-buffer data-buffer (write-region …))

 >> Cf. the former:

 >> (with-current-buffer data-buffer … lots of code to make sure the
 >> reader’s lost… (write-region …))

[…]

 > Now put yourself in the shoes of someone who needs to review this
 > change many moons from now, and try to imagine how "easy" it will be
 > for them to understand what the heck was that all about.

	Whose shoes do you think I was in while I’ve investigated this
	issue?  My first thought: why on Earth does with-current-buffer
	wraps some 18 LoC while it’s needed for exactly a single one?

	As for the “many moons” part, I think I’d request a re-review
	after a few.  Hopefully someone’d provide some more convincing
	arguments by then, since I’m pretty much out of ink right now.

	(And TIA to that party, sure.)

[…]

-- 
FSF associate member #7257  tar-mode.el does nasty things 3013 B6A0 230E 334A





  reply	other threads:[~2015-02-17 18:05 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-14 11:31 bug#19865: tar-untar-buffer: should honor default-directory Ivan Shmakov
2015-02-14 12:16 ` Eli Zaretskii
2015-02-14 12:27   ` Ivan Shmakov
2015-02-14 12:40     ` Eli Zaretskii
2015-02-14 12:47       ` Ivan Shmakov
2015-02-14 13:22         ` Eli Zaretskii
2015-02-14 13:34           ` Ivan Shmakov
2015-02-14 14:56             ` Eli Zaretskii
2015-02-14 15:16               ` Ivan Shmakov
2015-02-14 14:49 ` Stefan Monnier
2015-02-14 15:01   ` Eli Zaretskii
2015-02-16  1:43     ` Stefan Monnier
2015-02-16 15:43       ` Eli Zaretskii
2015-02-16 19:34         ` Stefan Monnier
2015-02-16 19:49           ` Eli Zaretskii
2015-02-16 23:40             ` Stefan Monnier
2015-02-17  3:37               ` Eli Zaretskii
2015-02-18  3:38                 ` Stefan Monnier
2015-02-17 17:03               ` Wolfgang Jenkner
2015-02-17 18:02                 ` Eli Zaretskii
2015-02-17  5:25             ` Ivan Shmakov
2015-02-17 15:46               ` Eli Zaretskii
2015-02-17 18:05                 ` Ivan Shmakov [this message]
2015-02-14 15:07   ` Ivan Shmakov
2015-02-14 16:27     ` Ivan Shmakov
2015-02-16  1:48       ` Stefan Monnier
2015-02-16  5:24         ` Ivan Shmakov
2015-02-16  7:45           ` Stefan Monnier
2015-02-16  8:55             ` Ivan Shmakov
2015-02-16 14:58               ` Stefan Monnier
2016-02-23 11:04           ` Lars Ingebrigtsen
2019-06-25 17:55             ` Lars Ingebrigtsen
2015-02-14 15:57 ` Ivan Shmakov
2015-02-14 16:56   ` Eli Zaretskii
2015-02-14 17:32     ` Ivan Shmakov
2015-02-14 17:44       ` Eli Zaretskii
2015-02-14 18:12         ` Ivan Shmakov
2015-02-14 18:37           ` Eli Zaretskii
2015-02-14 19:12             ` Ivan Shmakov
2015-02-14 19:28               ` Eli Zaretskii
2015-02-14 19:42                 ` Ivan Shmakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oaos8lc2.fsf@violet.siamics.net \
    --to=ivan@siamics.net \
    --cc=19865@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.