* info reversion: almost but not qui{te,et}
@ 2007-09-10 9:07 Thien-Thi Nguyen
0 siblings, 0 replies; only message in thread
From: Thien-Thi Nguyen @ 2007-09-10 9:07 UTC (permalink / raw)
To: emacs-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-09-10 9:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-10 9:07 info reversion: almost but not qui{te,et} Thien-Thi Nguyen
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).