From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id CAygCm1zRWTsWgEASxT56A (envelope-from ) for ; Sun, 23 Apr 2023 20:05:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EJ7FCW1zRWSeSwAAG6o9tA (envelope-from ) for ; Sun, 23 Apr 2023 20:05:33 +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 A01EE40ABA for ; Sun, 23 Apr 2023 20:05:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqe4n-0005Qv-R2; Sun, 23 Apr 2023 14:04:41 -0400 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 1pqe4n-0005Qn-6y for emacs-orgmode@gnu.org; Sun, 23 Apr 2023 14:04:41 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqe4k-00045I-VT for emacs-orgmode@gnu.org; Sun, 23 Apr 2023 14:04:40 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D9E9F240153 for ; Sun, 23 Apr 2023 20:04:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682273076; bh=yE7Kwo/8jxf0u6mhcdvioWMPA34JJGYTiNJw+mfoAQ4=; h=From:To:Cc:Subject:Date:From; b=Upnfkanr35Py8MC54b37dbi2D3Yji3dT+fhvB16a5dZ33sFi4h6PN7kCcGP5AQZz6 qMJneUfWw93GnJWDGe+wEj7BcE9W94QPN1T3LCmEgk7rwG+H021Rqaq9Hu0JdSlR3F Fu3GU/XPxxki9gcvKNVxxG/XWtPnvo1ulkUIMfGG9EnSfoqQschXvjyDc7abltLoAF XfzNBEHNa92GwXU+Gi+aeKcdhGgTIy1nU5sScNuoBx4M+cnD2Qs4IYKY55xCj6DNIw fRK+3309dSCOimMcT2RXzyadfnDpRHNIPjaQA8jbf2jN7YhWmhwo5l3feTzQwRPJ7U HOOMInH2Iqgpw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q4GPJ3Yb7z6txQ; Sun, 23 Apr 2023 20:04:36 +0200 (CEST) From: Ihor Radchenko To: Edouard Debry Cc: emacs-orgmode@gnu.org Subject: Re: How to set priority of a heading with the highest one among its children In-Reply-To: <868rem24s5.wl-edouard.debry@gmail.com> References: <868rem24s5.wl-edouard.debry@gmail.com> Date: Sun, 23 Apr 2023 18:07:28 +0000 Message-ID: <87o7ne321r.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682273133; a=rsa-sha256; cv=none; b=T8JlWAMsT6Q7Y2AmpcyNlgOA7G+tbEMfPefVv81syMQMuNzbDg8MQ7VYD9aI1ydmVpGe8R pBxL0YFU0ClmL8h/EHtzEH+4Q9FQlT+aJdJAXrOORFhmDln/RzHOYmuTLU757FCGW2jHo0 B6nb7RxO4fzgXGaq605wijlx8beAnwrsFos+IzpOzYBfub+DObhm5/I0UgO6tR5TzGcvj6 nzFe3gNaHSZMZ3C0QoEp2tEikDO5DaET1bCjFk4hUjTZ0GHNlIK9dj/gRJrMTdGuX18Dfj C1morBSJRBZ+gycJv4ltIlZoJJj/5MvrENvRU1nPYQHnb9eybuFcnOXi9rxK+A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Upnfkanr; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682273133; 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=miVxOOsuRcbhWU/oP6F4YTwil9M6aBapyX+PQ0kQ66U=; b=QPHYaMbVi6KEtRz26i0/GCphpBxH4kmy0za4I12rlUp277+zVK1YgAr/voVOBMw22JqJtj 9UvWxWJrJJ6bUKq9nQejLlg2yHpFSPnKhwssqvSsSPPo+F983ZnxSjGy7k+znNSsydLWAW JJVIFLMhGROfxUQfhbwscgzx+hR+uQIobP2kgbvMZfOr8OnCZ5vQSiH1fqC7oLQRiO/4sQ 5YfniWI/ZhrhLaIxIRt/rPJ+SIizxQNKPPvmVc8IJ3VC1XhxI15HqWBRqF2x92WbBPYHC6 5daGPoE14/WJxZN2wdlUOT69rN4Gk4F7XsrRNtW/eTVy61i0Exv19ctHecKhEQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Upnfkanr; 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: -6.20 X-Spam-Score: -6.20 X-Migadu-Queue-Id: A01EE40ABA X-TUID: u5TB9N1OeZZv Edouard Debry writes: > But this involves org skills a bit beyond my understanding, I wonder if y= ou could give > me some piece of advices on how to do that : > - is there a suitable hook for this function ? No hook, but you can advice `org-priority' using :after advice. > - when in a given tree, how can I select the top level heading ? (while (org-up-heading-safe)) Try to play with this using M-: with point at different headings. > - when at a given heading, how can I change programmatically the priority= ? (org-priority 1), for example. > For this latter question, I tried (org-entry-put nil "PRIORITY" "2"), but= it replied that > > org-priority: Priority must be between =E2=80=980=E2=80=99 and =E2=80=98= 5=E2=80=99 That's because `org-entry-put' converts the argument into number, assuming a single-character string like "A". This is probably a bug. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at