unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Lluís <xscript@gmx.net>, "Eli Zaretskii" <eliz@gnu.org>
Cc: 23169@debbugs.gnu.org
Subject: bug#23169: 24.5; Inconsistent text reflow in man pages depending on window configuration
Date: Fri, 01 Apr 2016 18:20:36 +0200	[thread overview]
Message-ID: <56FE9FD4.3050802@gmx.at> (raw)
In-Reply-To: <87oa9t8iq4.fsf@fimbulvetr.bsc.es>

 > Thing is I don't know the width of the window that will be used, since in some
 > cases it does not exist yet:
 >
 >    +-----+                   +--+--+
 >    |     |                   |  |  |
 >    |     | -> M-x man man -> |  |  |
 >    |     |                   |  |  |
 >    +-----+                   +--+--+
 >
 > The ideal without breaking the asynchronicity would be to somehow display the
 > new buffer on a window before populating it (display-buffer might or might not
 > reuse a window here), calculate its window's width, set COLUMNS, asynchronously
 > call man to populate the buffer, and then really show the buffer on the previous
 > window.
 >
 > The only problem is that creating a temporary window just to calculate its width
 > could annoy people because the contents won't be shown yet.

We could add a special alist element, say ‘pretend’, to ‘display-buffer’
that would cause the latter to return the size of the window where
BUFFER-OR-NAME would be displayed _without_ creating or touching that
window.  This will work reliably only if the new window

(1) appears on an existing frame (or we know that the window manager
reliably makes new frames just as large as we want them),

(2) is not created by a user-defined action (an action not predefined
in window.el) that does not understand ‘pretend’, and

(3) no window configuration or ‘display-buffer-alist’ related changes
are performed in the period from when the size was calculated until
‘display-buffer’ is called without "pretending".

martin






  reply	other threads:[~2016-04-01 16:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 13:15 bug#23169: 24.5; Inconsistent text reflow in man pages depending on window configuration Lluís
2016-03-31 16:48 ` Eli Zaretskii
2016-04-01 15:13   ` Lluís
2016-04-01 16:20     ` martin rudalics [this message]
2016-04-01 17:40     ` Eli Zaretskii
2016-04-01 19:51       ` Juri Linkov
2016-04-02 11:30       ` Lluís
2016-04-02 20:23         ` Juri Linkov
2016-04-03 13:30           ` Lluís
2019-09-29  5:40 ` Stefan Kangas

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=56FE9FD4.3050802@gmx.at \
    --to=rudalics@gmx.at \
    --cc=23169@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=xscript@gmx.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).