From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53913 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.gnus.general Subject: Re: Reloading info files Date: Sat, 06 Sep 2003 07:58:36 +1000 Organization: Bah Humbug Sender: ding-owner@lists.math.uh.edu Message-ID: <87k78maodv.fsf@zip.com.au> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1062808336 11574 80.91.224.253 (6 Sep 2003 00:32:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Sep 2003 00:32:16 +0000 (UTC) Original-X-From: ding-owner+M2453@lists.math.uh.edu Sat Sep 06 02:32:14 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19vQzu-0000SW-00 for ; Sat, 06 Sep 2003 02:32:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19vQzC-0002tX-00; Fri, 05 Sep 2003 19:31:30 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19vObT-0002XK-00 for ding@lists.math.uh.edu; Fri, 05 Sep 2003 16:58:51 -0500 Original-Received: (qmail 88282 invoked by alias); 5 Sep 2003 21:58:50 -0000 Original-Received: (qmail 88277 invoked from network); 5 Sep 2003 21:58:50 -0000 Original-Received: from snoopy.pacific.net.au (61.8.0.36) by sclp3.sclp.com with SMTP; 5 Sep 2003 21:58:50 -0000 Original-Received: from mongrel.pacific.net.au (mongrel.pacific.net.au [61.8.0.107]) by snoopy.pacific.net.au (8.12.3/8.12.3/Debian-6.4) with ESMTP id h85LwkBt024952 for ; Sat, 6 Sep 2003 07:58:46 +1000 Original-Received: from localhost (ppp48.dyn228.pacific.net.au [203.143.228.48]) by mongrel.pacific.net.au (8.12.3/8.12.3/Debian-6.4) with ESMTP id h85LvMBC002946 for ; Sat, 6 Sep 2003 07:57:23 +1000 Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 19vObG-0001gx-00; Sat, 06 Sep 2003 07:58:38 +1000 Original-To: ding@gnus.org In-Reply-To: (Reiner Steib's message of "Thu, 04 Sep 2003 18:53:08 +0200") User-Agent: Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53913 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53913 Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes: > > (defun rs-info-reload () > "Reload current info node." You can enhance that by saving point as line+column, and the window position as a line, to stop it jumping around too much on small changes in the re-read text. Code below from the emacs cvs. ;; 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) "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*") (let ((old-filename Info-current-file) (old-nodename Info-current-node) (pcolumn (current-column)) (pline (count-lines (point-min) (line-beginning-position))) (wline (count-lines (point-min) (window-start))) (old-history Info-history) (new-history (and Info-current-file (list Info-current-file Info-current-node (point))))) (kill-buffer (current-buffer)) (Info-find-node filename nodename) (setq Info-history old-history) (if (and (equal old-filename Info-current-file) (equal old-nodename Info-current-node)) (progn ;; note goto-line is no good, we want to measure from point-min (beginning-of-buffer) (forward-line wline) (set-window-start (selected-window) (point)) (beginning-of-buffer) (forward-line pline) (move-to-column pcolumn)) ;; only add to the history when coming from a different file+node (if new-history (setq Info-history (cons new-history Info-history))))))