unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: martin rudalics <rudalics@gmx.at>
Cc: 17065@debbugs.gnu.org
Subject: bug#17065: 24.3.50; Revise line 5944 of window.el to use `window-width`, instead of `window-total-width`.
Date: Fri, 22 Oct 2021 22:09:28 -0700	[thread overview]
Message-ID: <CADwFkmmyr2UAMVtrv_F4uV5=sGqHTJb3m5bCwj8kidXEV0YE+A@mail.gmail.com> (raw)
In-Reply-To: <532D5AAC.7020608@gmx.at> (martin rudalics's message of "Sat, 22 Mar 2014 10:41:00 +0100")

martin rudalics <rudalics@gmx.at> writes:

>> (defun broken-example ()
>>    (interactive)
>>    (window--display-buffer
>>     ;; buffer
>>     (get-buffer-create "*test*")
>>     ;; window
>>     (split-window (selected-window) nil 'right)
>>     ;; type
>>     'window
>>     ;; alist
>>     '((window-width . 82))
>>     ;; dedicated
>>     t)
>>    (message "Window Width:  %s" (window-width (get-buffer-window "*test*"))) )
>
> Conceptually, the `window-width' alist entry specifies the new total
> width of the window, including fringes, scrollbars and vertical
> dividers.  You mean that specifiying the number of text columns is more
> intuitive?  I might agree, but unfortunately _all_ window resizing
> functions intepret "width" in terms of the total width of a window.
> Making an exception for this special case would only increase the
> confusion.
>
> The confusion has historical reasons and was not considered important,
> likely so, because side-by-side windows are in use more frequently only
> over the past years.  If, with emacs -Q, I do
>
> (let ((window (split-window (selected-window) -20 'right)))
>   (window-body-width window))
>
> I get 16 text columns for the new window which is likely not what I
> expected as someone using this function for the first time with an
> explicit SIZE argument.
>
> In any case, I will have to adjust some doc-strings and the Elisp
> manual.  So far the only hint is the doc-string of `split-window-right'
> which says
>
>   Here, SIZE includes the width of the window's scroll bar; if there are
>   no scroll bars, it includes the width of the divider column to the
>   window's right, if any.
>
> but I'm struggling with this issue ever since.

(That was 7.5 years ago.)

Is any of the above still an issue these days?





  reply	other threads:[~2021-10-23  5:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-22  1:32 bug#17065: 24.3.50; Revise line 5944 of window.el to use `window-width`, instead of `window-total-width` Keith David Bershatsky
2014-03-22  9:41 ` martin rudalics
2021-10-23  5:09   ` Stefan Kangas [this message]
2021-10-24  9:48     ` 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

  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='CADwFkmmyr2UAMVtrv_F4uV5=sGqHTJb3m5bCwj8kidXEV0YE+A@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=17065@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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).