From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.devel Subject: info-xref empty filenames Date: Sat, 29 Nov 2003 09:23:36 +1000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87k75k13if.fsf@zip.com.au> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1070062129 29317 80.91.224.253 (28 Nov 2003 23:28:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Nov 2003 23:28:49 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Nov 29 00:28:45 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1APs2W-0007eN-00 for ; Sat, 29 Nov 2003 00:28:44 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1APs2W-0003y2-00 for ; Sat, 29 Nov 2003 00:28:44 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1APsy6-0002VD-C0 for emacs-devel@quimby.gnus.org; Fri, 28 Nov 2003 19:28:14 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1APsvk-0001v5-4G for emacs-devel@gnu.org; Fri, 28 Nov 2003 19:25:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1APsvC-0001kA-3v for emacs-devel@gnu.org; Fri, 28 Nov 2003 19:25:45 -0500 Original-Received: from [61.8.0.36] (helo=snoopy.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.24) id 1APsvA-0001ig-Mw for emacs-devel@gnu.org; Fri, 28 Nov 2003 19:25:12 -0500 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.6) with ESMTP id hASNNki0017514 for ; Sat, 29 Nov 2003 10:23:46 +1100 Original-Received: from localhost (ppp223.dyn16.pacific.net.au [61.8.16.223]) by mongrel.pacific.net.au (8.12.3/8.12.3/Debian-6.6) with ESMTP id hASNLYMX010518 for ; Sat, 29 Nov 2003 10:21:35 +1100 Original-Received: from gg by localhost with local (Exim 3.35 #1 (Debian)) id 1APrxY-0002J4-00; Sat, 29 Nov 2003 09:23:36 +1000 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:18196 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18196 --=-=-= * info-xref.el (info-xref-check-buffer): Report empty filename parts. Remove spurious node duplicate suppression, doesn't work, not wanted. (info-xref-output): Take format style args. In particular this picks up the programs.texi problem (other message). --=-=-= Content-Disposition: attachment; filename=info-xref.el.empty.diff *** info-xref.el.~1.4.~ Sat Sep 6 08:15:10 2003 --- info-xref.el Sun Nov 23 07:46:57 2003 *************** (defun info-xref-check-buffer () *** 204,234 **** This should be the raw file contents, not `Info-mode'." (goto-char (point-min)) (while (re-search-forward ! "\\*[Nn]ote[ \n\t]+[^:]*:[ \n\t]+\\(\\(([^)]+)\\)[^.,]+\\)[.,]" nil t) (let* ((file (match-string 2)) (node ;; Canonicalize spaces: we could use "[\t\n ]+" but ;; we try to avoid uselessly replacing " " with " ". (replace-regexp-in-string "[\t\n][\t\n ]*\\| [\t\n ]+" " " (match-string 1) t t))) ! ;; see if the file exists, if we haven't tried it before ! (unless (assoc file info-xref-xfile-alist) ! (let ((found (info-xref-goto-node-p file))) ! (push (cons file found) info-xref-xfile-alist) ! (unless found ! (info-xref-output (format "Not available to check: %s\n" file))))) ! ;; if the file exists, try the node, if we haven't before ! (when (cdr (assoc file info-xref-xfile-alist)) ! (unless (assoc node info-xref-xfile-alist) (if (info-xref-goto-node-p node) (setq info-xref-good (1+ info-xref-good)) (setq info-xref-bad (1+ info-xref-bad)) ! (info-xref-output (format "No such node: %s\n" node)))))))) ! (defun info-xref-output (str) ! "Emit STR as an info-xref result message." (with-current-buffer info-xref-results-buffer ! (insert info-xref-filename-heading str) (setq info-xref-filename-heading ""))) ;; When asking Info-goto-node to fork, *info* needs to be the current --- 204,236 ---- This should be the raw file contents, not `Info-mode'." (goto-char (point-min)) (while (re-search-forward ! "\\*[Nn]ote[ \n\t]+[^:]*:[ \n\t]+\\(\\(([^)]*)\\)[^.,]+\\)[.,]" nil t) (let* ((file (match-string 2)) (node ;; Canonicalize spaces: we could use "[\t\n ]+" but ;; we try to avoid uselessly replacing " " with " ". (replace-regexp-in-string "[\t\n][\t\n ]*\\| [\t\n ]+" " " (match-string 1) t t))) ! (if (string-equal "()" file) ! (info-xref-output "Empty filename part: %s\n" node) ! ;; see if the file exists, if we haven't tried it before ! (unless (assoc file info-xref-xfile-alist) ! (let ((found (info-xref-goto-node-p file))) ! (push (cons file found) info-xref-xfile-alist) ! (unless found ! (info-xref-output "Not available to check: %s\n" file)))) ! ;; if the file exists, try the node ! (when (cdr (assoc file info-xref-xfile-alist)) (if (info-xref-goto-node-p node) (setq info-xref-good (1+ info-xref-good)) (setq info-xref-bad (1+ info-xref-bad)) ! (info-xref-output "No such node: %s\n" node))))))) ! (defun info-xref-output (str &rest args) ! "Emit a `format'-ed message STR+ARGS to the info-xref output buffer." (with-current-buffer info-xref-results-buffer ! (insert info-xref-filename-heading ! (apply 'format str args)) (setq info-xref-filename-heading ""))) ;; When asking Info-goto-node to fork, *info* needs to be the current --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel --=-=-=--