From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Schmidt Subject: Re: Bug in structmode++? Date: Tue, 7 May 2013 15:31:53 +0100 (BST) Message-ID: <878v3qkghd@ch.ristopher.com> References: <20130501150351.GA1891@pedroche.intern> <20130502083120.GJ1647@pedroche.uni-erfurt.de> <877gjhixw9.fsf@gmail.com> <20130502085151.GM1647@pedroche.uni-erfurt.de> <87r4hph59q.fsf@gmail.com> <878v3s829x@ch.ristopher.com> <87ip2v83j3.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:34217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZiw0-00062c-T0 for emacs-orgmode@gnu.org; Tue, 07 May 2013 10:32:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZivs-0002mD-8H for emacs-orgmode@gnu.org; Tue, 07 May 2013 10:32:04 -0400 Received: from ristopher.com ([146.185.21.93]:45955 helo=saturn.ch.ristopher.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZivr-0002lL-VR for emacs-orgmode@gnu.org; Tue, 07 May 2013 10:31:56 -0400 In-Reply-To: <87ip2v83j3.fsf@bzg.ath.cx> (Bastien's message of "Tue, 07 May 2013 12:16:33 +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 Bastien 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