From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: 3973@emacsbugs.donarmstrong.com
Subject: bug#3973: cleanup view-mode usage in vc-resynch-window
Date: Fri, 31 Jul 2009 15:19:18 -0400 [thread overview]
Message-ID: <jwv7hxor79l.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <200907310628.n6V6SAS7014974@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 30 Jul 2009 23:28:10 -0700 (PDT)")
> The function would look like this:
> (defun view-maybe-enter-exit (file)
> (if (file-writable-p file)
> (and view-mode
> (let ((view-old-buffer-read-only nil))
> (view-mode-exit)))
> (and (not view-mode)
> (not (eq (get major-mode 'mode-class) 'special))
> (view-mode-enter))))
> but the calling convention is strange: it needs to be called with a
> buffer selected and pass the file name... Not sure it's worth it.
Why do we need to pass `file'?
Can't we (assert (equal file buffer-file-name))?
> At least the TODO comment can go and be replaced with a comment about
> why changing the state of view-mode is needed there.
Yes, please.
>> Maybe a better option in the longer term is refine the meaning of the
>> `preserve-modes' arg to revert-buffer, so that some minor modes can
>> request to be refreshed or not (the VC state is one that would also
>> benefit from such a change, as can be seen in auto-revert-mode).
> That sounds like a good idea. Unfortunately I am not familiar with that
> code, it is quite complex and critical, and I don't think it's too
> important to fix it now, so I'll punt.
Wise choice,
Stefan
next prev parent reply other threads:[~2009-07-31 19:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 7:44 bug#3973: cleanup view-mode usage in vc-resynch-window Dan Nicolaescu
2009-07-30 21:14 ` Stefan Monnier
2009-07-30 22:06 ` Dan Nicolaescu
[not found] ` <jwv1vnxbowd.fsf-monnier+emacsbugreports@gnu.org>
2009-07-31 3:22 ` Dan Nicolaescu
2009-07-31 3:43 ` Stefan Monnier
2009-07-31 6:28 ` Dan Nicolaescu
2009-07-31 19:19 ` Stefan Monnier [this message]
2011-07-12 20:17 ` Lars Magne Ingebrigtsen
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=jwv7hxor79l.fsf-monnier+emacsbugreports@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=3973@emacsbugs.donarmstrong.com \
--cc=dann@ics.uci.edu \
/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.