From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Bob Rogers <rogers-emacs@rgrjr.dyndns.org>
Cc: emacs-pretest-bug@gnu.org, 1256@emacsbugs.donarmstrong.com
Subject: bug#1256: Race condition in vc-diff
Date: Sat, 25 Oct 2008 22:31:18 -0400 [thread overview]
Message-ID: <jwvmygsdrau.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <18691.40605.633869.254120@rgrjr.rgrjr.dyndns.org> (Bob Rogers's message of "Sat, 25 Oct 2008 18:33:01 -0400")
> If you visit this file and do "C-x v =" in a single-window frame that
> is more than about 30 lines tall, and if the backend diff command is
> fast enough, the diff window will remain half the size of the screen,
> rather than being shrunk to fit the buffer. This is because
> vc-exec-after finds that the buffer process has already finished, and
> runs vc-diff-finish before the diff buffer has been made visible. In
> that case, vc-diff-finish assumes that the user has already buried it.
> I am not a big fan of this shrink-wrapping, but I do think vc-diff
> ought to behave consistently (and it has worked this way for quite a
> while now). The attached patch is sufficient to fix it.
As the comment indicates, this patch is not quite good enough because
pop-to-buffer may change point. We probably will need to manipulate
point explicitly to work around the problem. BTW you can make the
"race-condition" deterministic by making the diff command synchronous
(as is the case with the RCS backend, for example, where your problem
should just *always* happen).
Stefan
next prev parent reply other threads:[~2008-10-26 2:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-25 22:33 bug#1256: Race condition in vc-diff Bob Rogers
2008-10-26 2:31 ` Stefan Monnier [this message]
2008-10-26 3:45 ` Bob Rogers
2011-07-10 1:44 ` Chong Yidong
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvmygsdrau.fsf-monnier+emacsbugreports@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=1256@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@gnu.org \
--cc=rogers-emacs@rgrjr.dyndns.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.