From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marco Wahl Subject: Re: [RFC] Org Num library Date: Thu, 31 Jan 2019 16:27:42 +0100 Message-ID: <84k1ikludt.fsf@gmail.com> References: <87r2fftxq7.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:49420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpEFx-0000xZ-2x for emacs-orgmode@gnu.org; Thu, 31 Jan 2019 10:27:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpEFw-0002kK-CW for emacs-orgmode@gnu.org; Thu, 31 Jan 2019 10:27:57 -0500 Received: from [195.159.176.226] (port=36362 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpEFw-0002jH-69 for emacs-orgmode@gnu.org; Thu, 31 Jan 2019 10:27:56 -0500 Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1gpEFn-0004t0-Hq for emacs-orgmode@gnu.org; Thu, 31 Jan 2019 16:27:47 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi Nicolas and all, @Nicolas: Thanks for org-num-mode. > A few weeks ago, I posted on this ML a proof of concept about dynamic > numbering of headlines in an Org buffer. Since then, I worked on it more > seriously, improved it, and threw in some features. Here is an excerpt > of its commentary section: > > This library provides dynamic numbering for Org headlines. Use > > > > to toggle it. > > You can select what is numbered according to level, tags, COMMENT > keyword, or UNNUMBERED property. You can also skip footnotes > sections. See `org-num-max-level', `org-num-skip-tags', > `org-num-skip-commented', `org-num-skip-unnumbered', and > `org-skip-footnotes' for details. > > You can also control how the numbering is displayed by setting > `org-num-face' and `org-num-format-function'. > > I tested it a bit, even in relatively large documents like the Org > manual, without problem. I also wrote a test suite for that library. > > Since it is very much Org-specific, and a basic feature you could expect > from Org, I'd like to add it in core. So, if there is no strong > objection to it, it can go in Org 9.3. > > I attach the library for further testing, suggestions, remarks… Let me > know what you think. For some days I turned on org-num-mode for every Org file automatically with the setting (add-hook 'org-mode-hook #'org-num-mode) in my init file. org-num-mode worked fine for me. Just one idea came to my mind. What about adding an option to restart the numbering at 1 for the first heading in the case when narrowing is in effect? Ciao, Marco