emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] Getting rid of selected_window


From: Eli Zaretskii
Subject: Re: [RFC] Getting rid of selected_window
Date: Fri, 29 Nov 2013 21:42:35 +0200

> From: Stefan Monnier <address@hidden>
> Cc: Dmitry Antipov <address@hidden>,  address@hidden
> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]