[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Heading/item insert commands

From: Ingo Lohmar
Subject: [O] Heading/item insert commands
Date: Tue, 03 Oct 2017 20:52:54 +0200

Dear All,

I have been heavily and happily using orgmode for more than 6 years now.
During this time, I have returned 4 or 5 times to changing, tweaking and
generally being puzzled by the code and commands used to insert headings
and list items.  Now, for the first time, I have tried to systematically
write down for myself the different dimensions of the problem, what kind
of combinations I want, and I have written small wrapper commands that
make it happen the way I want.

But that has basically confirmed my gut feeling that the code dealing
with these tasks is fairly convoluted.  There is no symmetry between
todo/non-todo elements, nor between headings and plain list items
(inasmuch as possible), arguments are used inconsistently, heading
insertion may or may not fallback to list items etc.

Thankfully, we are not talking about a lot of code, and it seems to be
amenable to refactoring.  Is there any interest in me trying that (no
promises as to the success)?  I could not find any previous discussions
about this topic, but wanted to get some feedback before spending my
time on this.

To me, there are a few dimensions of requirements:
- insert a heading or an item, or decide based on context?
- insert a todo or a non-todo something?
- insert right here (possibly splitting a line), after the current
  something, or at the end of current's something parent?

Plus some specialties of the current code: For a todo heading, which
keyword to use?  Override the heading level by an argument?

What I have in mind for starters:

Add orthogonal internal functions that can handle *all* sensible
combinations of requirements.  Then rewrite existing commands in terms
of these, but possibly adding new ones.

I would not want to break any workflows, of course.  But in the *long*
run, we could rethink if the existing commands and their prefix-arg
behavior are really what users want, or if we provide other ones by

Does that sound reasonable, or are there any grave obstacles I did not
consider, or any hard reasons why such changes could not be accepted?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]