nnweb.el 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. ;;; nnweb.el --- retrieving articles via web search engines
  2. ;; Copyright (C) 1996-2012 Free Software Foundation, Inc.
  3. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
  4. ;; Keywords: news
  5. ;; This file is part of GNU Emacs.
  6. ;; GNU Emacs is free software: you can redistribute it and/or modify
  7. ;; it under the terms of the GNU General Public License as published by
  8. ;; the Free Software Foundation, either version 3 of the License, or
  9. ;; (at your option) any later version.
  10. ;; GNU Emacs is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;; GNU General Public License for more details.
  14. ;; You should have received a copy of the GNU General Public License
  15. ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  16. ;;; Commentary:
  17. ;; Note: You need to have `w3' installed for some functions to work.
  18. ;;; Code:
  19. (eval-when-compile (require 'cl))
  20. (require 'nnoo)
  21. (require 'message)
  22. (require 'gnus-util)
  23. (require 'gnus)
  24. (require 'nnmail)
  25. (require 'mm-util)
  26. (require 'mm-url)
  27. (eval-and-compile
  28. (ignore-errors
  29. (require 'url)))
  30. (autoload 'w3-parse-buffer "w3-parse")
  31. (nnoo-declare nnweb)
  32. (defvoo nnweb-directory (nnheader-concat gnus-directory "nnweb/")
  33. "Where nnweb will save its files.")
  34. (defvoo nnweb-type 'google
  35. "What search engine type is being used.
  36. Valid types include `google', `dejanews', and `gmane'.")
  37. (defvar nnweb-type-definition
  38. '((google
  39. (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
  40. (result . "http://groups.google.com/group/%s/msg/%s?dmode=source")
  41. (article . nnweb-google-wash-article)
  42. (reference . identity)
  43. (map . nnweb-google-create-mapping)
  44. (search . nnweb-google-search)
  45. (address . "http://groups.google.com/groups")
  46. (base . "http://groups.google.com")
  47. (identifier . nnweb-google-identity))
  48. (dejanews ;; alias of google
  49. (id . "http://www.google.com/groups?as_umsgid=%s&hl=en&dmode=source")
  50. (result . "http://groups.google.com/group/%s/msg/%s?dmode=source")
  51. (article . nnweb-google-wash-article)
  52. (reference . identity)
  53. (map . nnweb-google-create-mapping)
  54. (search . nnweb-google-search)
  55. (address . "http://groups.google.com/groups")
  56. (base . "http://groups.google.com")
  57. (identifier . nnweb-google-identity))
  58. (gmane
  59. (article . nnweb-gmane-wash-article)
  60. (id . "http://gmane.org/view.php?group=%s")
  61. (reference . identity)
  62. (map . nnweb-gmane-create-mapping)
  63. (search . nnweb-gmane-search)
  64. (address . "http://search.gmane.org/nov.php")
  65. (identifier . nnweb-gmane-identity)))
  66. "Type-definition alist.")
  67. (defvoo nnweb-search nil
  68. "Search string to feed to Google.")
  69. (defvoo nnweb-max-hits 999
  70. "Maximum number of hits to display.")
  71. (defvoo nnweb-ephemeral-p nil
  72. "Whether this nnweb server is ephemeral.")
  73. ;;; Internal variables
  74. (defvoo nnweb-articles nil)
  75. (defvoo nnweb-buffer nil)
  76. (defvoo nnweb-group-alist nil)
  77. (defvoo nnweb-group nil)
  78. (defvoo nnweb-hashtb nil)
  79. ;;; Interface functions
  80. (nnoo-define-basics nnweb)
  81. (deffoo nnweb-retrieve-headers (articles &optional group server fetch-old)
  82. (nnweb-possibly-change-server group server)
  83. (with-current-buffer nntp-server-buffer
  84. (erase-buffer)
  85. (let (article header)
  86. (mm-with-unibyte-current-buffer
  87. (while (setq article (pop articles))
  88. (when (setq header (cadr (assq article nnweb-articles)))
  89. (nnheader-insert-nov header))))
  90. 'nov)))
  91. (deffoo nnweb-request-scan (&optional group server)
  92. (nnweb-possibly-change-server group server)
  93. (if nnweb-ephemeral-p
  94. (setq nnweb-hashtb (gnus-make-hashtable 4095))
  95. (unless nnweb-articles
  96. (nnweb-read-overview group)))
  97. (funcall (nnweb-definition 'map))
  98. (unless nnweb-ephemeral-p
  99. (nnweb-write-active)
  100. (nnweb-write-overview group)))
  101. (deffoo nnweb-request-group (group &optional server dont-check info)
  102. (nnweb-possibly-change-server group server)
  103. (unless (or nnweb-ephemeral-p
  104. dont-check
  105. nnweb-articles)
  106. (nnweb-read-overview group))
  107. (cond
  108. ((not nnweb-articles)
  109. (nnheader-report 'nnweb "No matching articles"))
  110. (t
  111. (let ((active (if nnweb-ephemeral-p
  112. (cons (caar nnweb-articles)
  113. (caar (last nnweb-articles)))
  114. (cadr (assoc group nnweb-group-alist)))))
  115. (nnheader-report 'nnweb "Opened group %s" group)
  116. (nnheader-insert
  117. "211 %d %d %d %s\n" (length nnweb-articles)
  118. (car active) (cdr active) group)))))
  119. (deffoo nnweb-close-group (group &optional server)
  120. (nnweb-possibly-change-server group server)
  121. (when (gnus-buffer-live-p nnweb-buffer)
  122. (with-current-buffer nnweb-buffer
  123. (set-buffer-modified-p nil)
  124. (kill-buffer nnweb-buffer)))
  125. t)
  126. (deffoo nnweb-request-article (article &optional group server buffer)
  127. (nnweb-possibly-change-server group server)
  128. (with-current-buffer (or buffer nntp-server-buffer)
  129. (let* ((header (cadr (assq article nnweb-articles)))
  130. (url (and header (mail-header-xref header))))
  131. (when (or (and url
  132. (mm-with-unibyte-current-buffer
  133. (mm-url-insert url)))
  134. (and (stringp article)
  135. (nnweb-definition 'id t)
  136. (let ((fetch (nnweb-definition 'id))
  137. art active)
  138. (when (string-match "^<\\(.*\\)>$" article)
  139. (setq art (match-string 1 article)))
  140. (when (and fetch art)
  141. (setq url (format fetch
  142. (mm-url-form-encode-xwfu art)))
  143. (mm-with-unibyte-current-buffer
  144. (mm-url-insert url))
  145. (if (nnweb-definition 'reference t)
  146. (setq article
  147. (funcall (nnweb-definition
  148. 'reference) article)))))))
  149. (unless nnheader-callback-function
  150. (funcall (nnweb-definition 'article)))
  151. (nnheader-report 'nnweb "Fetched article %s" article)
  152. (cons group (and (numberp article) article))))))
  153. (deffoo nnweb-close-server (&optional server)
  154. (when (and (nnweb-server-opened server)
  155. (gnus-buffer-live-p nnweb-buffer))
  156. (with-current-buffer nnweb-buffer
  157. (set-buffer-modified-p nil)
  158. (kill-buffer nnweb-buffer)))
  159. (nnoo-close-server 'nnweb server))
  160. (deffoo nnweb-request-list (&optional server)
  161. (nnweb-possibly-change-server nil server)
  162. (with-current-buffer nntp-server-buffer
  163. (nnmail-generate-active (list (assoc server nnweb-group-alist)))
  164. t))
  165. (deffoo nnweb-request-update-info (group info &optional server))
  166. (deffoo nnweb-asynchronous-p ()
  167. nil)
  168. (deffoo nnweb-request-create-group (group &optional server args)
  169. (nnweb-possibly-change-server nil server)
  170. (nnweb-request-delete-group group)
  171. (push `(,group ,(cons 1 0)) nnweb-group-alist)
  172. (nnweb-write-active)
  173. t)
  174. (deffoo nnweb-request-delete-group (group &optional force server)
  175. (nnweb-possibly-change-server group server)
  176. (gnus-alist-pull group nnweb-group-alist t)
  177. (nnweb-write-active)
  178. (gnus-delete-file (nnweb-overview-file group))
  179. t)
  180. (nnoo-define-skeleton nnweb)
  181. ;;; Internal functions
  182. (defun nnweb-read-overview (group)
  183. "Read the overview of GROUP and build the map."
  184. (when (file-exists-p (nnweb-overview-file group))
  185. (mm-with-unibyte-buffer
  186. (nnheader-insert-file-contents (nnweb-overview-file group))
  187. (goto-char (point-min))
  188. (let (header)
  189. (while (not (eobp))
  190. (setq header (nnheader-parse-nov))
  191. (forward-line 1)
  192. (push (list (mail-header-number header)
  193. header (mail-header-xref header))
  194. nnweb-articles)
  195. (nnweb-set-hashtb header (car nnweb-articles)))))))
  196. (defun nnweb-write-overview (group)
  197. "Write the overview file for GROUP."
  198. (with-temp-file (nnweb-overview-file group)
  199. (let ((articles nnweb-articles))
  200. (while articles
  201. (nnheader-insert-nov (cadr (pop articles)))))))
  202. (defun nnweb-set-hashtb (header data)
  203. (gnus-sethash (nnweb-identifier (mail-header-xref header))
  204. data nnweb-hashtb))
  205. (defun nnweb-get-hashtb (url)
  206. (gnus-gethash (nnweb-identifier url) nnweb-hashtb))
  207. (defun nnweb-identifier (ident)
  208. (funcall (nnweb-definition 'identifier) ident))
  209. (defun nnweb-overview-file (group)
  210. "Return the name of the overview file of GROUP."
  211. (nnheader-concat nnweb-directory group ".overview"))
  212. (defun nnweb-write-active ()
  213. "Save the active file."
  214. (gnus-make-directory nnweb-directory)
  215. (with-temp-file (nnheader-concat nnweb-directory "active")
  216. (prin1 `(setq nnweb-group-alist ',nnweb-group-alist) (current-buffer))))
  217. (defun nnweb-read-active ()
  218. "Read the active file."
  219. (load (nnheader-concat nnweb-directory "active") t t t))
  220. (defun nnweb-definition (type &optional noerror)
  221. "Return the definition of TYPE."
  222. (let ((def (cdr (assq type (assq nnweb-type nnweb-type-definition)))))
  223. (when (and (not def)
  224. (not noerror))
  225. (error "Undefined definition %s" type))
  226. def))
  227. (defun nnweb-possibly-change-server (&optional group server)
  228. (when server
  229. (unless (nnweb-server-opened server)
  230. (nnweb-open-server server))
  231. (nnweb-init server))
  232. (unless nnweb-group-alist
  233. (nnweb-read-active))
  234. (unless nnweb-hashtb
  235. (setq nnweb-hashtb (gnus-make-hashtable 4095)))
  236. (when group
  237. (setq nnweb-group group)))
  238. (defun nnweb-init (server)
  239. "Initialize buffers and such."
  240. (unless (gnus-buffer-live-p nnweb-buffer)
  241. (setq nnweb-buffer
  242. (save-current-buffer
  243. (nnheader-set-temp-buffer
  244. (format " *nnweb %s %s %s*"
  245. nnweb-type nnweb-search server))
  246. (mm-disable-multibyte)
  247. (current-buffer)))))
  248. ;;;
  249. ;;; groups.google.com
  250. ;;;
  251. (defun nnweb-google-wash-article ()
  252. ;; We have Google's masked e-mail addresses here. :-/
  253. (let ((case-fold-search t)
  254. (start-re "<pre>[\r\n ]*")
  255. (end-re "[\r\n ]*</pre>"))
  256. (goto-char (point-min))
  257. (if (save-excursion
  258. (or (re-search-forward "The requested message.*could not be found."
  259. nil t)
  260. (not (and (re-search-forward start-re nil t)
  261. (re-search-forward end-re nil t)))))
  262. ;; FIXME: Don't know how to indicate "not found".
  263. ;; Should this function throw an error? --rsteib
  264. (progn
  265. (gnus-message 3 "Requested article not found")
  266. (erase-buffer))
  267. (delete-region (point-min)
  268. (re-search-forward start-re))
  269. (goto-char (point-min))
  270. (delete-region (progn
  271. (re-search-forward end-re)
  272. (match-beginning 0))
  273. (point-max))
  274. (mm-url-decode-entities))))
  275. (defun nnweb-google-parse-1 (&optional Message-ID)
  276. "Parse search result in current buffer."
  277. (let ((i 0)
  278. (case-fold-search t)
  279. (active (cadr (assoc nnweb-group nnweb-group-alist)))
  280. Subject Score Date Newsgroups From
  281. map url mid)
  282. (unless active
  283. (push (list nnweb-group (setq active (cons 1 0)))
  284. nnweb-group-alist))
  285. ;; Go through all the article hits on this page.
  286. (goto-char (point-min))
  287. (while
  288. (re-search-forward
  289. "a +href=\"/group/\\([^>\"]+\\)/browse_thread/[^>]+#\\([0-9a-f]+\\)"
  290. nil t)
  291. (setq Newsgroups (match-string-no-properties 1)
  292. ;; Note: Starting with Google Groups 2, `mid' is a Google-internal
  293. ;; ID, not a proper Message-ID.
  294. mid (match-string-no-properties 2)
  295. url (format
  296. (nnweb-definition 'result) Newsgroups mid))
  297. (narrow-to-region (search-forward ">" nil t)
  298. (search-forward "</a>" nil t))
  299. (mm-url-remove-markup)
  300. (mm-url-decode-entities)
  301. (setq Subject (buffer-string))
  302. (goto-char (point-max))
  303. (widen)
  304. (narrow-to-region (point)
  305. (search-forward "</table" nil t))
  306. (mm-url-remove-markup)
  307. (mm-url-decode-entities)
  308. (goto-char (point-max))
  309. (when
  310. (re-search-backward
  311. "^\\(?:\\(\\w+\\) \\([0-9]+\\)\\|\\S-+\\)\\(?: \\([0-9]\\{4\\}\\)\\)? by ?\\(.*\\)"
  312. nil t)
  313. (setq Date (if (match-string 1)
  314. (format "%s %s 00:00:00 %s"
  315. (match-string 1)
  316. (match-string 2)
  317. (or (match-string 3)
  318. (substring (current-time-string) -4)))
  319. (current-time-string)))
  320. (setq From (match-string 4)))
  321. (widen)
  322. (incf i)
  323. (unless (nnweb-get-hashtb url)
  324. (push
  325. (list
  326. (incf (cdr active))
  327. (make-full-mail-header
  328. (cdr active) (if Newsgroups
  329. (concat "(" Newsgroups ") " Subject)
  330. Subject)
  331. From Date (or Message-ID mid)
  332. nil 0 0 url))
  333. map)
  334. (nnweb-set-hashtb (cadar map) (car map))))
  335. map))
  336. (defun nnweb-google-reference (id)
  337. (let ((map (nnweb-google-parse-1 id)) header)
  338. (setq nnweb-articles
  339. (nconc nnweb-articles map))
  340. (when (setq header (cadar map))
  341. (mm-with-unibyte-current-buffer
  342. (mm-url-insert (mail-header-xref header)))
  343. (caar map))))
  344. (defun nnweb-google-create-mapping ()
  345. "Perform the search and create a number-to-url alist."
  346. (with-current-buffer nnweb-buffer
  347. (erase-buffer)
  348. (nnheader-message 7 "Searching google...")
  349. (when (funcall (nnweb-definition 'search) nnweb-search)
  350. (let ((more t)
  351. (i 0))
  352. (while more
  353. (setq nnweb-articles
  354. (nconc nnweb-articles (nnweb-google-parse-1)))
  355. ;; Check if there are more articles to fetch
  356. (goto-char (point-min))
  357. (incf i 100)
  358. (if (or (not (re-search-forward
  359. "<a [^>]+href=\"\n?\\([^>\" \n\t]+\\)[^<]*<img[^>]+src=[^>]+next"
  360. nil t))
  361. (>= i nnweb-max-hits))
  362. (setq more nil)
  363. ;; Yup, there are more articles
  364. (setq more (concat (nnweb-definition 'base) (match-string 1)))
  365. (when more
  366. (erase-buffer)
  367. (nnheader-message 7 "Searching google...(%d)" i)
  368. (mm-url-insert more))))
  369. ;; Return the articles in the right order.
  370. (nnheader-message 7 "Searching google...done")
  371. (setq nnweb-articles
  372. (sort nnweb-articles 'car-less-than-car))))))
  373. (defun nnweb-google-search (search)
  374. (mm-url-insert
  375. (concat
  376. (nnweb-definition 'address)
  377. "?"
  378. (mm-url-encode-www-form-urlencoded
  379. `(("q" . ,search)
  380. ("num" . ,(number-to-string
  381. (min 100 nnweb-max-hits)))
  382. ("hq" . "")
  383. ("hl" . "en")
  384. ("lr" . "")
  385. ("safe" . "off")
  386. ("sites" . "groups")
  387. ("filter" . "0")))))
  388. t)
  389. (defun nnweb-google-identity (url)
  390. "Return an unique identifier based on URL."
  391. (if (string-match "selm=\\([^ &>]+\\)" url)
  392. (match-string 1 url)
  393. url))
  394. ;;;
  395. ;;; gmane.org
  396. ;;;
  397. (defun nnweb-gmane-create-mapping ()
  398. "Perform the search and create a number-to-url alist."
  399. (with-current-buffer nnweb-buffer
  400. (let ((case-fold-search t)
  401. (active (or (cadr (assoc nnweb-group nnweb-group-alist))
  402. (cons 1 0)))
  403. map)
  404. (erase-buffer)
  405. (nnheader-message 7 "Searching Gmane..." )
  406. (when (funcall (nnweb-definition 'search) nnweb-search)
  407. (goto-char (point-min))
  408. ;; Skip the status line
  409. (forward-line 1)
  410. ;; Thanks to Olly Betts we now have NOV lines in our buffer!
  411. (while (not (eobp))
  412. (unless (or (eolp) (looking-at "\x0d"))
  413. (let ((header (nnheader-parse-nov)))
  414. (let ((xref (mail-header-xref header))
  415. (from (mail-header-from header))
  416. (subject (mail-header-subject header))
  417. (rfc2047-encoding-type 'mime))
  418. (when (string-match " \\([^:]+\\)[:/]\\([0-9]+\\)" xref)
  419. (mail-header-set-xref
  420. header
  421. (format "http://article.gmane.org/%s/%s/raw"
  422. (match-string 1 xref)
  423. (match-string 2 xref))))
  424. ;; Add host part to gmane-encrypted addresses
  425. (when (string-match "@$" from)
  426. (mail-header-set-from header
  427. (concat from "public.gmane.org")))
  428. (mail-header-set-subject header
  429. (rfc2047-encode-string subject))
  430. (unless (nnweb-get-hashtb (mail-header-xref header))
  431. (mail-header-set-number header (incf (cdr active)))
  432. (push (list (mail-header-number header) header) map)
  433. (nnweb-set-hashtb (cadar map) (car map))))))
  434. (forward-line 1)))
  435. (nnheader-message 7 "Searching Gmane...done")
  436. (setq nnweb-articles
  437. (sort (nconc nnweb-articles map) 'car-less-than-car)))))
  438. (defun nnweb-gmane-wash-article ()
  439. (let ((case-fold-search t))
  440. (goto-char (point-min))
  441. (when (search-forward "<!--X-Head-of-Message-->" nil t)
  442. (delete-region (point-min) (point))
  443. (goto-char (point-min))
  444. (while (looking-at "^<li><em>\\([^ ]+\\)</em>.*</li>")
  445. (replace-match "\\1\\2" t)
  446. (forward-line 1))
  447. (mm-url-remove-markup))))
  448. (defun nnweb-gmane-search (search)
  449. (mm-url-insert
  450. (concat
  451. (nnweb-definition 'address)
  452. "?"
  453. (mm-url-encode-www-form-urlencoded
  454. `(("query" . ,search)
  455. ("HITSPERPAGE" . ,(number-to-string nnweb-max-hits))
  456. ;;("TOPDOC" . "1000")
  457. ))))
  458. (setq buffer-file-name nil)
  459. (unless (featurep 'xemacs) (set-buffer-multibyte t))
  460. (mm-decode-coding-region (point-min) (point-max) 'utf-8)
  461. t)
  462. (defun nnweb-gmane-identity (url)
  463. "Return a unique identifier based on URL."
  464. (if (string-match "group=\\(.+\\)" url)
  465. (match-string 1 url)
  466. url))
  467. ;;;
  468. ;;; General web/w3 interface utility functions
  469. ;;;
  470. (defun nnweb-insert-html (parse)
  471. "Insert HTML based on a w3 parse tree."
  472. (if (stringp parse)
  473. ;; We used to call nnheader-string-as-multibyte here, but it cannot
  474. ;; be right, so I removed it. If a bug shows up because of this change,
  475. ;; please do not blindly revert the change, but help me find the real
  476. ;; cause of the bug instead. --Stef
  477. (insert parse)
  478. (insert "<" (symbol-name (car parse)) " ")
  479. (insert (mapconcat
  480. (lambda (param)
  481. (concat (symbol-name (car param)) "="
  482. (prin1-to-string
  483. (if (consp (cdr param))
  484. (cadr param)
  485. (cdr param)))))
  486. (nth 1 parse)
  487. " "))
  488. (insert ">\n")
  489. (mapc 'nnweb-insert-html (nth 2 parse))
  490. (insert "</" (symbol-name (car parse)) ">\n")))
  491. (defun nnweb-parse-find (type parse &optional maxdepth)
  492. "Find the element of TYPE in PARSE."
  493. (catch 'found
  494. (nnweb-parse-find-1 type parse maxdepth)))
  495. (defun nnweb-parse-find-1 (type contents maxdepth)
  496. (when (or (null maxdepth)
  497. (not (zerop maxdepth)))
  498. (when (consp contents)
  499. (when (eq (car contents) type)
  500. (throw 'found contents))
  501. (when (listp (cdr contents))
  502. (dolist (element contents)
  503. (when (consp element)
  504. (nnweb-parse-find-1 type element
  505. (and maxdepth (1- maxdepth)))))))))
  506. (defun nnweb-parse-find-all (type parse)
  507. "Find all elements of TYPE in PARSE."
  508. (catch 'found
  509. (nnweb-parse-find-all-1 type parse)))
  510. (defun nnweb-parse-find-all-1 (type contents)
  511. (let (result)
  512. (when (consp contents)
  513. (if (eq (car contents) type)
  514. (push contents result)
  515. (when (listp (cdr contents))
  516. (dolist (element contents)
  517. (when (consp element)
  518. (setq result
  519. (nconc result (nnweb-parse-find-all-1 type element))))))))
  520. result))
  521. (defvar nnweb-text)
  522. (defun nnweb-text (parse)
  523. "Return a list of text contents in PARSE."
  524. (let ((nnweb-text nil))
  525. (nnweb-text-1 parse)
  526. (nreverse nnweb-text)))
  527. (defun nnweb-text-1 (contents)
  528. (dolist (element contents)
  529. (if (stringp element)
  530. (push element nnweb-text)
  531. (when (and (consp element)
  532. (listp (cdr element)))
  533. (nnweb-text-1 element)))))
  534. (provide 'nnweb)
  535. ;;; nnweb.el ends here