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 IbrmBUwkFmCGBgAA0tVLHw (envelope-from ) for ; Sun, 31 Jan 2021 03:30:20 +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 mFweAUwkFmAhGwAAB5/wlQ (envelope-from ) for ; Sun, 31 Jan 2021 03:30:20 +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 931729403CA for ; Sun, 31 Jan 2021 03:30:19 +0000 (UTC) Received: from localhost ([::1]:56246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l63RK-0004vR-AB for larch@yhetil.org; Sat, 30 Jan 2021 22:30:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l63Qu-0004tL-10 for emacs-orgmode@gnu.org; Sat, 30 Jan 2021 22:29:52 -0500 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:35888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l63Qs-0003E0-DH for emacs-orgmode@gnu.org; Sat, 30 Jan 2021 22:29:51 -0500 Received: by mail-pg1-x52c.google.com with SMTP id c132so9634386pga.3 for ; Sat, 30 Jan 2021 19:29:49 -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:content-transfer-encoding; bh=czNYoVJLePySRGXaBHWsyqe0IJ21sSJ6E01E7xjt8CM=; b=MLqRpDstTtQIlrgI4kzQhqhac3z5i9p/cgEJ4BEXWYO+cQ4PzOBrbtipzwHllBD4u8 1kvcpCv8GJ6UvuXr8dvRL3TF4Wqh9lHenYUXYMw4gZweE6eP3od8mSYPj3M3OVwrOmCc TLgGRz6Xtl5Oj3mNeK9h5ucit16L2NIESw2Sp8AeCglBrcYYAQu5ur6X+4Gl2Pj+rw0Z 7H/NGrRm91E2Dy9XsNaWudvs7mQ+CQG2ilagSUGlnQR4IIieTQTdvjthEraGF1XZghqc WO7RVjFaT1QhAd3r90Cj4QPflYmrFbujf6RF0MTKMRte0JFWWZOUWH6AzkdMC2ZRx44j yLQA== 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:content-transfer-encoding; bh=czNYoVJLePySRGXaBHWsyqe0IJ21sSJ6E01E7xjt8CM=; b=p2pmsLRsytEHk/WSb8YzlF3+tGJmDJFhUAuXL9h2PmL4rmlm5nejcDr+cY0eO93LIh bKXDHAnRuA6olIyIm79qD1DI49y5zWU9g9KNZWvKI/slNcQM6lKBq/Gmx9IvQ18S4yRa qiR7WtKO5VJbjKvVQkOvkNYfCfjIVMypmsmXHu27u4dEeHrzjORJt3UqxrKBhz5cb/aE znWg/5sCfPC1ycWLxNoAAYQMvO5FsjTlLYa1k9lUE3KZ4S0vva2qFwa2bGG7OAbB0k/A r+reQML2lXJFra1AYYLalzpAQM/AJA4VJ/IkGe0K0oCdg5c8US/sX0Hq1iguFqDEZt3b HZIg== X-Gm-Message-State: AOAM531t5MD7/I2N+syQMiRmnd/ULZRhKzN77TrjPMgM/pLp6oygrAtD BKj92Z6yO9Ht0a/R6ACSAmqzzIGtth3o8A== X-Google-Smtp-Source: ABdhPJyoX/ibOll+O7EQUWM9565omaNa3AvCzzVptwgVzrroR1mJ2cmD+xk4E6318Jt/dtzjCZ8Feg== X-Received: by 2002:a63:1159:: with SMTP id 25mr11174879pgr.321.1612063788851; Sat, 30 Jan 2021 19:29:48 -0800 (PST) Received: from localhost ([104.250.131.79]) by smtp.gmail.com with ESMTPSA id 1sm9605175pjk.34.2021.01.30.19.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 19:29:47 -0800 (PST) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Subject: Re: org-attach-git don't automatically commit changes In-Reply-To: <8735yiv926.fsf@posteo.net> References: <87czxn91dj.fsf@posteo.net> <87a6sr6mcq.fsf@localhost> <8735yiv926.fsf@posteo.net> X-Woof-Bug: t Date: Sun, 31 Jan 2021 11:33:57 +0800 Message-ID: <87wnvt4w62.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::52c; envelope-from=yantar92@gmail.com; helo=mail-pg1-x52c.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: orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.55 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=MLqRpDst; 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: 931729403CA X-Spam-Score: -2.55 X-Migadu-Scanner: scn1.migadu.com X-TUID: lH7ZVLtPc8Vg Juan Manuel Mac=C3=ADas writes: > The default value of `org-attach-id-dir' is "data/", and if I evaluate > `(expand-file-name org-attach-id-dir)' on my current node, it returns a > wrong path to the attached folder. `org-attach-sync' only works for me > if I set in `org-attach-git-commit' the variable like this: Does it mean that your attachment folder is set in :DIR: property? > #+begin_src emacs-lisp > ;; ... > (let* ((dir (expand-file-name org-attach-id-dir)) > ;; ... > #+end_src 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