From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IKUdGBhc22PIjwAAbAwnHQ (envelope-from ) for ; Thu, 02 Feb 2023 07:45:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OIg2GBhc22PyqQAA9RJhRA (envelope-from ) for ; Thu, 02 Feb 2023 07:45:44 +0100 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 0195A42814 for ; Thu, 2 Feb 2023 07:45:43 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNTL8-0002PF-Hm; Thu, 02 Feb 2023 01:44:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNTL7-0002OO-Gn for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 01:44:57 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNTL5-00006a-4u for emacs-orgmode@gnu.org; Thu, 02 Feb 2023 01:44:57 -0500 Date: Thu, 02 Feb 2023 06:44:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1675320291; x=1675579491; bh=FwvBLpMaaBmXrJTyDUOyj1tl+jbZC5QWagv1gvpmNTY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=jHXjzlVoJJJEfWItZAn5xNqkCnwtPUM+iSit6qvifnDe3RMMbDZKDQpIBfmLgCwNY Bd5KnCXT3nfFBPyw0bALEk5Bvd7SbNncZlSFZl03WnDYRZ7PXQgjmmUsbXTJZCsbX9 goJyyAWFCY7FWeFjGieUNliCrkFE8oImh92b3eNI6FDAdUGfXVLzmo8bIo7G0vodpf YpxwuIM7YHPbnL9Q+EfP2waMPOfFLm4J7gOPbGDVKnE2uITRoEcc2bHeG+w63JAWSv jfpAcs9z2jYThRSyoLtMiog26tSWfka1lwPEodS/UKM4f3bh6wFMsB40sPrsZ2i9+c EPi3bm58gQGkg== To: Ihor Radchenko From: Janek F Cc: "emacs-orgmode@gnu.org" Subject: Re: Properly handle defaults in org-set-property Message-ID: <5NC3yaCBwyYNnDeMmgLeBKjDoFEghs94aVR0RBOpgsYuezZ8_cMwTqKjNmgWBS22U8DWK2fa_kPie6If3wXgrFuleg02IeSEVzvmNC8xg4Y=@pm.me> In-Reply-To: <871qs6sbxe.fsf@localhost> References: <871qs6sbxe.fsf@localhost> Feedback-ID: 17130000:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.131; envelope-from=xerusx@pm.me; helo=mail-40131.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675320344; a=rsa-sha256; cv=none; b=EKSD5xxomE2MOZQ9oD+4ae/Lq8Sp/Yq9gGG49DebQI6SbjuaS1R5SNt6G5Fxe693kqtff2 HSgGKAlXm9KuCVFa4aia+IIMFjXUx6O8DumbfvN/Ci+iyc3o3YBhonV7NeceKGLmEu0iXL DSI3D9kLOT/uzuWTxcLbzgqKt4VOg8/aEW0iA7PvgbXpfLIecI6T04ZtINfvEIM/ahZRK8 abB8APwYx4guZes2somRH6FGm6xccfb2dBQZ2HIpa7YlCbN0FO1GDgzlT7ryG2zF5JdoM6 vnw7ObGFfWPlb2HQYh4p75WW0mSJnCmBiyld6b6jkUwHRr57UVlbZ4kLI4Accg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=pm.me header.s=protonmail3 header.b=jHXjzlVo; 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"; dmarc=pass (policy=quarantine) header.from=pm.me ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675320344; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=FwvBLpMaaBmXrJTyDUOyj1tl+jbZC5QWagv1gvpmNTY=; b=bLx2QQk3833taJ6KGOJPoLJK6GyTSVgIwlPKDdku1soJuWkbAQ+eqj85b0Lw/brbOJrwMg zmuOapOEGUeQ+dOic/QwNvcpCRlPQO2JZRaUXVQNAQ9W9gnWtyiUXttrYQFta/Bh2zfbKn q2wfK71ZYzGsuqTb4htay+royKy2ajKfv1ht4Ap7cJ4Rkxf6YbYuKFZh8nnf6QlW57764u ENTeZaYNC1ms+SEatnCFUJrFpgD8LmuAoN/arKb9IrctrhAk6jlQhiiXXqvDcIcYTMMB5y rN5U6oDu1xLJHFm4rh0qczZxhl5swixaCYXwURwj6tRGWDVHl/ios5qV+rBWmg== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=pm.me header.s=protonmail3 header.b=jHXjzlVo; 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"; dmarc=pass (policy=quarantine) header.from=pm.me X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -3.87 X-Spam-Score: -3.87 X-Migadu-Queue-Id: 0195A42814 X-TUID: UR8wKhCs/03m That is exactly what I use, as you can see in my dotfiles: https://code.ftt.gmbh/janek/dotfiles/src/branch/main/.config/doom/config.el= #L293 But it leads to the exact aforementioned problem... ------- Original Message ------- Ihor Radchenko schrieb am Dienstag, 20. September 2022= um 10:10: > Janek F xerusx@pm.me writes: >=20 > > As discussed in https://emacs.stackexchange.com/questions/71774/pass-de= fault-value-to-org-set-property/71777, providing a default to org-set-prope= rty does not always work. > >=20 > > It calls `org-read-property-value`, which only uses the supplied defaul= t value if it can compute a list of allowed values for the property. But th= en, the default value has to be part of that `_ALL` list. > >=20 > > Can this be changed so it always uses the given default? >=20 >=20 > Why don't you just use >=20 > (map! :desc "Set ID property" "lI" > '(lambda () > (interactive) > (org-set-property "ID" (org-read-property-value "ID" nil "default-value")= ))) >=20 > ? >=20 > -- > Ihor Radchenko, > Org mode contributor, > Learn more about Org mode at https://orgmode.org/. > Support Org development at https://liberapay.com/org-mode, > or support my work at https://liberapay.com/yantar92