From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 7PYLIqOGFmBTMwAA0tVLHw (envelope-from ) for ; Sun, 31 Jan 2021 10:29:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4iZqHaOGFmBeMQAA1q6Kng (envelope-from ) for ; Sun, 31 Jan 2021 10:29:55 +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 EFF459404C2 for ; Sun, 31 Jan 2021 10:29:54 +0000 (UTC) Received: from localhost ([::1]:43012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l69zM-0004lX-Nq for larch@yhetil.org; Sun, 31 Jan 2021 05:29:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l69z0-0004lN-7h for emacs-orgmode@gnu.org; Sun, 31 Jan 2021 05:29:30 -0500 Received: from mout01.posteo.de ([185.67.36.65]:33024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l69yx-0003or-Nr for emacs-orgmode@gnu.org; Sun, 31 Jan 2021 05:29:29 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 7730316005F for ; Sun, 31 Jan 2021 11:29:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1612088962; bh=jB3zLgFX9tlw0HTUqz1Uo9r6M+O8XLv/6wd1fMyVY+E=; h=From:To:Cc:Subject:Date:From; b=MbNO7TGZJt1CsTK0wmEflhphf2+y9MO1Nn0kOr1Yd+5yEZcLmp8jdsDAPAiBpDQ7h i4LZRNYCJcl0bcxlL6YQp/GJUulu3WIVnn9DSTR0JaazCCCHqijo30NEM8/0MOj++l /I245A+uM1H5M1xOEkip79587QGfkRlSQ2XnmIqzudgjagUT+o/R3KjuztGtvFg2Pa x6wqOA3KPAm89xECBQWa0Axel2iRzRLOg4lGszCWO7Y83tJq57+Q6FRmVTGOX3L25Y 7TilA8u5fBmXW+o0PLwonzTtO1yJVreYrsHPVSoNPTVaOgM/Mk61TkjcFSnvdtOGLE IRh/fhPlOuOAQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DT6kn6bylz9rxH; Sun, 31 Jan 2021 11:29:21 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Subject: Re: org-attach-git don't automatically commit changes References: <87czxn91dj.fsf@posteo.net> <87a6sr6mcq.fsf@localhost> <8735yiv926.fsf@posteo.net> <87wnvt4w62.fsf@localhost> Date: Sun, 31 Jan 2021 11:29:20 +0100 In-Reply-To: <87wnvt4w62.fsf@localhost> (Ihor Radchenko's message of "Sun, 31 Jan 2021 11:33:57 +0800") Message-ID: <87r1m1o0vz.fsf@posteo.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=MbNO7TGZ; dmarc=pass (policy=none) header.from=posteo.net; 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: EFF459404C2 X-Spam-Score: -3.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: sVMLv8W2LK8H Hi Ihor, Ihor Radchenko writes: > Does it mean that your attachment folder is set in :DIR: property? No, my attachment folder is build using :ID: property. For example, in my heading: * Test :PROPERTIES: :ID: d0e690e2-2ecd-4224-891a-b91257db5389 :END: And if I evaluate `org-attach-dir' here, it returns the correct path: #+begin_src emacs-lisp (org-attach-dir) #+end_src #+RESULTS: : /home/juanmanuel/Documentos/docs-compartidos/org/data/d0/e690e2-2ecd-4224-891a-b91257db5389 But if I evaluate this, I get an 'incomplete' path: #+begin_src emacs-lisp (expand-file-name org-attach-id-dir) #+end_src #+RESULTS: : /home/juanmanuel/Documentos/docs-compartidos/org/data/ So if I replace `(expand-file-name org-attach-id-dir)' with `(org-attach-dir)' in `(org-attach-git-commit)' [line 7, the `dir' variable], it works fine when I run 'C-c C-a z'. Best regards Juan Manuel > > I suspect that it is a leftover from the major changes in org-attach > when :DIR: property was introduced. The org-attach-git presumes that all > the attachments in current file are stored in sub-directories located > inside org-attach-id-dir, which is no longer guaranteed. In fact, the > existing approach to treat all the attachments to all headings in > current file as files in a single git repo cannot be used. I can see two > possible fixes: > 1. Treat each attachment dir as individual git repo (breaking change for > those who are using :ID: property to build the attachment dirs) > 2. Treat attachment dirs defined by :DIR: property individually and > leave the :ID:-defined attachments as they were treated before > (inconsistent). > > I am in favour of the first approach since I do not like the idea of > keeping all the attachments in the whole file in a single git repo. > I think feedback from other is needed to decide what we need to do here. > > P.S. Marking this as a bug. > > Best, > Ihor >