From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Smart(er) word wrapping with org-mode and visual-line-mode Date: Fri, 8 Jan 2010 18:24:16 +0100 Message-ID: <57BC09A2-08C5-43B0-B255-E33EA8ABE4AE@gmail.com> References: <4B44AB80.5070304@os.inf.tu-dresden.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTIzi-0005g9-Pn for emacs-orgmode@gnu.org; Fri, 08 Jan 2010 12:51:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTIzd-0005di-Ru for emacs-orgmode@gnu.org; Fri, 08 Jan 2010 12:51:30 -0500 Received: from [199.232.76.173] (port=56027 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTIzd-0005db-N2 for emacs-orgmode@gnu.org; Fri, 08 Jan 2010 12:51:25 -0500 Received: from ey-out-1920.google.com ([74.125.78.148]:40547) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NTIzd-0004H8-6q for emacs-orgmode@gnu.org; Fri, 08 Jan 2010 12:51:25 -0500 Received: by ey-out-1920.google.com with SMTP id 4so3038973eyg.34 for ; Fri, 08 Jan 2010 09:51:24 -0800 (PST) In-Reply-To: <4B44AB80.5070304@os.inf.tu-dresden.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Martin Pohlack Cc: emacs-orgmode@gnu.org On Jan 6, 2010, at 4:25 PM, Martin Pohlack wrote: > Hi Matthew, > > Matthew Dempsky wrote: >> While playing around with the different options for handling word >> wrapping in org-mode, I decided to instead hack an extension that >> improves visual-line-mode's word wrapping when used in conjunction >> with org-mode. In particular, the mrd-org-smartwrap minor mode >> automatically sets the `wrap-prefix' property on all section >> headlines >> and plain list entries so that visual-line-mode's native word >> wrapping >> looks identical to what careful and continual usage of TAB and M-q >> should produce, without any of the quirks of using auto-fill-mode or >> refill-mode. >> >> Just thought I'd share in case anyone else found it useful / >> interesting. > > I just tried this out (only for headlines up to now) and it seems to > work great. > > Are there any plans to integrate something like this into upstream? > Especially the wrapping of headlines would enable extensive tag usage. I have been thinking about that, but not arrived at a conclusion. One thing is the interaction with org-indent-mode. That mode already does the wrapping for headlines correctly by adding `wrap-prefix', and it will look really good if you set the variable word-wrap to t. However, the showstoppers are the following: 1. I cannot bring myself to turn off truncate-lines, because it messes up tables and code examples badly, and these are major components of my work. I have actually put in a feature request into Emacs for a property `truncate-line', to be able to control this line by line. I got positive feedback, but I don't know when any of the developers finds time to implement it - I cannot do that myself. 2. Visual-line-mode is also a no go for me, I use keyboard macros a lot and need to be able to rely on the fact that [down] move the cursor into the next physical line. So I am not sure how to handle this. We could turn Matthews code into a module that users can turn on if they wish. - Carsten > > > Cheers, > Martin Pohlack > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten