emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Heading/item insert commands
@ 2017-10-03 18:52 Ingo Lohmar
  2017-10-04 10:33 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Lohmar @ 2017-10-03 18:52 UTC (permalink / raw)
  To: emacs-orgmode


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
default.

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?

Thanks,
Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-06 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03 18:52 Heading/item insert commands Ingo Lohmar
2017-10-04 10:33 ` Nicolas Goaziou
2017-10-04 11:27   ` Ingo Lohmar
2017-10-06 17:54     ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).