From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Feature request: filling of long captions Date: Fri, 07 Feb 2014 10:56:44 +0100 Message-ID: <87ha8b1c0z.fsf@gmail.com> References: <87zjm4u1i7.fsf@med.uni-goettingen.de> <87lhxooclu.fsf@bzg.ath.cx> <84ha8bj3lz.fsf@gmail.com> <87d2izbr1c.fsf@gmail.com> <87ppmz1fob.fsf@gmail.com> <87a9e3cnse.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBiAi-00025N-W2 for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 04:56:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBiAa-0000yE-Ig for emacs-orgmode@gnu.org; Fri, 07 Feb 2014 04:56:32 -0500 In-Reply-To: <87a9e3cnse.fsf@bzg.ath.cx> (Bastien's message of "Fri, 07 Feb 2014 09:47:13 +0100") 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: Bastien Cc: Andrea Rossetti , emacs-orgmode@gnu.org, Andreas Leha , Eric Schulte Hello, > Nicolas, what do you think of enhancing the auto-filling (and > delete-indentation) capabilities for some affiliated keywords? > > #+CAPTION: > #+HEADER: > #+TBLFM: Not that it matters much, but "TBLFM" is not an affiliated keyword per se, it belongs to the table syntax. OTOH, you can have "CAPTION" and "HEADER" keywords on top of almost any element type. Anyway, the three keywords are very different. To start with the one I know the most, CAPTION can have an optional value, and multiple caption lines can have as many optional values. #+CAPTION[short caption]: long caption #+CAPTION[short caption, continued]: long caption, continued. Therefore, filling it can be tricky since you have to pay attention to both values. Moreover, if the "short" caption is too long to fit on one line, that line still needs to end with "]:" to be valid. #+CAPTION[very very ... long "short" caption]: #+CAPTION[continued even here]: long caption #+CAPTION: long caption continued. The difficulty lies elsewhere for "HEADER" and "TBLFM". The question is: can we split a HEADER or TBLFM line anywhere, e.g., in the between a keyword and its value (or at a space in the middle of a value) for the former, and in the middle of a formula in the latter? It depends on how "org-table.el" and "ob.el" read these keywords. I didn't check. Also, please bear in mind that filling functions have unit tests, so any new feature ought to be also tested. Regards, -- Nicolas Goaziou