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: RE: breadcrumbs for Info . . . . . . Date: Thu, 12 Jun 2008 15:42:20 -0700 Message-ID: <00a501c8ccdd$93328720$c2b22382@us.oracle.com> References: <009d01c8cb55$13d53e20$0200a8c0@us.oracle.com><87fxrkltma.fsf@jurta.org><00ae01c8cb71$c26aeef0$0200a8c0@us.oracle.com><873ankqou6.fsf@jurta.org><00d901c8cbc9$7df36fb0$0200a8c0@us.oracle.com> <87tzfzk331.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00A6_01C8CCA2.E6D3AF20" X-Trace: ger.gmane.org 1213310640 8240 80.91.229.12 (12 Jun 2008 22:44:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Jun 2008 22:44:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Juri Linkov'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 13 00:44:43 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 1K6vX2-0003Ip-D9 for ged-emacs-devel@m.gmane.org; Fri, 13 Jun 2008 00:44:36 +0200 Original-Received: from localhost ([127.0.0.1]:42160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6vWE-0005IM-Kq for ged-emacs-devel@m.gmane.org; Thu, 12 Jun 2008 18:43:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6vWA-0005IH-4H for emacs-devel@gnu.org; Thu, 12 Jun 2008 18:43:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6vW7-0005Fq-B7 for emacs-devel@gnu.org; Thu, 12 Jun 2008 18:43:41 -0400 Original-Received: from [199.232.76.173] (port=54816 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6vW7-0005Fm-28 for emacs-devel@gnu.org; Thu, 12 Jun 2008 18:43:39 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]:14279) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K6vW6-00033n-OC for emacs-devel@gnu.org; Thu, 12 Jun 2008 18:43:39 -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 m5CMha7L001987; Thu, 12 Jun 2008 16:43:36 -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 m5CF5YgP017730; Thu, 12 Jun 2008 16:43:35 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3692240001213310535; Thu, 12 Jun 2008 15:42:15 -0700 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 Jun 2008 15:42:14 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87tzfzk331.fsf@jurta.org> Thread-Index: AcjMFLlI2+huSQE5Tf+EuFwEWnR3tgAkRBTQ 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:99049 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_00A6_01C8CCA2.E6D3AF20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit > > IOW, is this a real problem in practice or just a > > hypothetical problem? > > There were reports about Info taking substantial time to read > Info subfiles on slow connections. You can search for e.g. > "Info slow connection" keywords and find posts like > http://thread.gmane.org/gmane.emacs.devel/17436/focus=18058 > I don't know how often such situations happen nowadays. > > Anyway, Info already scans the whole manual on the first visit > to find the index nodes, so it could build an internal node tree > as well on the same pass. I will let others debate and decide that. > There is also another visual problem: when Info-hide-note-references > is nil, the displayed breadcrumbs line is not nice looking: > > *Note Top:: > *Note Files:: > *Note Saving:: > *Note Backup:: That's a bug. I had tried to take care of that in the patch, but I missed some parts. Please try the attached patch, which should fix it. I also fixed an infinite recursion bug that occurred sometimes, due to Info-goto-node calling Info-fontify-node and (from the patch) vice versa. The change log remains the same. ------=_NextPart_000_00A6_01C8CCA2.E6D3AF20 Content-Type: application/octet-stream; name="info-el-2008-06-12.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="info-el-2008-06-12.patch" diff -u -w "info.el" "info-patched-2008-06-12.el"=0A= --- info.el 2008-06-10 16:24:28.000000000 -0700=0A= +++ info-patched-2008-06-12.el 2008-06-12 15:29:32.000000000 -0700=0A= @@ -3756,6 +3756,32 @@=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= + (let ((Info-fontify-maximum-menu-size nil)) ; = Prevents infinite recursion=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= + (let ((Info-fontify-maximum-menu-size nil)) ; Prevents = infinite recursion=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 +3843,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 (or Info-hide-note-references (<=3D = (line-number-at-pos) 4))=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= @@ -3913,11 +3941,14 @@=0A= (match-end 0)=0A= '(font-lock-face t))))))=0A= (when not-fontified-p=0A= - (when (memq Info-hide-note-references '(t hide))=0A= + (when (or (memq Info-hide-note-references '(t hide))=0A= + (<=3D (line-number-at-pos) 4))=0A= (add-text-properties (match-beginning 3) (match-end 3)=0A= '(invisible t front-sticky nil = rear-nonsticky t))=0A= ;; Unhide the file name of the external reference in = parens=0A= - (if (and (match-string 6) (not (eq = Info-hide-note-references 'hide)))=0A= + (if (and (match-string 6)=0A= + (not (eq Info-hide-note-references 'hide))=0A= + (> (line-number-at-pos) 4))=0A= (remove-text-properties (match-beginning 6) = (match-end 6)=0A= '(invisible t front-sticky = nil rear-nonsticky t)))=0A= ;; Unhide newline because hidden newlines cause too = long lines=0A= @@ -3932,7 +3963,9 @@=0A= (remove-text-properties (+ beg3 = (match-beginning 0))=0A= (+ beg3 (match-end 0))=0A= '(invisible t = front-sticky nil rear-nonsticky t))))))=0A= - (when (and Info-refill-paragraphs = Info-hide-note-references)=0A= + (when (and Info-refill-paragraphs=0A= + (or Info-hide-note-references=0A= + (<=3D (line-number-at-pos) 4)))=0A= (push (set-marker (make-marker) start)=0A= paragraph-markers))))))=0A= =0A= @@ -4019,7 +4052,8 @@=0A= (setq hl (cdr hl))))=0A= res))) 'info-xref-visited 'info-xref)))=0A= (when (and not-fontified-p=0A= - (memq Info-hide-note-references '(t hide))=0A= + (or (memq Info-hide-note-references '(t hide))=0A= + (<=3D (line-number-at-pos) 4))=0A= (not (Info-index-node)))=0A= (put-text-property (match-beginning 2) (1- (match-end 6))=0A= 'invisible t)=0A= =0A= Diff finished at Thu Jun 12 15:34:19=0A= ------=_NextPart_000_00A6_01C8CCA2.E6D3AF20--