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 aI2dAzj8A2AfIAAA0tVLHw (envelope-from ) for ; Sun, 17 Jan 2021 08:58:32 +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 PPH0Ojf8A2BiRwAAB5/wlQ (envelope-from ) for ; Sun, 17 Jan 2021 08:58:31 +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 23CAE9404DF for ; Sun, 17 Jan 2021 08:58:30 +0000 (UTC) Received: from localhost ([::1]:33846 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l13tF-00084O-3j for larch@yhetil.org; Sun, 17 Jan 2021 03:58:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l13sc-000846-9Z for emacs-orgmode@gnu.org; Sun, 17 Jan 2021 03:57:50 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:35118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l13sa-0004c9-Qy for emacs-orgmode@gnu.org; Sun, 17 Jan 2021 03:57:50 -0500 Received: by mail-pl1-x62d.google.com with SMTP id g3so6974381plp.2 for ; Sun, 17 Jan 2021 00:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=Cl7cIp9OoXDYNhG1fsMczoA4yIEYHqOJnGZyJKlWfAU=; b=iiCpX/mPEj3REh9L9QcsHQKopx+ezNv64a3GDA1vi1YU+iJVf8A4RHKEowH2RH77y2 XQv3pEDHiEbfzD3Mcz9H9TGTy0lWC6IQFbCwzLSLU0bHFYxwPcmQIWUU8/8KYQ57aLeO kEkcrBJhYJDczCW8Sbvi0iRjiU1PvAYroc1BotxmlQeM1phaD9G3GmJkVi3OstWnLRmp cJB/fn6V7ZkflKdvl++5V9kONjXfeIZ0IW5Syo+BAnMuyGHeQmvfbh9ZdL5bPY+6U9fW pvVSkwhxE+Ikeh8dG1PlySv2QwWuUS4/o2b89Q3OKJ54jBtXPOjvz15cMngxDJlT4W0D 3pAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=Cl7cIp9OoXDYNhG1fsMczoA4yIEYHqOJnGZyJKlWfAU=; b=fxzYSg11iOYF6qayqeDKj4RqZmAC+syrZEtItVfeXltGqTWft0V9eDZGywU7HXUj3y 21CDVpK3QBcdiZ2t6ySwgoTWtQXNzc8z1OEt8l67MuiQQ6c6+x0wWKEOPam7rxGqmPPW 7T4EUYamGg6tr7OrgzxH02Czb1VnLCVV6FJDtGkyFKwrU8lqPG6BCWma/4oAOldsP9v8 oQWRLtP4h12TTUeqWPx5u7iu9J6X4PovOfDITQzieUXn5t75o5XDPossCVaPV/GJTrsn 8TUv0R1BVJXwQD3tbZocNeSURe8n0LzWiYiZXkU3nEITDS4TyrMjr1k6Hwv3gEoHaseB CD5g== X-Gm-Message-State: AOAM533TobPdmndVAVz3Oe5UUuPL9/Cp5AZT0I98BkAZh2HJ/YguITdI q5f/jB44weqEU8b1nQwnBNs= X-Google-Smtp-Source: ABdhPJz5Wkd0WOXMGNqHSc4SHOwYr8kUqw0xC3CQ0dCGGnD2wCz43uHxaJhh2n6pm0Lczcaw2PUxVA== X-Received: by 2002:a17:902:e808:b029:de:5a8d:c654 with SMTP id u8-20020a170902e808b02900de5a8dc654mr16072951plg.80.1610873867312; Sun, 17 Jan 2021 00:57:47 -0800 (PST) Received: from localhost ([192.200.115.226]) by smtp.gmail.com with ESMTPSA id gf23sm12987407pjb.48.2021.01.17.00.57.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 00:57:46 -0800 (PST) From: Ihor Radchenko To: Raoul Comninos Subject: Re: Feature request In-Reply-To: <86im7w3ro6.fsf@mweb.co.za> References: <86im7w3ro6.fsf@mweb.co.za> Date: Sun, 17 Jan 2021 17:01:53 +0800 Message-ID: <87sg70vsvy.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62d.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b="iiCpX/mP"; dmarc=pass (policy=none) header.from=gmail.com; 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: 23CAE9404DF X-Spam-Score: -2.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: If7nmvEo6UYO Raoul Comninos writes: > 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? You can try: (defun org-attach-save-file-list-to-property (dir) "Save list of attachments to ORG_ATTACH_FILES property." (when-let* ((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) Also, note that the list of files will only be updated if you attach/delete files calling org-attach. If you change the attachment folder manually, you will need to run M-x org-attach-sync. Best, Ihor