unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Subject: info-xref empty filenames
Date: Sat, 29 Nov 2003 09:23:36 +1000	[thread overview]
Message-ID: <87k75k13if.fsf@zip.com.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

        * 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).


[-- Attachment #2: info-xref.el.empty.diff --]
[-- Type: text/plain, Size: 3304 bytes --]

*** 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

[-- Attachment #3: Type: text/plain, Size: 141 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

             reply	other threads:[~2003-11-28 23:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-28 23:23 Kevin Ryde [this message]
2004-02-16  0:43 ` info-xref empty filenames Kevin Ryde
2004-02-24  1:34   ` Juri Linkov
2004-02-24 22:36     ` Kevin Ryde
2004-03-11  0:09       ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k75k13if.fsf@zip.com.au \
    --to=user42@zip.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).