From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ns389230.ip-176-31-101.eu ([91.121.113.132]) by ns302843.ip-94-23-41.eu with LMTP id QKufLp0GiV4HUwAAu8+pOQ (envelope-from ) for ; Sat, 04 Apr 2020 22:13:49 +0000 Received: from aspmx1.migadu.com ([91.121.113.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) by ns389230.ip-176-31-101.eu (Dovecot) with LMTP id CllnCVsGiV6wBAAAhCaIAw ; Sun, 05 Apr 2020 00:13:49 +0200 Received: (Migadu outbound); Sun, 05 Apr 2020 00:13:49 +0200 Authentication-Results: aspmx1.migadu.com; iprev=pass; spf=pass smtp.mailfrom=gnu.org Received-SPF: Pass (aspmx1.migadu.com: domain of gnu.org designates 209.51.188.17 as permitted sender) receiver=aspmx1.migadu.com; identity=mailfrom; client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from= Received-SPF: None (aspmx1.migadu.com: domain of lists.gnu.org does not designate 209.51.188.17 as permitted sender) receiver=aspmx1.migadu.com; identity=helo; client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from= X-Haraka-FCrDNS: lists.gnu.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by aspmx1.migadu.com (Haraka/2.8.20) with ESMTPS id C2626BF8-4C1B-4A7B-A707-838BA93B6432.1 envelope-from (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 verify=FAIL); Sun, 05 Apr 2020 00:13:49 +0200 Received: from localhost ([::1]:42570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKr2w-0003eb-VQ for larch@yhetil.org; Sat, 04 Apr 2020 18:13:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37204) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKr2Z-0003eT-NY for emacs-orgmode@gnu.org; Sat, 04 Apr 2020 18:13:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKr2Y-0006bP-N0 for emacs-orgmode@gnu.org; Sat, 04 Apr 2020 18:13:23 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:40101) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jKr2Y-0006al-FW for emacs-orgmode@gnu.org; Sat, 04 Apr 2020 18:13:22 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 0D1785C0121; Sat, 4 Apr 2020 18:13:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 04 Apr 2020 18:13:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imapmail.org; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= fm3; bh=5i3v0eI7zKNz1WCrCN7zilOGNQrDFdyVXYH+za2YjEg=; b=q8dTbgvM mrIJKw0xar/K1NtCXUhoEwZWbO/wU96zxph3buocPHfbWhClNIKeXk96jKeB0uW9 B0OXdkI8+Q0kHwl6E994MIx47HSLFc/zqMQJBEd4yS8LkWOycIN3MSrUqmfBbRmm acpIqtVW25wGfyUxDyPLH8tbOE41cemiP4MScA0VJ8OEtyVH0AraZEcuRp2v4NTR OBXSFkOL/v6olD1MuvohCG5ELpxp7nq3gInFk+UU08YVDkzgN/3UPhUsqt3ylClP 0Fx4cCvxouurJDK1L21XWMBuidSUDHT4ZnOdQnJudql2fDEcJoxpY8hrW8p1Iiof HAnysg/u+nF95Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=5i3v0eI7zKNz1WCrCN7zilOGNQrDF dyVXYH+za2YjEg=; b=Kao+4Ec3qz4NhbP2ky2S/ty6ytDavLwGWuC3pLhipwf3A 9j9xyNrtWc4LGaG0XsQFRNRMixswsbv9iArecbE8U75W2jX6Z0kaVi+UNt2Fet7p 9DqpZAsf7ZWWROzb+cDQVmpyJD0IjvLjf73F+OniFYEE0aZKJ7rTZGHpg6lIFnXa uuArCqyyT0ikAxjIjV+YQzd4VQ8GZ0y5b4KmIPu/dpVSRgOpiGjCWoaFKUOuNMbC jGAudT9UED1PpI4XQigRXa5b5Fx5ABM9bCNWfCFZXzgJc3Fiv90E+ZqnQRoM2AV3 hZjFzHd6h8uca1TdN4HXLLHtGlmKADbQ2QODMWfpQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrtdelgddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkgggtsehttdertddttddtnecuhfhrohhmpeforghtthcunfhunhgu ihhnuceomhgulhesihhmrghpmhgrihhlrdhorhhgqeenucffohhmrghinhepthgvshhtrd horhhgnecukfhppeejiedrudeirddufeehrdduudelnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepmhgulhesihhmrghpmhgrihhlrdhorhhg X-ME-Proxy: Received: from localhost (c-76-16-135-119.hsd1.il.comcast.net [76.16.135.119]) by mail.messagingengine.com (Postfix) with ESMTPA id 0DF8B3280063; Sat, 4 Apr 2020 18:13:20 -0400 (EDT) From: Matt Lundin To: Org Mode List Subject: [Bug] org-store-link should not insert a document level ID property Date: Sat, 04 Apr 2020 17:13:19 -0500 Message-ID: <87blo62934.fsf@fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.27 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: Gustav =?utf-8?Q?Wikstr=C3=B6m?= Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Haraka-ASN: 22989 209.51.188.0/24 X-Rspamd-Score: -6.410093 X-TUID: CPb2hKrVG/CA The introduction of document-level property drawers (commit 1bdff9f73dc1e7ff625a90e3e61350bdea99f29c from May 2019) introduced inconsistencies in the behavior of org-id and org-store-link. If org-id-link-to-org-use-id is set to t or 'create-if-interactive, calling org-store-link above the first headline in an org file will insert a PROPERTY drawer and an ID at top of the file, so that the file (call it "~/test.org") looks like this: --8<---------------cut here---------------start------------->8--- :PROPERTIES: :ID: 1f43e860-9e7b-4c8f-82b9-6ed3352e589f :END: * First headline --8<---------------cut here---------------end--------------->8--- However, the link that Org actually stores is "[[file:~/test.org]]", so the ID is irrelevant. In addition, a link to a document-level ID does not work. Following "[[id:1f43e860-9e7b-4c8f-82b9-6ed3352e589f]]" results in this error: user-error: Before first headline at position 14 in buffer test.org So either: 1. org-id and org-store-link/org-open-link should support document level ids in a user-configurable way, or 2. org-id-get-create should detect whether it is above the first heading and should not create an id Option #2 would obviously be the easier fix. Gustav: were IDs within the scope of your initial thinking about document level properties? Or are these largely irrelevant? Best, Matt