From: Rene <jlr_0@yahoo.com>
To: emacs-orgmode@gnu.org
Subject: Re: orgstruct++-mode, fill-paragraph, and mail-mode
Date: Fri, 4 Oct 2013 12:50:10 +0000 (UTC) [thread overview]
Message-ID: <loom.20131004T142947-42@post.gmane.org> (raw)
In-Reply-To: loom.20130927T211456-579@post.gmane.org
Rene <jlr_0 <at> yahoo.com> writes:
> I like the intuitive way the Org mode structure editing and list
> formatting works. Thus I turn it on in mail-mode with
>
> (add-hook 'mail-mode-hook 'turn-on-orgstruct)
>
> This works alright.
>
> But when I use orgstruct++-mode
>
> (add-hook 'mail-mode-hook 'turn-on-orgstruct++)
>
> Then fill-paragraph (M-q) doesn't behave correctly anymore when
> applied to the paragraph right below the mail-header-separator
> ("--text follows this line--"). All the above lines get rearranged.
>
> I just realized that with orgstruct-mode the regexp
> paragraph-separate contains the mail-header-separator, whereas
> with orgstruct++-mode this regexp does NOT contain the
> mail-header-separator.
The value of paragraph-separate as predefined in sendmail.el is
(setq paragraph-separate
(concat (regexp-quote mail-header-separator)
;; This is based on adaptive-fill-regexp (presumably
;; the idea is to allow navigation etc of cited paragraphs).
"$\\|\t*[-–!|#%;>*·•‣⁃◦ ]+$"
"\\|[ \t]*[-[:alnum:]]*>+[ \t]*$\\|[ \t]*$\\|"
"--\\( \\|-+\\)$\\|"
page-delimiter))
With orgstruct-mode the value of paragraph-separate becomes
"--text follows this line--$\\| *[-–!|#%;>*·•‣⁃◦ ]+$\\|[
]*[-[:alnum:]]*>+[ ]*$\\|[ ]*$\\|--\\( \\|-+\\)$\\|^\f"
As one can see orgstruct-mod do not alter this variable.
Whereas with orgstruct++-mode, the initial value of paragraph-separate
(given within
sendmail.el) vanishes, and turns into
"\\(?:\\*+ \\|\\[\\(?:[0-9]+\\|fn:[-_[:word:]]+\\)\\]\\|%%(\\|
[ ]*\\(?:$\\|\\(?:|\\|\\+-[-+]\\)\\|[#:]\\|-\\{5,\\}[ ]*$\\|
\\\\begin{\\([A-Za-z0-9]+\\*?\\)}\\|
\\(?:\\(?:CLO\\(?:CK\\|SED\\)\\|DEADLINE\\|SCHEDULED\\):\\)\\|
\\(?:[-+*]\\|\\(?:[0-9]+\\)[.)]\\)\\(?:[ ]\\|$\\)\\)\\)"
Why is that so?
--
Rene
prev parent reply other threads:[~2013-10-04 12:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 19:19 `orgstruct++-mode',`fill-paragraph', and `mail-mode' Rene
2013-10-04 12:50 ` Rene [this message]
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=loom.20131004T142947-42@post.gmane.org \
--to=jlr_0@yahoo.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).