unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: sbaugh@catern.com
Cc: sbaugh@janestreet.com, philipk@posteo.net, rudalics@gmx.at,
	drew.adams@oracle.com, 64619@debbugs.gnu.org
Subject: bug#64619: [PATCH] Add toggle-window-dedicated command
Date: Mon, 21 Aug 2023 22:20:20 +0300	[thread overview]
Message-ID: <83r0nwtd6z.fsf@gnu.org> (raw)
In-Reply-To: <878ra4pn28.fsf@catern.com> (sbaugh@catern.com)

> From: sbaugh@catern.com
> Date: Mon, 21 Aug 2023 13:00:48 +0000 (UTC)
> Cc: sbaugh@janestreet.com, philipk@posteo.net, 64619@debbugs.gnu.org,
> 	drew.adams@oracle.com, rudalics@gmx.at
> 
> >> @@ -675,6 +696,7 @@ mode-line-end-spaces
> >>  	            'mode-line-modified
> >>  	            'mode-line-remote)
> >>                'display '(min-width (5.0)))
> >> +             'mode-line-window-dedicated
> >>  	     'mode-line-frame-identification
> >>  	     'mode-line-buffer-identification
> >>  	     "   "
> >
> > Why not add this to the group with the min-width property (and enlarge
> > that to 6.0)?  That way, we prevent annoying horizontal movement of
> > the rest of the mode-line display when toggling the state.
> 
> Hm, I tried doing that, but maybe I don't understand min-width, because
> there's still horizontal movement of the mode-line when I toggle it on
> and off.  I tried various combinations of strings, but they all had this
> behavior, maybe I'm doing something obviously wrong?

Look at how modeline-client was fixed recently, it had the same
problem.

> Also, if we make it fixed-size in this way, should we display "-"
> instead of nothing when the window is not dedicated? Or just an empty
> space?

Empty space is fine, and min-width will do that.

> - @var{cs}:@var{ch}-@var{fr}  @var{buf}      @var{pos} @var{line}   (@var{major} @var{minor})
> + @var{cs}:@var{ch}-@var{D}@var{fr}  @var{buf}      @var{pos} @var{line}   (@var{major} @var{minor})
>  @end example
>  
>  @noindent
> @@ -231,6 +231,12 @@ Mode Line
>  However, if @code{default-directory} (@pxref{File Names}) for the
>  current buffer is on a remote machine, @samp{@@} is displayed instead.
>  
> +  @var{D} appears if the window is dedicated to its current buffer.

This should be @var{d}, lower-case, as all the arguments of @var are.
makeinfo will either up-case it (for Info) or produce a slanted
typeface (for other output formats).

> +@cindex dedicated window
> +  Sometimes, a window is ``dedicated'' to its current buffer
                                                               ^
A period is missing there.

> +@code{display-buffer} will avoid reusing dedicated windows most of the
> +time.  This is indicated by a ``d'' in the mode line (@pxref{Mode
> +Line}).  A window can also be strongly dedicated, which prevents any
> +changes to the buffer displayed in the window this is indicated by a
> +``D'' in the mode line.

Why use ``d'' and ``D'' and not @samp?

> +You can control the default of FLAG with
> +`toggle-window-dedicated-flag'.  Consequently, if you set that
> +variable to t, strong dedication will be used by default.

The last sentence should say at the end "...and \\[universal-argument]
will make the window weakly dedicated."





  parent reply	other threads:[~2023-08-21 19:20 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 15:38 bug#64619: [PATCH] Add toggle-window-dedicated command Spencer Baugh
2023-07-14 19:42 ` Philip Kaludercic
2023-07-14 21:17   ` Drew Adams
2023-07-14 23:58     ` sbaugh
2023-07-15 21:30       ` Drew Adams
2023-07-18 15:35   ` Spencer Baugh
2023-07-18 17:56     ` Philip Kaludercic
2023-07-15  5:44 ` Eli Zaretskii
2023-07-15  7:53   ` martin rudalics
2023-07-15 17:41     ` sbaugh
2023-07-15 18:16       ` martin rudalics
2023-07-18 15:34 ` Spencer Baugh
2023-08-19 13:34   ` sbaugh
2023-08-19 16:13     ` Philip Kaludercic
2023-08-19 16:20       ` sbaugh
2023-08-19 16:21         ` Philip Kaludercic
2023-08-19 20:02           ` sbaugh
2023-08-20  5:57             ` Eli Zaretskii
2023-08-21 13:00               ` sbaugh
2023-08-21 13:20                 ` Gregory Heytings
2023-08-21 14:02                   ` Eli Zaretskii
2023-08-21 19:22                     ` Eli Zaretskii
2023-08-21 19:20                 ` Eli Zaretskii [this message]
2023-10-13  1:33                   ` sbaugh
2023-10-25 13:46                     ` Eli Zaretskii
2023-08-19 16:43     ` Gregory Heytings
2023-08-19 20:06       ` sbaugh
2023-08-19 20:37         ` Gregory Heytings
2023-08-19 21:47           ` sbaugh
2023-08-19 22:36             ` Gregory Heytings
2023-08-20  6:13               ` Eli Zaretskii
2023-08-20  8:02                 ` Gregory Heytings
2023-08-20  8:30                   ` Eli Zaretskii
2023-08-20  8:41                     ` Gregory Heytings
2023-08-20  8:54                       ` Eli Zaretskii
2023-08-20  9:56                         ` Gregory Heytings
2023-08-20 10:11                           ` Eli Zaretskii
2023-08-20 10:25                             ` Gregory Heytings
2023-08-20 14:09                               ` sbaugh
2023-08-20 15:31                                 ` Eli Zaretskii
2023-08-20 21:56                                 ` Gregory Heytings
2023-08-21 11:23                                   ` sbaugh
2023-08-21  8:27           ` Augusto Stoffel

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=83r0nwtd6z.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64619@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=philipk@posteo.net \
    --cc=rudalics@gmx.at \
    --cc=sbaugh@catern.com \
    --cc=sbaugh@janestreet.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 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).