Gnus development mailing list
 help / color / mirror / Atom feed
* get the first N unquoted lines of the article
@ 2008-03-07 15:03 Ted Zlatanov
  0 siblings, 0 replies; only message in thread
From: Ted Zlatanov @ 2008-03-07 15:03 UTC (permalink / raw)
  To: Ding Mailing List

How would I get the first N unquoted lines of an article?  I couldn't
figure it out easily because of the many regular expressions involved in
each citing package.  I looked at gnus-cite.el but
gnus-cite-prefix-alist was not helpful, and gnus-dissect-cited-text
only works on the current article.  I tested with:

(defun gnus-extract-uncited-text-in-buffer (&optional buffer)
  (interactive "bBuffer to extract: \n")
  (let* ((gnus-article-buffer (or buffer gnus-article-buffer))
	 (sites (gnus-dissect-cited-text)) ; get it? sites, cites...  arghhhh
	 (text "")
	 (from (point-min)))
    (dolist (site sites)
      (let ((to (car-safe site))
	    (quote (cdr-safe site)))
	(when (string= quote "")
	  (debug to quote (buffer-substring from to)))
	(setq from to)))))

but it did not recognize the quoted regions separately.  Maybe it needs
the actual Gnus article buffer with its special setup?  In that case
it's not useful to me, because I need to extract those lines from any
text.

Ted



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-07 15:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-07 15:03 get the first N unquoted lines of the article Ted Zlatanov

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