From: Justus-bulk@Piater.name
To: ding@gnus.org
Subject: Re: nnir.el and absent files
Date: Sun, 02 Mar 2008 17:36:12 +0100 [thread overview]
Message-ID: <x8t4pbpgk1v.fsf@tool.montefiore.ulg.ac.be> (raw)
In-Reply-To: <x8tpruglyhw.fsf@tool.montefiore.ulg.ac.be> (Justus-bulk@piater.name's message of "Fri, 29 Feb 2008 13:48:27 +0100")
Hi -
Replying to my own posting:
I've made a trivial change to fix this for the swish++ backend by
simply testing each file for readability. See below for a diff with
respect to my previous version of nnir.el with nnmaildir support at
http://www.montefiore.ulg.ac.be/~piater/test/nnir.el ; I've now
replaced this file by the new one including the absent-file fix.
I consider this a workaround; I think desktop search engines should
offer the option of not returning files that have been removed since
the last index generation.
Justus
diff -c /local/home/piater/WWW/test/nnir.el /local/home/piater/share/emacs/lisp/gnus/contrib/nnir.el
*** /local/home/piater/WWW/test/nnir.el 2008-02-04 18:16:27.401299301 +0100
--- /local/home/piater/share/emacs/lisp/gnus/contrib/nnir.el 2008-03-02 17:21:07.995871209 +0100
***************
*** 1017,1027 ****
(while (re-search-forward
"\\(^[0-9]+\\) \\([^ ]+\\) [0-9]+ \\(.*\\)$" nil t)
(setq score (match-string 1)
! artno (file-name-nondirectory (match-string 2))
! dirnam (file-name-directory (match-string 2)))
!
! ;; don't match directories
! (when (string-match article-pattern artno)
;; nnml-use-compressed-files might be any string, but probably this
;; is sufficient. Note that we can't only use the value of
;; nnml-use-compressed-files because old articles might have been
--- 1017,1029 ----
(while (re-search-forward
"\\(^[0-9]+\\) \\([^ ]+\\) [0-9]+ \\(.*\\)$" nil t)
(setq score (match-string 1)
! filenam (match-string 2)
! artno (file-name-nondirectory filenam)
! dirnam (file-name-directory filenam))
!
! ;; don't match directories or inexistent/unreadable files
! (when (and (string-match article-pattern artno)
! (file-readable-p filenam))
;; nnml-use-compressed-files might be any string, but probably this
;; is sufficient. Note that we can't only use the value of
;; nnml-use-compressed-files because old articles might have been
next prev parent reply other threads:[~2008-03-02 16:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-29 12:48 Justus-bulk
2008-03-02 16:36 ` Justus-bulk [this message]
2008-04-13 13:49 ` Reiner Steib
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=x8t4pbpgk1v.fsf@tool.montefiore.ulg.ac.be \
--to=justus-bulk@piater.name \
--cc=ding@gnus.org \
/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.
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 NNTP newsgroup(s).