Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: Ding Mailing List <ding@gnus.org>
Subject: get the first N unquoted lines of the article
Date: Fri, 07 Mar 2008 09:03:19 -0600	[thread overview]
Message-ID: <86ablay3t4.fsf@lifelogs.com> (raw)

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



                 reply	other threads:[~2008-03-07 15:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=86ablay3t4.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --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).