all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: ivan@siamics.net, 19865@debbugs.gnu.org
Subject: bug#19865: tar-untar-buffer: should honor default-directory
Date: Mon, 16 Feb 2015 14:34:02 -0500	[thread overview]
Message-ID: <jwv7fvh3bha.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <831tlpvp35.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 16 Feb 2015 17:43:58 +0200")

> 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?
I'm surprised, it looks like a perfectly normal command to me.
If we don't want normal users to use, we should at least
`disable-command' and/or rename it to something more verbose and
less attractive.

>> the command is executed by the user in one buffer, and it just so
>> happens that its implementation switches to some internal auxiliary
>> buffer.  The value of `default-directory' that should be used is the
>> one that the user knows about, not the one kept by the hidden buffer,
>> over which the user has no control.
> Are we still talking about the situation where a user did "M-x cd"?

Actually, no, I'm talking about how the code *should* behave from a simple
semantic correctness point of view.
This then appears in cases such as `M-x cd' indeed, but it might appear
in other cases I haven't thought about.

> If the former, then is there still a problem if the user refrains from
> "M-x cd"?

Until we decide to deprecate `M-x cd' I think this question is not
really relevant.

> Understood, but unintended results do not necessarily need fixes, just
> because they are unintended.  The important question is: what, if any,
> real problems are caused as unintended results?  We are discussing
> those problems, so the fact that they are unintended results doesn't
> seem important to me.

The patch he provides fixes the immediate problem, which in my book is
a plain bug (maybe for a "corner case", but still a plain bug), but in
terms of "disagrees with the docstring" and "disagrees with my mental
model of what is right".
Also the fix doesn't make the code more obscure or more complex.

Hence I still fail to see why you're opposing it.

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".


        Stefan





  reply	other threads:[~2015-02-16 19:34 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 [this message]
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
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=jwv7fvh3bha.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=19865@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=ivan@siamics.net \
    /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.