From: Juri Linkov <juri@linkov.net>
To: martin rudalics <rudalics@gmx.at>
Cc: 35860@debbugs.gnu.org
Subject: bug#35860: Delayed window positioning after buffer display
Date: Sun, 16 Jun 2019 22:32:08 +0300 [thread overview]
Message-ID: <87h88p8e5z.fsf@mail.linkov.net> (raw)
In-Reply-To: <d699d924-dbf6-3587-3f12-0d8bcd767933@gmx.at> (martin rudalics's message of "Sun, 16 Jun 2019 10:16:20 +0200")
> Currently 'temp-buffer-window-show' has
>
> (goto-char (point-min))
>
> and 'internal-temp-output-buffer-show' has
>
> (set-window-start window (point-min) t)
> ;; This should not be necessary.
> (set-window-point window (point-min))
BTW, there is a strange comment before the first line:
;; Don't try this with NOFORCE non-nil!
(set-window-start window (point-min) t)
but its NOFORCE is non-nil here. Is this a FIXME-like reminder?
> Then 'help-window-point-marker' may be set by the BODY of
> 'with-help-window' and 'help-window-setup' will pick that up guarded
> as
>
> (when (eq (marker-buffer help-window-point-marker) help-buffer)
> (set-window-point window help-window-point-marker)
> ;; Reset `help-window-point-marker'.
> (set-marker help-window-point-marker nil))
>
> thus (1) checking whether the marker buffer matches and (2)
> immediately resetting that marker to nil.
>
> Can you provide equivalent security guards when generalizing that
> variable?
In my previous patch there is no need to check for the buffer,
because a new general variable is declared as buffer-local.
> What happens with these markers when 'display-buffer-no-window' gets
> called? Or some user provided routine provokes an unhandled error?
> You don't even check the marker buffer of these variables so some old,
> completely unrelated marker could get reused here.
There is no global effect because this feature is localized
to a single buffer by its buffer-local scope.
> So we'd carefully have to examine first how the mechanism you propose
> could be abused, how to handle any errors in using and failing to
> reset these markers and last but not least tell why we don't provide
> 'window-point' and 'window-start' action alist entries instead of such
> global variables.
We could support an action alist too in addition to buffer-local variables,
but we should leave an ability to set buffer-local variables, because
neither view-lossage nor vc-git-print-log (two primary cases to test
this feature) have no access to the 'action' arg of display-buffer.
next prev parent reply other threads:[~2019-06-16 19:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 20:32 bug#35860: Delayed window positioning after buffer display Juri Linkov
2019-05-23 4:34 ` Eli Zaretskii
2019-05-23 20:56 ` Juri Linkov
2019-05-24 6:32 ` Eli Zaretskii
2019-05-24 18:34 ` Juri Linkov
2019-05-25 7:58 ` martin rudalics
2019-05-27 19:49 ` Juri Linkov
2019-06-11 20:53 ` Juri Linkov
2019-06-13 8:44 ` martin rudalics
2019-06-13 20:24 ` Juri Linkov
2019-06-14 19:14 ` Juri Linkov
2019-06-15 8:17 ` martin rudalics
2019-06-15 22:44 ` Juri Linkov
2019-06-16 8:16 ` martin rudalics
2019-06-16 19:32 ` Juri Linkov [this message]
2019-06-17 8:23 ` martin rudalics
2019-06-17 20:33 ` Juri Linkov
2019-06-18 8:19 ` martin rudalics
2019-06-18 21:02 ` Juri Linkov
2019-06-19 9:14 ` martin rudalics
2019-06-19 21:34 ` Juri Linkov
2019-06-20 7:41 ` martin rudalics
2019-06-15 8:17 ` 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=87h88p8e5z.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=35860@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).