From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [bug?] org-inside-latex-fragment-p broken? Date: Fri, 23 Jun 2017 13:55:37 +0200 Message-ID: <87shiq6hqe.fsf@nicolasgoaziou.fr> References: <87o9tfngo3.fsf@pank.eu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dONBh-0001zW-Q9 for emacs-orgmode@gnu.org; Fri, 23 Jun 2017 07:55:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dONBd-0008Tp-4Q for emacs-orgmode@gnu.org; Fri, 23 Jun 2017 07:55:45 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:37879) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dONBc-0008Ta-Lq for emacs-orgmode@gnu.org; Fri, 23 Jun 2017 07:55:40 -0400 In-Reply-To: <87o9tfngo3.fsf@pank.eu> (rasmus@gmx.us's message of "Fri, 23 Jun 2017 12:26:36 +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" To: Rasmus Cc: emacs-orgmode@gnu.org Hello, Rasmus writes: > org-inside-LaTeX-fragment-p seems to assume that a latex-fragment only > exists beyond the first paragraph. It does fails to predict the fragment > in this simple file > > #+begin_src org > foo $x$ bar > test `org-inside-LaTeX-fragment-p' on the "$x$" above. > #+end_src > > It seems to be fixed if we replace, > > (lim (progn > (re-search-backward (concat "^\\(" paragraph-start "\\)") nil t) > (point))) > > With > > (lim (save-excursion (backward-paragraph) (point))) > > Should I push this? `backward-paragraph' may be a bit heavy. Anyway we shouldn't use this function at all. Why do you need it? Regards, -- Nicolas Goaziou