From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scot Becker Subject: Re: latex export issue Date: Thu, 10 Mar 2011 21:29:05 +0000 Message-ID: References: <87zkp326yf.fsf@gmail.com> <8739mvs7ru.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d9a37e2040cf049e278a3e Return-path: Received: from [140.186.70.92] (port=35610 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxnQF-0000du-Du for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 16:29:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxnQE-0006Dt-5O for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 16:29:27 -0500 Received: from mail-bw0-f41.google.com ([209.85.214.41]:38358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxnQD-0006Dn-V0 for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 16:29:26 -0500 Received: by bwz17 with SMTP id 17so2547377bwz.0 for ; Thu, 10 Mar 2011 13:29:25 -0800 (PST) In-Reply-To: <8739mvs7ru.fsf@gmail.com> 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: Scot Becker , Stephen Eglen , emacs-orgmode@gnu.org Cc: Nicolas --0016e6d9a37e2040cf049e278a3e Content-Type: text/plain; charset=ISO-8859-1 Looks good, but I can't get it to work. To test it, can I just evaluate the two sexp's in the block you gave inside a scratch buffer, then switch to my trial org file and export to LaTeX? Trying the OP's sample file gives the same results before and after I evaluate this new bit of code, but I suspect I'm doing something wrong.... Scot On Thu, Mar 10, 2011 at 8:24 AM, Nicolas wrote: > Hello, > > Scot Becker writes: > > > That sounds like it means that any documents you might want to export to > > LaTeX (and format with hard line breaks) should always have non-breaking > > spaces after the periods---or you should keep a manual eye on your > paragraph > > formatting to make sure no numbers come first on the line. > > Would that work for you? > > #+begin_src emacs-lisp > (defun org-fill-item-nobreak-p () > "Non-nil when line break would insert a new item." > (and (looking-at (org-item-re)) (org-list-in-valid-block-p))) > > (add-to-list 'fill-nobreak-predicate 'org-fill-item-nobreak-p) > #+end_src > > If it is fine, we may as well include it by default in Org. > > Regards, > > > -- > Nicolas > --0016e6d9a37e2040cf049e278a3e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Looks good, but I can't get it to work. =A0To test it, can I just evalu= ate the two sexp's in the block you gave inside a scratch buffer, then = switch to my trial org file and export to LaTeX? =A0Trying the OP's sam= ple file gives the same results before and after I evaluate this new bit of= code, but I suspect I'm doing something wrong....

Scot


On Th= u, Mar 10, 2011 at 8:24 AM, Nicolas <n.goaziou@gmail.com> wrote:
Hello,

Scot Becker <scot.becker@gmail.= com> writes:

> That sounds like it means that any documents you might want to export = to
> LaTeX (and format with hard line breaks) should always have non-breaki= ng
> spaces after the periods---or you should keep a manual eye on your par= agraph
> formatting to make sure no numbers come first on the line.

Would that work for you?

#+begin_src emacs-lisp
(defun org-fill-item-nobreak-p ()
=A0"Non-nil when line break would insert a new item."
=A0(and (looking-at (org-item-re)) (org-list-in-valid-block-p)))

(add-to-list 'fill-nobreak-predicate 'org-fill-item-nobreak-p)
#+end_src

If it is fine, we may as well include it by default in Org.

Regards,


--
Nicolas

--0016e6d9a37e2040cf049e278a3e--