From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: emacs-devel@gnu.org
Subject: info reversion: almost but not qui{te,et}
Date: Mon, 10 Sep 2007 11:07:07 +0200 [thread overview]
Message-ID: <87wsuy6g90.fsf@gnuvola.org> (raw)
there is some support for reverting an info buffer:
;; It's perhaps a bit nasty to kill the *info* buffer to force a
;; re-read, but at least it keeps this routine (which is only for the
;; benefit of makeinfo-buffer) out of the way of normal operations.
;;
(defun Info-revert-find-node (filename nodename) ...)
but that does not use the conventional `revert-buffer-function' dispatch
so here is a sketch that does:
(defun Info-revert (ignore-auto noconfirm)
(when (or noconfirm (y-or-n-p "Revert info buffer? "))
(let ((filename Info-current-file)
(node Info-current-node)
(line (count-lines (point-min) (line-beginning-position)))
(inhibit-read-only t))
(erase-buffer)
(Info-revert-find-node filename node)
(message "Reverted %s" filename)
(redisplay)
(forward-line line))))
(add-hook 'Info-mode-hook
(lambda ()
(set (make-local-variable 'revert-buffer-function)
Info-revert)))
this gives ok results but having to call `redisplay' annoys me (as
programmer: "inelegant!", as user: "bogus flashing!"). when i omit that
call, however, the `forward-line' seems to have no effect. why would
that be?
thi
reply other threads:[~2007-09-10 9:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87wsuy6g90.fsf@gnuvola.org \
--to=ttn@gnuvola.org \
--cc=emacs-devel@gnu.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.