From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: breadcrumbs for Info . . . . . . Date: Tue, 10 Jun 2008 16:52:43 -0700 Message-ID: <009d01c8cb55$13d53e20$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_009E_01C8CB1A.67766620" X-Trace: ger.gmane.org 1213141988 28849 80.91.229.12 (10 Jun 2008 23:53:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Jun 2008 23:53:08 +0000 (UTC) To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 11 01:53:51 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K6Dev-00040x-An for ged-emacs-devel@m.gmane.org; Wed, 11 Jun 2008 01:53:49 +0200 Original-Received: from localhost ([127.0.0.1]:38397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6De8-0007od-0T for ged-emacs-devel@m.gmane.org; Tue, 10 Jun 2008 19:53:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6De3-0007la-4C for emacs-devel@gnu.org; Tue, 10 Jun 2008 19:52:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6De2-0007kR-Gz for emacs-devel@gnu.org; Tue, 10 Jun 2008 19:52:54 -0400 Original-Received: from [199.232.76.173] (port=43263 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6De2-0007kI-Dm for emacs-devel@gnu.org; Tue, 10 Jun 2008 19:52:54 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]:63341) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K6De1-00066b-Kr for emacs-devel@gnu.org; Tue, 10 Jun 2008 19:52:54 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m5ANqpVg008140 for ; Tue, 10 Jun 2008 17:52:51 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m5AJqt23001882 for ; Tue, 10 Jun 2008 17:52:50 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3690156541213141965; Tue, 10 Jun 2008 16:52:45 -0700 Original-Received: from dradamslap1 (/24.5.171.3) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Jun 2008 16:52:45 -0700 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcjLVRN1UUp6zjQcTm6Db7UtS/AjQQ== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:98901 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_009E_01C8CB1A.67766620 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Breadcrumbs are an orientation and navigation aid for hypertext. They tell you where you are in the node hierarchy and let you go directly to any ancestor node. The orientation aid alone is very helpful, particularly when you are following cross-reference links - it lets you know exactly where in the document structure you have arrived. Attached is a patch for adding breadcrumbs to Info. There is currently no option for turning this off. That could be added if you think this is something some people won't want sometimes. I chose not to put any breadcrumbs at the top level (Top) of a manual, and there is no entry for the manuals directory (dir) in a breadcrumbs chain. These could be added, if people think it is worth it. Breadcrumbs look like this (this is for Emacs manual node Numbered Backups), where each step is a link to the given ancestor node: Top > Files > Saving > Backup Breadcrumbs are on a single line, directly under the node navigation line (which is just under the header line). Change log entry: 2008-06-10 Drew Adams * info.el: (Info-fontify-node): Added breadcrumbs. ------=_NextPart_000_009E_01C8CB1A.67766620 Content-Type: application/octet-stream; name="info-el-2008-06-10.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="info-el-2008-06-10.patch" diff -u -w info.el info-patched-2008-06-10.el=0A= --- info.el 2008-06-10 16:24:28.000000000 -0700=0A= +++ info-patched-2008-06-10.el 2008-06-10 16:27:08.000000000 -0700=0A= @@ -3756,6 +3756,30 @@=0A= ((string-equal (downcase tag) "prev") Info-prev-link-keymap)=0A= ((string-equal (downcase tag) "next") Info-next-link-keymap)=0A= ((string-equal (downcase tag) "up" ) Info-up-link-keymap))))))=0A= + =0A= + ;; Add breadcrumbs=0A= + (unless (string=3D "Top" Info-current-node)=0A= + (let ((nod Info-current-node)=0A= + (onode Info-current-node)=0A= + (crumbs nil)=0A= + (done nil))=0A= + (while (not done)=0A= + (let ((up (Info-extract-pointer "up")))=0A= + (cond ((string=3D "Top" up)=0A= + (setq crumbs (if crumbs=0A= + (concat "*Note Top:: > " crumbs)=0A= + "*Note Top::"))=0A= + (setq done t))=0A= + (t=0A= + (Info-goto-node up)=0A= + (setq nod Info-current-node)=0A= + (when crumbs (setq crumbs (concat " > " crumbs)))=0A= + (setq crumbs (concat "*Note " nod ":: " = crumbs))))))=0A= + (Info-goto-node onode)=0A= + (forward-line 1)=0A= + (insert (concat crumbs "\n\n"))))=0A= + =0A= + ;; Treat header line=0A= (when Info-use-header-line=0A= (goto-char (point-min))=0A= (let* ((header-end (line-end-position))=0A= @@ -3817,13 +3841,15 @@=0A= ;; Fontify cross references=0A= (goto-char (point-min))=0A= (when (or not-fontified-p fontify-visited-p)=0A= - (while (re-search-forward "\\(\\*Note[ = \n\t]+\\)\\([^:]*\\)\\(:[ = \t]*\\([^.,:(]*\\)\\(\\(([^)]*)\\)[^.,:]*\\)?[,:]?\n?\\)" nil t)=0A= + (while (re-search-forward "\\(\\*Note[ = \n\t]+\\)\\([^:]*\\)\\(:[ \t]*\=0A= +\\([^.,:(]*\\)\\(\\(([^)]*)\\)[^.,:]*\\)?[,:]?\n?\\)" nil t)=0A= (let ((start (match-beginning 0))=0A= (next (point))=0A= other-tag)=0A= (when not-fontified-p=0A= (when Info-hide-note-references=0A= - (when (not (eq Info-hide-note-references 'hide))=0A= + (when (and (not (eq Info-hide-note-references 'hide))=0A= + (> (line-number-at-pos) 4)) ; Skip = breadcrumbs=0A= ;; *Note is often used where *note should have been=0A= (goto-char start)=0A= (skip-syntax-backward " ")=0A= =0A= Diff finished. Tue Jun 10 16:27:37 2008=0A= ------=_NextPart_000_009E_01C8CB1A.67766620--