unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* info-xref empty filenames
@ 2003-11-28 23:23 Kevin Ryde
  2004-02-16  0:43 ` Kevin Ryde
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Ryde @ 2003-11-28 23:23 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-03-11  0:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-28 23:23 info-xref empty filenames Kevin Ryde
2004-02-16  0:43 ` Kevin Ryde
2004-02-24  1:34   ` Juri Linkov
2004-02-24 22:36     ` Kevin Ryde
2004-03-11  0:09       ` Kevin Ryde

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