From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: org-feed-update doesn't understand the file name of a target Org-file when it is not a constant Date: Sat, 18 Jun 2011 23:12:12 +0200 Message-ID: <87pqmac09f.wl%dmaus@ictsoc.de> References: <1301421308331851@web3.yandex.ru> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sat_Jun_18_23:12:11_2011-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QY2oW-0002za-QY for emacs-orgmode@gnu.org; Sat, 18 Jun 2011 17:12:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QY2oV-0008V9-4p for emacs-orgmode@gnu.org; Sat, 18 Jun 2011 17:12:20 -0400 Received: from mailout114.xlhost.de ([213.202.242.114]:44985 helo=backup1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QY2oU-0008V3-NX for emacs-orgmode@gnu.org; Sat, 18 Jun 2011 17:12:18 -0400 In-Reply-To: <1301421308331851@web3.yandex.ru> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?B?0JXQstCz0LXQvdC40Lkg0JrRg9GA0LHQsNGC0L7Qsg==?= Cc: emacs-orgmode@gnu.org --pgp-sign-Multipart_Sat_Jun_18_23:12:11_2011-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable At Fri, 17 Jun 2011 21:30:51 +0400, =D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9 =D0=9A=D1=83=D1=80=D0=B1=D0=B0= =D1=82=D0=BE=D0=B2 wrote: >=20 > Hello! >=20 > I do some elisp code to download the latest RSS feeds from some resource: >=20 > (setq debug-on-error t) > (org-mode) > (org-feed-update > '("arxiv" > "http://export.arxiv.org/rss/astro-ph" > (concat "~/org/arxiv-" (format-time-string "%Y-%m-%d.org")) > "arXiv.org" > ) > ) >=20 > The goal is to get an unique Org file for feeds per day. However, the err= or is rising: >=20 > Debugger entered--Lisp error: (wrong-type-argument stringp (concat "~/org= /arxiv-" (format-time-string "%Y-%m-%d.org"))) > expand-file-name((concat "~/org/arxiv-" (format-time-string "%Y-%m-%d.o= rg"))) > find-file-noselect((concat "~/org/arxiv-" (format-time-string "%Y-%m-%d= .org")) nil nil nil) > find-file((concat "~/org/arxiv-" (format-time-string "%Y-%m-%d.org"))) > org-feed-goto-inbox-internal((concat "~/org/arxiv-" (format-time-string= "%Y-%m-%d.org")) "arXiv.org") > byte-code("\306 \"\307\n\"\310\311 > \"\211\312+\211,\203] >=20 > When I hardcode a string instead of (concat ...) everything is > ok. The subject is also not in format-time-string, it is exactly in > concat. The type returned by concat is the stringp, so the situation > is very strange. I also tried to use org-feed-alist, and local > variable instead of calling concat, nothing helps. The quote in front of ("arxiv" > '("arxiv" "quotes" the following list, i.e. Emacs does not evaluate the Lisp expressions inside the list but processes it as pure data.=20 To calculate the file name each time you call `org-feed-update' either leave out the quotes like: (org-feed-update (list "arxiv" "http://export.arxiv.org/rss/astro-ph" (conc= at =E2=80=A6 ))) -or- Use backquotes: http://www.gnu.org/s/emacs/manual/html_node/elisp/Backquote.html (org-feed-update `("arxiv" "http://export.arxiv.org/rss/astro-ph" ,(concat "~/org/arxiv-" (format-time-string "%Y-%m-%d.org")) "arXiv.org" ) ) The ` means: The following structure is data except the parts with the backquote ,. Best, -- David --=20 OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Sat_Jun_18_23:12:11_2011-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAk39FKsACgkQma24O1pEeOan8AD+I1pBGOsSst60Yod98VkaWlA4 0wU7L7xvpL0DUEuB3dMBAL6VwbyDBw8lgykWFr+C+vOfh0IIhkqa87+Go67SwNYn =eyXw -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sat_Jun_18_23:12:11_2011-1--