unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: dmantipov@yandex.ru, emacs-devel@gnu.org
Subject: Re: [RFC] Getting rid of selected_window
Date: Fri, 29 Nov 2013 21:42:35 +0200	[thread overview]
Message-ID: <837gbr6llg.fsf@gnu.org> (raw)
In-Reply-To: <jwvk3frcg3q.fsf-monnier+emacs@gnu.org>

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Dmitry Antipov <dmantipov@yandex.ru>,  emacs-devel@gnu.org
> Date: Fri, 29 Nov 2013 11:54:13 -0500
> 
> > What for?  I don't think you can get rid of the need to synchronize
> > those, because of features like focus redirection and minibuffer-only
> > frames.
> 
> AFAIK these don't interact at all.  IOW they're unrelated.

Sorry, I'm unconvinced.

> > So now we have SELECTED_BUFFER and current_buffer, which are
> > different in unspecified ways.
> 
> Yes, we now have it, and this patch won't change that, other than giving
> a name to the concept of "selected buffer".

But that's exactly the problem: that we now give a catchy name to that
other thing.  As long as it is unnamed, the chances of it being used
by uninitiated are slim.  But once you name it, it's very easy to
become confused between them, and use the wrong one.

> > What do you think is the probability that someone will use the wrong
> > one of that pair?  I think it's 100%.
> 
> That's already a risk and such errors already happen.

See above: I don't think so.


> This said, I think that instead of selected_buffer, we should use
> the name selected_window_buffer, to make things more clear.

I suggest buffer_of_selected_window, if we must name this thing.  I'd
prefer to leave it without a name.



  reply	other threads:[~2013-11-29 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 11:53 [RFC] Getting rid of selected_window Dmitry Antipov
2013-11-29 14:38 ` Stefan Monnier
2013-11-29 15:19 ` Eli Zaretskii
2013-11-29 16:54   ` Stefan Monnier
2013-11-29 19:42     ` Eli Zaretskii [this message]
2013-12-02 14:37       ` Dmitry Antipov
2013-12-02 15:06         ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=837gbr6llg.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=dmantipov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).