From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66451 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: get the first N unquoted lines of the article Date: Fri, 07 Mar 2008 09:03:19 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86ablay3t4.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204902211 24258 80.91.229.12 (7 Mar 2008 15:03:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Mar 2008 15:03:31 +0000 (UTC) To: Ding Mailing List Original-X-From: ding-owner+M14942@lists.math.uh.edu Fri Mar 07 16:03:55 2008 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1JXe6b-0001c4-BS for ding-account@gmane.org; Fri, 07 Mar 2008 16:03:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1JXe4v-00038t-O5; Fri, 07 Mar 2008 09:01:45 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1JXe4u-00038d-1U for ding@lists.math.uh.edu; Fri, 07 Mar 2008 09:01:44 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1JXe4o-0005Hk-0W for ding@lists.math.uh.edu; Fri, 07 Mar 2008 09:01:43 -0600 Original-Received: from mail.blockstar.com ([170.224.69.95]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1JXe4u-0006Hr-00 for ; Fri, 07 Mar 2008 16:01:44 +0100 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com (unknown [38.98.147.130]) by mail.blockstar.com (Postfix) with ESMTP id 9B6D53F8E99 for ; Fri, 7 Mar 2008 07:03:33 -0800 (PST) X-Hashcash: 1:20:080307:ding@gnus.org::eyT7TtAZJ9CnmGxp:00005GWI X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux) X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:66451 Archived-At: 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