From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4P+AEnryA2B8UgAA0tVLHw (envelope-from ) for ; Sun, 17 Jan 2021 08:16:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0B1PDnryA2AFIgAAB5/wlQ (envelope-from ) for ; Sun, 17 Jan 2021 08:16:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 153FA94038F for ; Sun, 17 Jan 2021 08:16:57 +0000 (UTC) Received: from localhost ([::1]:57260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l13F0-0003gd-DF for larch@yhetil.org; Sun, 17 Jan 2021 03:16:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43816) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l13E8-0003gX-HH for emacs-orgmode@gnu.org; Sun, 17 Jan 2021 03:16:00 -0500 Received: from securemail-y48.synaq.com ([196.35.198.121]:54146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l13E5-0002TM-9x for emacs-orgmode@gnu.org; Sun, 17 Jan 2021 03:16:00 -0500 Received: from [197.95.154.214] (helo=DESKTOP-0T0U162) by securemail-pl-omx1.synaq.com with esmtps (TLS1.2) tls TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93.0.4-30-5edf9c7) (envelope-from ) id 1l13Dx-000ACn-MB; Sun, 17 Jan 2021 10:15:49 +0200 From: Raoul Comninos To: Ihor Radchenko Subject: Re: Feature request In-Reply-To: <87v9bww0gr.fsf@localhost> (message from Ihor Radchenko on Sun, 17 Jan 2021 14:18:12 +0800) Date: Sun, 17 Jan 2021 10:15:37 +0200 Message-ID: <86im7w3ro6.fsf@mweb.co.za> MIME-Version: 1.0 Content-Type: text/plain X-SYNAQ-Pinpoint-Information: Please contact SYNAQ for more information X-SYNAQ-Pinpoint-ID: 1l13Dx-000ACn-MB X-SYNAQ-Pinpoint: Found to be clean X-SYNAQ-Pinpoint-SpamCheck: not spam, SpamAssassin (not cached, score=-0.598, required 7, autolearn=disabled, DCC_REPUT_00_12 -0.80, FSL_HELO_NON_FQDN_1 0.00, HELO_NO_DOMAIN 0.00, RDNS_NONE 0.10, SPF_SOFTFAIL 0.10) X-Pinpoint-From: revrari@mweb.co.za Received-SPF: pass client-ip=196.35.198.121; envelope-from=revrari@mweb.co.za; helo=securemail-y48.synaq.com X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.26 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=mweb.co.za (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 153FA94038F X-Spam-Score: -2.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: /OCh7YCYzIRD Ihor Radchenko 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