emacs-devel
[Top][All Lists]
Advanced

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

Re: Convert some files from outline-mode to org-mode


From: Kévin Le Gouguec
Subject: Re: Convert some files from outline-mode to org-mode
Date: Mon, 27 Apr 2020 13:45:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

(Apologies for the duplicate message Alan, I hit reply instead of
followup.)


Alan Mackenzie <address@hidden> writes:

> Hello, Kévin.
>
>> - I don't think I will ever manage to remember any of the keybindings
>>   for the outline-(show|hide)-… functions, which means I will never be
>>   able to use the "selective display" feature advertised in
>>   outline-mode's docstring without a cheatsheet.
>
> Neither can I.  When I need it, which is rarely, there's C-h m.

As I said in my reply to Drew, this is what I call a "cheatsheet" :)

I have no complaint about C-h m, C-h b, C-c C-h, as long as I need them
"rarely", as you say.  When reading an outline, I _frequently_ open and
close headings.

>> - With org-mode, I can simply TAB my way through a document without
>>   figuring out whether what I want to show/hide are entries, subtrees,
>>   children, branches, leaves, sublevels, bodies…
>
> But you can't use TAB to indent a line, or alternatively to insert a tab
> character.  

A fair point, though correct me if I'm wrong, but it does not look like
we indent NEWS entries?

org-mode has a few ways to work around this conflict:

- TAB on an "empty" heading (e.g. right after one inserts a heading)
  cycles through section levels (by adding/removing asterisks),

- If org-indent-mode is nil, sections bodies are "hard-indented"; TAB on
  section bodies indents them to (1+ section-level), C-j auto-indents
  new lines.

  (Frustratingly, org-mode uses what I think of as the "old" convention
  to use RET as "plain newline" and C-j as "smart newline with indent".)

- If org-indent-mode is t, bodies are "soft-indented" (with line-prefix
  and wrap-prefix).

Any of these could be useful additions to outline-mode IMO.

>             And how is a non-specialist user reading NEWS for a new
> release going to find out about this TAB binding?

By default, org-mode only shows top-level section headings; subheadings
and bodies are elided.  The ellipsis is a visual cue that there are
things to expand.

Once the non-specialist user has this "EXPAND-ME" cue, admittedly they
still need to learn the binding.  Luckily with org-mode, there's just
one: TAB.

I wish I could reply "well obviously the non-specialist user will just
click on the heading and voilà!", but it looks like one needs to
(require 'org-mouse) first.  Ah well.  No reason this couldn't be
enabled by default in outline-mode.

>> So, while I agree that org-mode is a sledgehammer for e.g. idly browsing
>> NEWS, from a user's point-of-view (at least this user) and to borrow
>> your terms, outline-mode "is a monster" with countless esoteric
>> keybindings;
>
> There are not "countless" keybindings in outline-mode; there are just 26
> defined commands, only some of which will have bindings.  By contrast,
> in org-mode there are 798 defined commands.  That's a factor of 30
> greater.

Right, let me qualify this better:

- There are 11 commands with bindings for selecive display in
  outline-mode (5 show, 6 hide).

- There is only 1 command I care about for selective display in
  org-mode: TAB.

>> meanwhile, I definitely don't "have to know" org-mode to use it; I
>> just mindlessly hit TAB on the thing I want to show/hide.
>
> That may be true up until somebody decides to insert some obscure
> org-mode construct into NEWS.  With over 4 magabytes of source code
> implementing it, there will be more than a few such constructs.

No argument there; I'm not advocating for using org-mode with NEWS.

Though for all of org-mode's complexity, I have yet to see an Org file
where "mindlessly hitting TAB" does not show/hide the heading at point
(… as long as point is on a heading).



reply via email to

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