emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Lawrence Mitchell <wence@gmx.li>
To: emacs-orgmode@gnu.org
Cc: Lawrence Mitchell <wence@gmx.li>
Subject: [PATCH 1/2] Only match complete words in org-export-add-options-to-plist
Date: Thu, 20 Jan 2011 13:23:22 +0000	[thread overview]
Message-ID: <1c07dac7fa0dd036dec6a1147fde83c5cddf8639.1295529378.git.wence@gmx.li> (raw)
In-Reply-To: <cover.1295529378.git.wence@gmx.li>
In-Reply-To: <cover.1295529378.git.wence@gmx.li>

* org-exp.el (org-export-add-options-to-plist): Require match to start
at a word-boundary.

Previously, if an option was the suffix of another option (such as TeX
and LaTeX) the setting for the former would propagator to the latter.
This seems like an unintended consequence of a lax regexp in
org-export-add-options-to-plist.  This patch allows options to share a
suffix with another option by requiring that the match against an
option starts at a word-boundary.
---
 lisp/org-exp.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 9954227..d099c82 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -824,7 +824,7 @@ security risks."
       (let ((op org-export-plist-vars))
 	(while (setq o (pop op))
 	  (if (and (nth 1 o)
-		   (string-match (concat (regexp-quote (nth 1 o))
+		   (string-match (concat "\\<" (regexp-quote (nth 1 o))
 					 ":\\([^ \t\n\r;,.]*\\)")
 				 options))
 	      (setq p (plist-put p (car o)
-- 
1.7.4.rc1.7.g2cf08

  reply	other threads:[~2011-01-20 13:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 13:23 [PATCH 0/2] References auto-generated labels with \ref in LaTeX export Lawrence Mitchell
2011-01-20 13:23 ` Lawrence Mitchell [this message]
2011-02-12 23:49   ` [Accepted] [Orgmode, 1/2] Only match complete words in org-export-add-options-to-plist Bastien Guerry
2011-01-20 13:23 ` [PATCH 2/2] Allow option of using bare \ref links in LaTeX export Lawrence Mitchell
2011-02-12 23:46 ` [PATCH 0/2] References auto-generated labels with \ref " Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c07dac7fa0dd036dec6a1147fde83c5cddf8639.1295529378.git.wence@gmx.li \
    --to=wence@gmx.li \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).