emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Raoul Comninos <revrari@mweb.co.za>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Feature request
Date: Sun, 17 Jan 2021 10:15:37 +0200	[thread overview]
Message-ID: <86im7w3ro6.fsf@mweb.co.za> (raw)
In-Reply-To: <87v9bww0gr.fsf@localhost> (message from Ihor Radchenko on Sun, 17 Jan 2021 14:18:12 +0800)

Ihor Radchenko <yantar92@gmail.com> writes:

> I think something like the following will do (untested):
>
> (defun org-attach-save-file-list-to-property ()
>   "Save list of attachments to ORG_ATTACH_FILES property."
>   (when-let* ((dir (org-attach-dir))
> 	      (files (org-attach-file-list dir)))
>     (org-set-property "ORG_ATTACH_FILES" (mapconcat #'identity files ", "))))
> (add-hook 'org-attach-after-change-hook #'org-attach-save-file-list-to-property)
>
> Best,
> Ihor

I have copied the code to my dot Emacs, but now when I try to add an attachment now, it generates this error:

run-hook-with-args: Wrong number of arguments: (lambda nil "Save list of
attachments to ORG_ATTACH_FILES property." (when-let* ((dir
(org-attach-dir)) (files (org-attach-file-list dir))) (org-set-property
"ORG_ATTACH_FILES" (mapconcat #'identity files ", ")))), 1

Can you help me with this?

Kind regards,
Raoul Comninos 



  reply	other threads:[~2021-01-17  8:16 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 17:01 Feature request Raoul Comninos
2021-01-17  5:30 ` Ihor Radchenko
2021-01-17  5:33   ` Raoul Comninos
2021-01-17  6:12     ` Ihor Radchenko
2021-01-17  6:18       ` Ihor Radchenko
2021-01-17  8:15         ` Raoul Comninos [this message]
2021-01-17  9:01           ` Ihor Radchenko
2021-01-17  9:20             ` Raoul Comninos
2021-01-18  2:17               ` Ihor Radchenko
2021-01-18  8:19                 ` Detlef Steuer
2021-01-18  1:46             ` Raoul Comninos
2021-01-18  2:19               ` Ihor Radchenko
2021-01-17  5:31 ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2013-06-25 15:22 feature request 42 147
2013-06-25 16:11 ` Christian Moe
2013-06-25 16:29   ` François Pinard
2013-06-25 18:31     ` Michael Brand
2011-07-18 21:36 Jude DaShiell
2011-07-18 23:13 ` Bastien
2011-07-19 12:10 ` MidLifeXis at PerlMonks
2010-10-10 13:50 Feature request David Abrahams
2010-10-10 15:43 ` Bernt Hansen
2010-10-10 18:03   ` David Abrahams
2010-10-10 16:30 ` Memnon Anon
2010-10-10 18:12 ` Juan Pechiar
2010-10-11  7:21 ` Carsten Dominik
2010-10-11 14:18   ` David Abrahams
2011-01-15 12:13   ` Bastien
2009-03-23  2:14 feature request Robert D. Crawford
2009-03-23  2:44 ` Matthew Lundin
2009-03-23 13:56   ` Robert D. Crawford
2009-03-23 11:24 ` Sebastian Rose
2009-03-24 16:53   ` Robert D. Crawford
2009-03-25 13:50     ` Charles Philip Chan
2009-03-25 14:51       ` Robert D. Crawford
2009-03-26  4:09 ` Carsten Dominik
2009-03-26 16:43   ` Robert D. Crawford
2007-11-18 18:13 Raimund Kohl-Füchsle
2007-11-19  3:14 ` Bastien
2006-09-25 23:58 Feature Request Russell Adams
2006-09-26 12:37 ` Carsten Dominik
2006-09-27 15:09   ` Russell Adams
2007-02-08 16:05     ` Russell Adams
2007-02-08 16:46       ` Carsten Dominik

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86im7w3ro6.fsf@mweb.co.za \
    --to=revrari@mweb.co.za \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).