unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@stupidchicken.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 142-done@emacsbugs.donarmstrong.com, emacs-devel@gnu.org
Subject: Re: 23.0.60; doc-view: occasionally stuck at welcome screen
Date: Mon, 28 Apr 2008 20:00:39 -0400	[thread overview]
Message-ID: <87abjdy1g8.fsf@stupidchicken.com> (raw)
In-Reply-To: <87zlrnbwgg.fsf@stupidchicken.com> (Chong Yidong's message of "Mon, 21 Apr 2008 01:36:47 -0400")

Chong Yidong <cyd@stupidchicken.com> writes:

> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>> I've located the source of the problem.  In doc-view-display the
>>>   (dolist (win (get-buffer-window-list buffer nil t)) ...)
>>> doesn't iterate over any windows, e.g. get-buffer-window-list returns nil.
>>
>> Is it run before `buffer' is shown in a window, maybe?
>
> I think what's happening is that doc-view-mode is being run during file
> autodetection, before the selected window switches to the doc-view
> buffer.  Thus, (window-buffer (selected-window)) is not equal to
> (current-buffer).

I've checked in a fix for this particular problem.

Taking a step back, though, I think the "window memory" feature you
introduced to image-mode and doc-view may be a misfeature.

Currently, if a window has previously been used to view a pdf file at a
particular page, then switching back to the pdf file jumps back to that
page automatically.  But this is not the way Emacs behaves for ordinary
buffers.  There, you jump to the value of point determined roughly as
follows:

(i) if there is at least one existing window displaying that buffer, use
the first such window found.

(ii) otherwise, use the last value of point set in that buffer (in any
window).

I think image-mode and doc-view should mirror the behavior of ordinary
buffers.  So instead of a buffer-local alist variable
((WIN . PROPS)...), we should have a buffer-local variable PROPS, and
update PROPS every time you scroll the image.

WDYT?




      reply	other threads:[~2008-04-29  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-15 16:26 23.0.60; doc-view: occasionally stuck at welcome screen Markus Triska
2008-04-16  6:25 ` Tassilo Horn
2008-04-16 14:04   ` Stefan Monnier
2008-04-21  5:36     ` Chong Yidong
2008-04-29  0:00       ` Chong Yidong [this message]

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=87abjdy1g8.fsf@stupidchicken.com \
    --to=cyd@stupidchicken.com \
    --cc=142-done@emacsbugs.donarmstrong.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).