From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +Dy7Ckx7oGL1ygAAbAwnHQ (envelope-from ) for ; Wed, 08 Jun 2022 12:34:52 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id UCSaCkx7oGJxgAAAauVa8A (envelope-from ) for ; Wed, 08 Jun 2022 12:34:52 +0200 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 CAA97165D9 for ; Wed, 8 Jun 2022 12:34:51 +0200 (CEST) Received: from localhost ([::1]:55594 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyt1W-00023X-FK for larch@yhetil.org; Wed, 08 Jun 2022 06:34:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyszR-00022h-M3 for emacs-orgmode@gnu.org; Wed, 08 Jun 2022 06:32:44 -0400 Received: from mout02.posteo.de ([185.67.36.66]:43039) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyszP-0008SK-3d for emacs-orgmode@gnu.org; Wed, 08 Jun 2022 06:32:41 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8DAF3240108 for ; Wed, 8 Jun 2022 12:32:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1654684353; bh=QGDck0rgjXt2Qqn6uwQd61vV1xLms8j3j4prjpBuLyo=; h=From:To:Cc:Subject:Date:From; b=eOdiusYPTAZBkbUq4j3gRppXsG/Vcwk37OjHZDLSajFZx8m57FbnGgJwSuYQc5edy 83orczO1unw+kwr7MM/umAWFnbUS/PIHXrDQJG/yuYO2sP0dOZoFhzbk6eeeL1elKU 70GXubnfJbL7sQNw2NyPj6wPIjnMpbxqlYaoLM9V89dJFswCjhVgRUuVPkq+kl5KsH 3Sg2MJuCfXXwlVeDLX4nwPqd5PAzk6zb1wr37dpbOn3/PiHLKheewTpFuOEZmRuFnW 3RibsrPm8ekW9hg3quQHO3OzeAcCpLwtOrHYJ2CjxsWc3D1LVtTW4svuN2AWhST2yq AdPT9yOdlLKFg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LJ3Sw6chzz6tmT; Wed, 8 Jun 2022 12:32:32 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Cletip Cletip Cc: orgmode Subject: Re: Org-attach for a directory References: Date: Wed, 08 Jun 2022 10:32:29 +0000 In-Reply-To: (Cletip Cletip's message of "Wed, 8 Jun 2022 11:59:35 +0200") Message-ID: <8735gfla2q.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654684491; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gc9GFYGxUgthdXThb/wvnx5i5SB6ob535Jg9Gyt5smU=; b=mqAmAthYz/KMijQEAnFhH71em1nLUXq6JnLL1RdOOyxriwemm+QiRDSoCW6U341t7PRAG4 I5d4PuiU1zB86Yi4q6o/c1yuEgi74JPaYTfowlVjitAEn38MO/j7HKuuO+AneNFggUgglb jp0ZFnMtv6htJCdqpQo1q3kHNKTKGi2tmi/X5N9RgVXBP2xH5gKTI3pxJ7A4s78AOYfXnk 2lAcPMl3oQk8RneSjVbpgYTR/Z/TW+0fPSOYohjFCmtSfPQ4QKa07aJuNqHGfSrdBhvMBP nm4XokgiEF5aH7k6vNdtORWj9B7V+geWgq5w3Q9KwLuNbQjL4r/CI6BEaE5jZw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654684491; a=rsa-sha256; cv=none; b=kHp7UMlHDgjw6UNBms6fZDAsuOqQcmLaponJt7BOyYWePMz9qMB14YQs4VqjraNTPU/7gE jRw6caJyddhafWgSAa231PkfBXR4owUlT6N2IOOvdLJm6WiaPGbuCHb9B7kw2CiLXDcwdW VbgTGEixfiwXH0kJasJywwoyGGNel7wY08O3CHcjxKNOjq1qFj1N1kCfeglGqMdZKWocUB CD6AVUox4yF4ZnJ+4FBOaxrs44lYqgXdMIR0t3hNnef3cGNw6k4ZDGoCY/P44cOPtGGZrM pDP2PjYPqv/oq0XqA07K3RpVbHvmnZdtmoJk5LqIJZDvWDIWH/qMlYXLOuknFQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=eOdiusYP; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=eOdiusYP; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CAA97165D9 X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: GEyuFEqLAPL0 Hi, Cletip Cletip writes: > My question is in the object : can we attach a directory to a heading? > If yes, how, if not, why. Can we solve the problem? I have in my init the following modification to the org-attach-attach function so that I can copy a directory. I have replaced the line ((eq method 'cp) (copy-file file attach-file)) with this: ((eq method 'cp) (if (file-directory-p file) (copy-directory file attach-file) (copy-file file attach-file))) You can override the old function with advice-add: (advice-add 'org-attach-attach :override 'my-new-org-attach-attach) > Subsidiary question: > Can we use org-attach as a filesystem? > Thanks in advance for your future answers Can you please elaborate more? In my case, I use org-attach almost as a replacement for my folder system (ie org nodes have come to replace directories, and many nodes have a folder attached); I access the nodes via org-ql/helm-org-ql (https://github.com/alphapapa/org-ql). It's very productive. Best regards, Juan Manuel