From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Patch to disable links line in *info* buffer Date: 07 Jun 2002 01:24:17 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: <5xr8jk56u6.fsf@kfs2.cua.dk> References: <87bsaos1fl.fsf@orebokech.com> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1023402351 31205 127.0.0.1 (6 Jun 2002 22:25:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 6 Jun 2002 22:25:51 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17G5hX-00087C-00 for ; Fri, 07 Jun 2002 00:25:51 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17G62d-00004y-00 for ; Fri, 07 Jun 2002 00:47:39 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17G5g6-0007bX-00; Thu, 06 Jun 2002 18:24:22 -0400 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 17G5fW-0007Y0-00; Thu, 06 Jun 2002 18:23:47 -0400 Original-Received: from kfs2.cua.dk.cua.dk (unknown [10.1.82.3]) by mail.filanet.dk (Postfix) with SMTP id 9D6317C016; Thu, 6 Jun 2002 22:23:33 +0000 (GMT) Original-To: Romain FRANCOISE In-Reply-To: <87bsaos1fl.fsf@orebokech.com> Original-Lines: 65 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4617 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4617 Romain FRANCOISE writes: > Richard, > > the change you made to info.el to make the links line show up at the top > of the *info* buffer didn't seem to be very popular, and I myself find > it quite useless, since I never ever had to copy this particular line > out of the buffer. > > Following Miles Bader's suggestion, I propose the following patch, it > makes the behavior optional, and disabled by default. Does it look > reasonable to you? > I would also like to hide the entire "duplicate" header line, as the navigation buttons are in the "real" header line, and the file and title is in the mode-line (and printed in nice big letters in the top of the info buffer) -- so every bit of information in the header line is superfluous in general ... except if you want to copy it. I would then add a command `+' to toggle the visibility of the header line in case you really need to look at or copy it. The following patch to info.el does this: Index: info.el =================================================================== RCS file: /cvs/emacs/lisp/info.el,v retrieving revision 1.302 diff -c -r1.302 info.el *** info.el 3 Jun 2002 22:57:40 -0000 1.302 --- info.el 6 Jun 2002 22:09:46 -0000 *************** *** 1037,1043 **** --- 1037,1053 ---- ;;; It is useful to be able to copy the links line out of the buffer ;;; with M-w. ;;; (narrow-to-region (1+ header-end) (point-max)) + (let ((buffer-read-only nil)) + (add-text-properties (point-min) (1+ header-end) '(invisible t))) )) + + (defun Info-toggle-header-visible () + (interactive) + (let ((buffer-read-only nil)) + (save-excursion + (goto-char (point-min)) + (alter-text-property (point) (1+ (line-end-position)) 'invisible + #'(lambda (v) (null v)))))) ;; Go to an info node specified with a filename-and-nodename string ;; of the sort that is found in pointers in nodes. *************** *** 2095,2100 **** --- 2105,2111 ---- (define-key Info-mode-map "9" 'Info-nth-menu-item) (define-key Info-mode-map "0" 'undefined) (define-key Info-mode-map "?" 'Info-summary) + (define-key Info-mode-map "+" 'Info-toggle-header-visible) (define-key Info-mode-map "]" 'Info-forward-node) (define-key Info-mode-map "[" 'Info-backward-node) (define-key Info-mode-map "<" 'Info-top-node) -- Kim F. Storm http://www.cua.dk