all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jefferson Carpenter <jefferson@aoeu2code.com>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: 37514 <37514@debbugs.gnu.org>
Subject: bug#37514: PATCH: Add setting to allow switching to an already-visible buffer by default
Date: Thu, 26 Sep 2019 19:13:08 +0000	[thread overview]
Message-ID: <16d6efdc8de.c1802a0599163.8459852292203240965@aoeu2code.com> (raw)
In-Reply-To: <83d0fnmsyw.fsf@gnu.org>

---- On Thu, 26 Sep 2019 07:12:23 +0000 Eli Zaretskii <eliz@gnu.org> wrote ----

 >  
 > Why is it important what "C-x b" offers as the default?  You can still 
 > type the name of the buffer you want and switch to it. 

Because it requires fewer key strokes.

 >  
 > FWIW, I use the workflow you mention from time to time, and I never 
 > felt the need for such an option, because its effect will be global on 
 > the entire session, and I don't want it everywhere.  I'd need to reset 
 > such an option when I go back to the other workflows, which would be a 
 > nuisance. 

 >  
 > And if the above is somehow still not satisfactory, you can always 
 > write a trivial wrapper around switch-to-buffer, which behaves the way 
 > you like.  Why do we need to canonicalize this in Emacs? 

Because IMHO, emacs (and any software) should do as little as possible by default, or at least easily allow itself to be configured to do as little as possible.  I think it makes the most sense that switch-to-buffer takes you back to the last buffer you were visiting by default, without doing the extra work of preferring buffers that are not currently visible.


---- On Thu, 26 Sep 2019 07:20:53 +0000 martin rudalics <rudalics@gmx.at> wrote ----

 >  
 > Wouldn't 'quit-window' accomplish that without any prompting?  Or 
 > 'switch-to-prev-buffer'? 
 >  
 > Thanks, martin 
 > 

No, quit-window buries the buffer that you leave, even though it switches directly to the previous buffer on the top of the buffer list, and so it cannot be used to alternate back and fourth.  Switch-to-prev-buffer seems to do the same thing - executing it twice does not return you to the buffer you started at.  Besides, using these functions would require adding an extra key in addition to 'C-x b', and keys are at a premium.






  reply	other threads:[~2019-09-26 19:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25 21:24 bug#37514: PATCH: Add setting to allow switching to an already-visible buffer by default Jefferson Carpenter
2019-09-26  7:12 ` Eli Zaretskii
2019-09-26 19:13   ` Jefferson Carpenter [this message]
2019-09-26 19:14     ` Jefferson Carpenter
2019-09-27  8:16     ` martin rudalics
2019-09-28 21:00       ` Jefferson Carpenter
2019-10-02  3:36         ` Jefferson Carpenter
2019-10-02  8:54           ` martin rudalics
2019-10-04  0:45             ` Jefferson Carpenter
2019-10-05  8:42               ` martin rudalics
2019-10-05  9:30                 ` Eli Zaretskii
2020-01-20 19:35             ` Stefan Kangas
2020-03-18  5:36               ` Stefan Kangas
2019-10-07  4:25       ` Lars Ingebrigtsen
2019-10-07  9:26         ` martin rudalics
2019-10-07 18:09           ` Juri Linkov
2019-10-08  8:45             ` martin rudalics
2019-10-09 18:48               ` Juri Linkov
2019-10-12 20:47                 ` Juri Linkov
2019-10-13  8:17                   ` martin rudalics
2019-10-08 16:32             ` Lars Ingebrigtsen
2019-10-09 20:50               ` Juri Linkov
2019-10-09 20:59                 ` Lars Ingebrigtsen
2019-10-11  8:16                   ` martin rudalics
2019-10-07 12:04         ` Robert Pluim
2019-10-08  8:42           ` martin rudalics
2019-10-08 11:42             ` Robert Pluim
2019-09-26  7:20 ` 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=16d6efdc8de.c1802a0599163.8459852292203240965@aoeu2code.com \
    --to=jefferson@aoeu2code.com \
    --cc=37514@debbugs.gnu.org \
    --cc=eliz@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.