From: GH <project@gnuhacker.org>
To: help-gnu-emacs@gnu.org
Subject: Re: functions to download mailing list archives
Date: Thu, 16 Jun 2022 14:27:59 +0200 [thread overview]
Message-ID: <87o7ys3i9c.fsf@gnu.org> (raw)
In-Reply-To: <87a6ad44oy.fsf@dataswamp.org> (Emanuel Berg's message of "Thu, 16 Jun 2022 06:23:25 +0200")
Emanuel Berg <incal@dataswamp.org> writes:
> Uh oh, I smell trouble! And the byte compiler says ...
> Warning: ‘beginning-of-buffer’ is for interactive use only;
> use ‘(goto-char (point-min))’ instead.
> Error: ‘add-to-list’ can’t use lexical var ‘url-list’; use
> ‘push’ or ‘cl-pushnew’
> Acutally I don't know if your were lexical, anyway it should
> be so regardless of whatever ...
yes I use lexical, fixed thanks
#+begin_src elisp
;;; -*- lexical-binding: t; -*-
(defun lists-mbox-url-list (url-head id date)
(with-current-buffer "*eww*"
(goto-char (point-min))
(let ((url-list '()))
(while (save-excursion
(text-property-search-forward 'shr-url nil nil t))
(shr-next-link)
(let ((url (thing-at-point 'url)))
(if (and url
(string-match (format "%s/archive/mbox/%s/%s\\(.+\\)" url-head id date)
url))
(push url url-list))))
url-list)))
#+end_src
> Warning: the function ‘eww-download-callback’ is not known to be
> defined.
uh? is a vanilla func
eww-download-callback is a compiled Lisp function in ‘eww.el’.
(eww-download-callback STATUS URL DIR)
> Warning: the function ‘shr-next-link’ is not known to be defined.
shr-next-link is an interactive compiled Lisp function in ‘shr.el’.
(shr-next-link)
Skip to the next link.
Now it compile without warnings for me
prev parent reply other threads:[~2022-06-16 12:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 22:30 functions to download mailing list archives GH
2022-06-12 23:04 ` Óscar Fuentes
2022-06-13 12:43 ` GH
2022-06-13 16:46 ` Óscar Fuentes
2022-06-13 18:41 ` GH
2022-06-13 22:09 ` Óscar Fuentes
2022-06-14 9:58 ` GH
2022-06-14 10:26 ` Emanuel Berg
2022-06-16 0:13 ` GH
2022-06-16 4:23 ` Emanuel Berg
2022-06-16 12:27 ` GH [this message]
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=87o7ys3i9c.fsf@gnu.org \
--to=project@gnuhacker.org \
--cc=help-gnu-emacs@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.