From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniele Pizzolli Subject: [FR] fill caption Date: Sat, 14 Jun 2014 19:21:55 +0200 Message-ID: <539C84B3.9060302@toel.it> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020700010004030606040101" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wvrec-0003fQ-Do for emacs-orgmode@gnu.org; Sat, 14 Jun 2014 13:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WvreS-0004Yp-AZ for emacs-orgmode@gnu.org; Sat, 14 Jun 2014 13:22:10 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:46966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WvreS-0004VY-3v for emacs-orgmode@gnu.org; Sat, 14 Jun 2014 13:22:00 -0400 Received: from mfilter6-d.gandi.net (mfilter6-d.gandi.net [217.70.178.135]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 97E3717207C for ; Sat, 14 Jun 2014 19:21:58 +0200 (CEST) Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter6-d.gandi.net (mfilter6-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id KqU9V9mKS49U for ; Sat, 14 Jun 2014 19:21:56 +0200 (CEST) Received: from [10.0.0.235] (host159-38-static.38-79-b.business.telecomitalia.it [79.38.38.159]) (Authenticated sender: me@toel.it) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id B7166172067 for ; Sat, 14 Jun 2014 19:21:56 +0200 (CEST) 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 This is a multi-part message in MIME format. --------------020700010004030606040101 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello @ll, I noticed that multi line caption works as expected, but there is no way to fill it (at least to my knowledge). I added a test case that should speak by itself. I do not know a lot of elisp, but if you have some pointer I could try to implement it by myself. Maybe this could be extended to handle also OPTIONS and LocalWords and others. Thanks in advance, Daniele --------------020700010004030606040101 Content-Type: text/x-patch; name="fill-caption-test.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fill-caption-test.diff" diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index 39db5bf..7ebac61 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -362,6 +362,19 @@ (end-of-line) (org-auto-fill-function) (buffer-string)))))) + ;; Correctly fill the caption. + (should + (equal "#+CAPTION: this is a very very\n#+CAPTION: long caption" + (org-test-with-temp-text "#+CAPTION: this is a very very long caption" + (let ((fill-column 30)) + (org-fill-paragraph) + (buffer-string))))) + (should + (equal "#+CAPTION: this is a very short caption" + (org-test-with-temp-text #+CAPTION: this is a very \n#+CAPTION: short caption" + (let ((fill-column 80)) + (org-fill-paragraph) + (buffer-string))))) --------------020700010004030606040101--