From: Kevin Ryde <user42@zip.com.au>
Subject: Re: info-xref empty filenames
Date: Mon, 16 Feb 2004 10:43:14 +1000 [thread overview]
Message-ID: <87wu6nx3a5.fsf@zip.com.au> (raw)
In-Reply-To: 87k75k13if.fsf@zip.com.au
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
I wrote:
>
> * 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.
I'd like to re-propose this addition to my info-xref. I think it got
lost while the cvs was down.
[-- 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
next prev parent reply other threads:[~2004-02-16 0:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-28 23:23 info-xref empty filenames Kevin Ryde
2004-02-16 0:43 ` Kevin Ryde [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wu6nx3a5.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.