From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org,
Wojciech Meyer <wojciech.meyer@googlemail.com>,
Deniz Dogan <deniz.a.m.dogan@gmail.com>
Subject: Re: Refreshing Info nodes
Date: Wed, 16 Jun 2010 23:33:08 +0300 [thread overview]
Message-ID: <87sk4mwz63.fsf@mail.jurta.org> (raw)
In-Reply-To: <jwvocfdgmd9.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 14 Jun 2010 20:42:18 -0400")
> I'd rather check something more directly and explicitly related to
> reverting that just (derived-mode-p 'Info-mode). Ideally there should
> be no check: the code that does the pop-to-buffer should simply not be
> used at all when reverting, instead the non-reverting case should create
> a *info* buffer, setup the few needed vars and then trigger
> `revert-buffer' to do the actual work.
Reverting in Info is implemented by the function `Info-revert-find-node'
whose purpose is to go to an Info node (like `Info-find-node'),
by killing the original buffer and creating a new one.
This is peculiar, but I'd like to avoid reimplementing this mechanism to
keep the traditional behavior, and simply fix a bug to allow it to work
with buffer names other than the default "*info*":
=== modified file 'lisp/info.el'
--- lisp/info.el 2010-06-10 16:42:56 +0000
+++ lisp/info.el 2010-06-16 20:27:42 +0000
@@ -803,9 +803,10 @@ (defun Info-revert-find-node (filename n
"Go to an Info node FILENAME and NODENAME, re-reading disk contents.
When *info* is already displaying FILENAME and NODENAME, the window position
is preserved, if possible."
- (pop-to-buffer "*info*")
+ (or (eq major-mode 'Info-mode) (pop-to-buffer "*info*"))
(let ((old-filename Info-current-file)
(old-nodename Info-current-node)
+ (old-buffer-name (buffer-name))
(pcolumn (current-column))
(pline (count-lines (point-min) (line-beginning-position)))
(wline (count-lines (point-min) (window-start)))
@@ -813,6 +814,8 @@ (defun Info-revert-find-node (filename n
(new-history (and Info-current-file
(list Info-current-file Info-current-node (point)))))
(kill-buffer (current-buffer))
+ (pop-to-buffer (or old-buffer-name "*info*"))
+ (Info-mode)
(Info-find-node filename nodename)
(setq Info-history old-history)
(if (and (equal old-filename Info-current-file)
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2010-06-16 20:33 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-13 17:51 Refreshing Info nodes Wojciech Meyer
2010-06-13 17:56 ` Deniz Dogan
2010-06-14 15:38 ` Juri Linkov
2010-06-14 18:34 ` Wojciech Meyer
2010-06-14 19:08 ` Stefan Monnier
2010-06-14 20:49 ` joakim
2010-06-14 21:59 ` Juri Linkov
2010-06-14 22:58 ` joakim
2010-06-15 21:35 ` Juri Linkov
2010-06-15 23:38 ` Wojciech Meyer
2010-06-16 13:39 ` Stefan Monnier
2010-06-16 20:43 ` Juri Linkov
2010-06-17 0:46 ` Stefan Monnier
2010-06-17 8:29 ` Juri Linkov
2010-08-28 20:38 ` Wojciech Meyer
2010-08-28 20:50 ` Eli Zaretskii
2010-08-28 22:17 ` Wojciech Meyer
2010-08-29 15:18 ` Wojciech Meyer
2010-09-11 13:19 ` Stefan Monnier
2010-09-11 14:00 ` Wojciech Meyer
2010-09-13 1:34 ` Wojciech Meyer
2010-09-13 10:11 ` Stefan Monnier
2010-09-13 10:22 ` Wojciech Meyer
2010-06-17 8:00 ` Richard Stallman
2010-06-17 8:52 ` Wojciech Meyer
2010-06-15 0:38 ` Stefan Monnier
2010-06-16 20:35 ` Juri Linkov
2010-06-17 0:49 ` Stefan Monnier
2010-06-15 3:00 ` Eli Zaretskii
2010-06-15 3:18 ` Drew Adams
2010-06-14 21:57 ` Juri Linkov
2010-06-15 0:42 ` Stefan Monnier
2010-06-16 20:33 ` Juri Linkov [this message]
2010-06-17 0:50 ` Stefan Monnier
2010-06-17 20:34 ` Juri Linkov
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=87sk4mwz63.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=deniz.a.m.dogan@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=wojciech.meyer@googlemail.com \
/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.