unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 21505@debbugs.gnu.org, travis.hoppe@gmail.com,
	monnier@iro.umontreal.ca, tsdh@gnu.org
Subject: bug#21505: 24.4; Buffer order
Date: Sun, 20 Feb 2022 15:20:27 +0200	[thread overview]
Message-ID: <83y225wu78.fsf@gnu.org> (raw)
In-Reply-To: <87v8x9u25c.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun,  20 Feb 2022 13:57:03 +0100)

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Tassilo Horn <tsdh@gnu.org>,  Eli Zaretskii <eliz@gnu.org>,
>   travis.hoppe@gmail.com,  21505@debbugs.gnu.org
> Date: Sun, 20 Feb 2022 13:57:03 +0100
> 
> But I'm wondering -- why is Emacs popping up a *Buffer List* window when
> you ask it to open two files?

It doesn't.  It only shows *Buffer List* when you as it to visit 3 or
more files.  This is explicitly coded in command-line-1:

    ;; Display the first two buffers in `displayable-buffers'.  If
    ;; `initial-buffer-choice' is non-nil, its buffer will be the
    ;; first buffer in `displayable-buffers'.  The first buffer will
    ;; be focused.
    (let ((displayable-buffers-len (length displayable-buffers))
          ;; `nondisplayed-buffers-p' is true if there exist buffers
          ;; in `displayable-buffers' that were not displayed to the
          ;; user.
          (nondisplayed-buffers-p nil))
      (when (> displayable-buffers-len 0)
        (switch-to-buffer (car displayable-buffers)))
      (when (> displayable-buffers-len 1)
        (switch-to-buffer-other-window (car (cdr displayable-buffers)))
        ;; Focus on the first buffer.
        (other-window -1))
      (when (> displayable-buffers-len 2)  <<<<<<<<<<<<<<<<<<<<<<<<<<<<
        (setq nondisplayed-buffers-p t))

> I'd have thought the obvious thing to do in this situation is to
> open as many windows as there are files (if possible)?

I guess the rationale is that with too many files visited we cannot be
sure which of them the user would like to see first, and we don't want
to show them all, lest the windows become too small.

> Or open a single window displaying the first file specified
> (and then have the rest be in the next-buffer order you describe).

That'd be less useful than what we do now with 2 files, IMO.





  reply	other threads:[~2022-02-20 13:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17  2:57 bug#21505: 24.4; Buffer order hoppe
2015-09-17  5:17 ` Eli Zaretskii
2015-09-17  6:49   ` Tassilo Horn
2015-09-17  6:56     ` Eli Zaretskii
2015-09-17  7:53       ` Tassilo Horn
2015-09-17 12:50         ` Stefan Monnier
2015-09-17 14:55           ` Eli Zaretskii
2015-09-17 14:59             ` hoppe
2015-09-17 15:19               ` Eli Zaretskii
2015-09-17 15:23                 ` hoppe
2015-09-17 15:44                   ` Eli Zaretskii
2015-09-17 15:48                     ` hoppe
2015-09-17 16:20                       ` Eli Zaretskii
2022-02-20 12:57           ` Lars Ingebrigtsen
2022-02-20 13:20             ` Eli Zaretskii [this message]
2022-02-21 13:38               ` Lars Ingebrigtsen
2022-02-21 13:55                 ` Eli Zaretskii
2022-02-21 14:43                   ` Lars Ingebrigtsen

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=83y225wu78.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=21505@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=travis.hoppe@gmail.com \
    --cc=tsdh@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 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).