all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: larsi@gnus.org, stevey@google.com, 4041@debbugs.gnu.org
Subject: bug#4041: 23.0.92; Emacs 23: buffer point is no longer frame-local
Date: Sat, 08 Oct 2011 16:12:54 +0200	[thread overview]
Message-ID: <83wrcfefmh.fsf@gnu.org> (raw)
In-Reply-To: <4E904ED1.8090906@gmx.at>

> Date: Sat, 08 Oct 2011 15:23:29 +0200
> From: martin rudalics <rudalics@gmx.at>
> Cc: Lars Magne Ingebrigtsen <larsi@gnus.org>, 4041@debbugs.gnu.org
> 
> Having "two or more windows open to the same buffer" sounds like a
> reasonable condition.  The problem is that you might have no window
> showing the buffer and still want to restore the previous window
> position.  That's why `switch-to-prev-buffer' is superior to any
> `switch-to-buffer' changing solution.  Notwithstanding Lars' argument
> that people are used to C-x b, tell me why `switch-to-prev-buffer'
> (combined with `switch-to-next-buffer') doesn't do what you want.

It doesn't do what I want because it doesn't accept a buffer
argument.  So I'm forced to try the previous buffers one by one, in
the LIFO order, until I find the one I have in mind.  And if I then
want to go back to one of those I visited on the way, I need either
use switch-to-next-buffer (if I happen to remember how far "forward"
that buffer is) or make the full circle, including *scratch* and
*Messages*, before I get there.

So I don't think switch-to-next/prev-buffer can be a convenient
solution to this problem.

What is necessary is a way to switch to a buffer by name and have the
window remember its previous window-point.  If the buffer was never
displayed in this window, "C-x b" should choose some value of
window-point that was used before and is not already displayed in some
other window.  (If there's a window for every possible value of
window-point for the buffer, i.e. the user opens yet another window
with the same buffer, just choose one of the values, e.g., the first
or the last.)  For the important use case of having 2 windows with the
same buffer, this strategy will do _exactly_ what the user wants.

>  > The problem with today's "existing-window" behavior is that if you
>  > have window T displaying buffer B on frame F at buffer position P,
>  > then you can not sustain a *persistent* working location P' in any
>  > other window U on F.  By "persistent", I specifically mean that in
>  > window U, if I switch temporarily away to another buffer and then
>  > back, I want to go back to P'.  Today it takes me to P:   I have lost
>  > my working location in U.
> 
> Not with `switch-to-prev-buffer' ;-)

Yes, but it works satisfactorily only if you switch between 2 buffers
in the same window.  Switch to a third, and you are screwed.

(And, btw, why aren't those 2 functions documented in the user
manual?)





  reply	other threads:[~2011-10-08 14:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-05  0:17 bug#4041: 23.0.92; Emacs 23: buffer point is no longer frame-local Steve Yegge
2009-08-06  9:33 ` martin rudalics
2011-09-17  7:04 ` Lars Magne Ingebrigtsen
2011-09-17  8:43   ` martin rudalics
2011-09-18  8:03     ` Lars Magne Ingebrigtsen
2011-10-06 22:14     ` Lars Magne Ingebrigtsen
2011-10-07  7:07       ` martin rudalics
2011-10-07 10:46         ` Lars Magne Ingebrigtsen
2011-10-07 17:00           ` martin rudalics
2011-10-07 21:09             ` Steve Yegge
2011-10-08  6:23               ` Eli Zaretskii
2011-10-08  6:32                 ` Drew Adams
2011-10-08  6:23               ` Leo
2011-10-08 13:23               ` martin rudalics
2011-10-08 14:12                 ` Eli Zaretskii [this message]
2011-10-08 15:00                   ` martin rudalics
2011-10-08 15:34                     ` Eli Zaretskii
2011-10-08 15:55                       ` martin rudalics
2011-10-08 17:07                         ` Eli Zaretskii
2011-10-08 17:53                           ` martin rudalics
2011-10-08 20:35                             ` Eli Zaretskii
2011-10-09  8:33                               ` martin rudalics
2011-10-09 17:45                                 ` Eli Zaretskii
2011-10-10 12:57                                   ` martin rudalics
2011-10-11 12:45               ` Stefan Monnier
2011-10-12  0:35                 ` Steve Yegge
2011-10-12  1:19                   ` Stefan Monnier
2011-10-12  3:52                     ` Steve Yegge
2011-10-12  9:48                     ` martin rudalics
2011-10-12 13:11                       ` Stefan Monnier
2011-10-12 13:39                         ` Stefan Monnier
2011-10-12 14:25                           ` martin rudalics
2012-10-05 10:08                         ` martin rudalics
2012-10-10 10:22                           ` martin rudalics
2011-10-12  6:52                   ` martin rudalics

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=83wrcfefmh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=4041@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=rudalics@gmx.at \
    --cc=stevey@google.com \
    /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.