From: Nick Dokos <nicholas.dokos@hp.com>
To: Sanjoy Mahajan <sanjoy@olin.edu>
Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: outline-demote incorrectly demotes leaf nodes
Date: Tue, 18 Oct 2011 14:57:25 -0400 [thread overview]
Message-ID: <8875.1318964245@alphaville.americas.hpqcorp.net> (raw)
In-Reply-To: Message from Sanjoy Mahajan <sanjoy@olin.edu> of "Tue\, 18 Oct 2011 18\:03\:01 -0000." <loom.20111018T195720-418@post.gmane.org>
Sanjoy Mahajan <sanjoy@olin.edu> wrote:
> Christian Moe <mail <at> christianmoe.com> writes:
>
> > The Org manual (2.5 Structure editing) says to use M-S-≤right>
> > (org-demote-subtree) for what the submitter wants to do.
>
> (I am the original reporter of the issue on the Debian BTS.) That is useful
> information for me, and I will use those keys.
>
> I do worry about one point, namely that C-c C-> (outline-demote) should still
> work.
That seems like an unreasonable expectation to me. Despite the similarities,
it's a completely different function, with different pre- and post- conditions
and different assumptions about what the data looks like.
[Warning: stupid analogy ahead] When you need to turn a screw, you look
at the head and choose the right screwdriver for it. If you use a
Philips screwdriver to turn a square-drive screw, you'll damage the
screw even if you do manage to turn it a bit.
> And it does work in regular outline mode. For example, if I rename my
> test file to c.otl and then use C-c C-> on the main heading, all the subtrees
> are demoted as I expected. Whereas in org mode the leaf subtree gets a space
> instead of a * when it is being demoted.
>
To continue the analogy: sure, if you replace the square drive screw
with a Philips screw, you can turn it with the Philips screwdriver.
> So, I wonder whether org mode is somehow messing up outline-demote without
> meaning to? I am far from an expert on the org.el lisp code, and maybe the
> current org-mode behavior is the intended result. But I worry that it is not
> intended and instead is an accidental side effect of something else.
>
No: orgmode uses a small subset of outline-* functions, mostly to navigate between
headings, but it does not use outline-demote at all.
Nick
next prev parent reply other threads:[~2011-10-18 19:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 8:55 outline-demote incorrectly demotes leaf nodes Sébastien Delafond
2011-10-18 9:59 ` Christian Moe
2011-10-18 10:22 ` Bernt Hansen
2011-10-18 11:21 ` Sébastien Delafond
2011-10-18 11:27 ` Bernt Hansen
2011-10-18 18:03 ` Sanjoy Mahajan
2011-10-18 18:57 ` Nick Dokos [this message]
2011-10-19 7:14 ` Carsten Dominik
2011-10-19 13:57 ` Sanjoy Mahajan
2011-10-19 15:39 ` Michael Brand
2011-10-21 14:22 ` Bastien
2011-10-21 14:40 ` Carsten Dominik
2011-10-21 16:08 ` Bastien
2011-10-22 8:15 ` Michael Brand
2011-11-09 18:16 ` Michael Brand
2011-12-11 18:44 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8875.1318964245@alphaville.americas.hpqcorp.net \
--to=nicholas.dokos@hp.com \
--cc=emacs-orgmode@gnu.org \
--cc=sanjoy@olin.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).