From: Christopher Schmidt <christopher@ch.ristopher.com>
To: emacs-orgmode@gnu.org
Subject: Re: Bug in structmode++?
Date: Tue, 7 May 2013 15:31:53 +0100 (BST) [thread overview]
Message-ID: <878v3qkghd@ch.ristopher.com> (raw)
In-Reply-To: <87ip2v83j3.fsf@bzg.ath.cx> (Bastien's message of "Tue, 07 May 2013 12:16:33 +0200")
Bastien <bzg@gnu.org> writes:
>> orgstruct(++)-mode used to set auto-fill-function to
>> 'org-auto-fill-function. This behaviour is too intrusive so we
>> removed it. You either need to indent secondary lines by hand or set
>> auto-fill-function back to org-auto-fill-function.
>
> I don't remember why it was too intrusive, it worked fine for me.
We overwrite the major mode's custom value of auto-fill-function. This
is not The Right Thing in each and every case.
In message-mode this is not important,
(defun message-do-auto-fill ()
"Like `do-auto-fill', but don't fill in message header."
(unless (message-point-in-header-p)
(do-auto-fill)))
org-auto-fill-function does not do much harm here. That is not the case
for most prog modes, though.
You can easily get the old behaviour back by setting auto-fill-function
to org-auto-fill-function after you activate orgstruct{,++}-mode.
>> orgstruct++'s hijacker of org-insert-heading-respect-content did not
>> respect item bodies. I fixed this in master a few minutes ago.
>
> I just tried with orgstruct-mode and I still have the problem.
orgstruct-mode does not respect item-body context - see this form in
orgstruct-make-binding:
(org-context-p 'headline 'item
,(when (memq fun
'(org-insert-heading
org-insert-heading-respect-content
org-meta-return))
'(when orgstruct-is-++
'item-body)))
I think that's a feature.
> With orgstruct++-mode, M-RET on the second line of an item inserts an
> item correctly, but there is another problem (also for
> orgstruct-mode): M-RET on the first line of a two-lines item will
> insert the new item in the middle of the item...
So does vanilla org-mode?
Most people use orgstruct{,++}-mode in message-mode, right? I think it
makes sense to use vanilla org here. That is, make an indirect buffer
of the message-mode buffer, narrow the buffer to the message body and
set the major mode to org-mode. This should give one all the power of
Org, including links, footnotes, font-lock and so on, without that
orgstruct-mess.
Christopher
next prev parent reply other threads:[~2013-05-07 14:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 15:03 Bug in structmode++? Igor Sosa Mayor
2013-05-02 8:31 ` Igor Sosa Mayor
2013-05-02 8:33 ` Nicolas Goaziou
2013-05-02 8:51 ` Igor Sosa Mayor
2013-05-02 13:37 ` Nicolas Goaziou
2013-05-06 17:07 ` Christopher Schmidt
2013-05-07 10:16 ` Bastien
2013-05-07 12:28 ` Sebastien Vauban
2013-05-07 14:31 ` Christopher Schmidt [this message]
2013-05-14 8:59 ` Bastien
2013-05-14 11:16 ` Daniel Bausch
2013-05-12 14:10 ` The Dude
2013-05-12 14:59 ` Christopher Schmidt
2013-05-12 18:34 ` Igor Sosa Mayor
2013-05-23 6:29 ` The Dude
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=878v3qkghd@ch.ristopher.com \
--to=christopher@ch.ristopher.com \
--cc=emacs-orgmode@gnu.org \
/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).