From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rene Subject: Re: orgstruct++-mode, fill-paragraph, and mail-mode Date: Fri, 4 Oct 2013 12:50:10 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VS4qA-0002jQ-Sb for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 08:50:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VS4q2-0003H8-Mm for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 08:50:42 -0400 Received: from plane.gmane.org ([80.91.229.3]:57693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VS4q2-0003Gk-BZ for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 08:50:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VS4pz-0000aA-Tf for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 14:50:32 +0200 Received: from proxy-master.esisar.grenoble-inp.fr ([195.220.37.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Oct 2013 14:50:31 +0200 Received: from jlr_0 by proxy-master.esisar.grenoble-inp.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Oct 2013 14:50:31 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Rene 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