unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@linkov.net>
Cc: 37667@debbugs.gnu.org
Subject: bug#37667: 27.0.50; Tab Bar display problems with more than 5 tabs
Date: Tue, 15 Oct 2019 12:09:12 +0300	[thread overview]
Message-ID: <83h84agytj.fsf@gnu.org> (raw)
In-Reply-To: <87lftnqbmg.fsf@mail.linkov.net> (message from Juri Linkov on Tue, 15 Oct 2019 00:47:51 +0300)

> From: Juri Linkov <juri@linkov.net>
> Cc: 37667@debbugs.gnu.org
> Date: Tue, 15 Oct 2019 00:47:51 +0300
> 
> >> >> 2. Disable wrapping to the second line since it's not supported in -nw;
> >> >
> >> > Why isn't it supported on TTY frames, btw?  It seemed to me that the
> >> > infrastructure is there, i.e. we can have FRAME_TAB_BAR_LINES(f) > 1,
> >> > it's just that the code doesn't consider this possibility.
> >>
> >> Is it possible for TTY frames to use the same code that implements
> >> wrapping in multi-line tab-bar on graphical displays?
> >
> > I don't think I understand the question.  Which details of wrapping
> > multi-line tab bars seem to prevent doing the same on TTY frames?
> 
> I meant using the existing function tab_bar_height whose value increases
> FRAME_TAB_BAR_LINES, but TTY doesn't use FRAME_TAB_BAR_LINES.

tab_bar_height calls display_tab_bar_line, which is not used on TTY
frames.  We could make display_tab_bar_line work on TTY frames, but
then the question becomes why have a separate display_tab_bar function
for TTY frames instead of making redisplay_tab_bar support TTY frames
as well.

IOW, refactoring the code to have just one set of functions for both
types of frames would make sense, but we should refactor all of it,
not just a single function.

> >> 5. There is another alternative: display arrow buttons on both sides
> >>    of the tab-bar, clicking on arrows will hscroll tabs.
> >
> > On GUI frames, you get this for free by using the hscrolling machinery
> > and line truncation.
> 
> What is needed to enable it?

Add hscrolling support for pseudo-windows, I think.  It could start
with a specialized function to hscroll just the tab-bar, then the code
could just start displaying the tab-bar window starting at a button
that is not necessarily the first one.

> Does hscrolling depend on the position of point so point should be
> moved to the current tab to center other tabs around it?

I was talking about the truncation glyphs and clicking on them, not
about automatic hscrolling when point gets too close to the window
edge.

> Also I tried to insert newlines in the tab-bar string, without success.

Not sure I understand this part.  Why did you need to add newlines,
and what didn't work when you tried?

> >> 6. Or even better: clicking on such arrow buttons will pop up a menu of
> >>    remaining tabs that don't fit into one-line tab-bar.
> >>    This is like implemented recently for Info-history where clicking on
> >>    the tool-bar arrow pops up a menu of previous Info nodes.  The same way
> >>    clicking on the arrows on the tab-bar could pop up a menu of tabs whose
> >>    names don't fit into the one-line tab-bar at both sides of the current tab.
> >
> > I'd leave such fancy features for future releases.  Remember: we are
> > waiting for this and other new features to reach some reasonable state
> > in order to start the Emacs 27 release cycle.
> 
> This is the simplest and quickest option to implement.  For Info-history
> it took just 20 lines of Lisp code.

The code could be small, but it will probably lead us down a rabbit
hole of more discussions, bug reports and feature requests, yet more
discussions, etc.  I'd like to stabilize this feature soon at some
reasonable point and leave the rest to future releases.





  reply	other threads:[~2019-10-15  9:09 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 18:55 bug#37667: 27.0.50; Tab Bar display problems with more than 5 tabs Eli Zaretskii
2019-10-10 22:25 ` Juri Linkov
2019-10-11  7:16   ` Eli Zaretskii
2019-10-13 22:39     ` Juri Linkov
2019-10-14  7:00       ` Eli Zaretskii
2019-10-14 21:47         ` Juri Linkov
2019-10-15  9:09           ` Eli Zaretskii [this message]
2019-10-15 18:07             ` Juri Linkov
2019-10-15 18:46               ` Eli Zaretskii
2019-10-15 19:10                 ` Eli Zaretskii
2019-10-15 22:39                   ` Juri Linkov
2019-10-16 16:51                     ` Eli Zaretskii
2019-10-16 22:39                       ` Juri Linkov
2019-10-17  7:20                         ` Eli Zaretskii
2019-10-17 22:34                           ` Juri Linkov
2019-10-18  6:57                             ` Eli Zaretskii
2019-10-20 22:28                               ` Juri Linkov
2019-10-21  7:58                                 ` Eli Zaretskii
2019-10-21 22:20                                   ` Juri Linkov
2019-10-22 15:16                                     ` Eli Zaretskii
2019-10-22 21:19                                       ` Juri Linkov
2019-10-23 16:10                                         ` Eli Zaretskii
2019-10-28 22:38                                           ` Juri Linkov
2019-10-29 12:01                                             ` Eli Zaretskii
2019-10-30  0:35                                               ` Juri Linkov
2019-10-30 15:59                                                 ` Eli Zaretskii
2019-10-30 23:59                                                   ` Juri Linkov
2019-10-31 14:25                                                     ` Eli Zaretskii
2019-10-31  0:03                                                   ` Juri Linkov
2019-10-31 14:30                                                     ` Eli Zaretskii
2019-10-31 20:46                                                       ` Juri Linkov
2019-11-01  7:43                                                         ` Eli Zaretskii
2019-11-02 19:06                                                           ` Juri Linkov
2019-11-02 19:28                                                             ` Eli Zaretskii
2019-11-02 22:36                                                               ` Juri Linkov
2019-11-17 21:44                                           ` Juri Linkov
2019-11-18 16:18                                             ` Eli Zaretskii
2019-11-18 21:57                                               ` Juri Linkov
2019-11-19 16:51                                                 ` Eli Zaretskii
2019-11-19 22:25                                                   ` Juri Linkov
2019-11-20  3:45                                                     ` Eli Zaretskii
2019-11-20 22:40                                                       ` Juri Linkov
2019-11-21  8:23                                                         ` martin rudalics
2019-11-21 14:20                                                           ` Eli Zaretskii
2019-11-21 21:56                                                           ` Juri Linkov
2019-11-22  8:16                                                             ` martin rudalics
2019-10-11  8:17   ` martin rudalics
2019-10-13 22:31     ` Juri Linkov
2019-10-14  6:51       ` Eli Zaretskii
2019-10-14 20:07         ` Juri Linkov
2019-10-14 20:22           ` Eli Zaretskii
2019-10-14 21:50             ` Juri Linkov
2019-10-15  6:26               ` Eli Zaretskii
2019-10-15 17:54                 ` Juri Linkov
2019-10-16 18:14       ` martin rudalics
2019-10-16 20:58         ` Juri Linkov
2019-10-17  8:25           ` martin rudalics
2020-09-20 11:24 ` Lars Ingebrigtsen
2020-09-20 11:27   ` Eli Zaretskii

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=83h84agytj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=37667@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /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).