From: "Mark E. Shoulson" <mark@kli.org>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: org-mode mailing list <emacs-orgmode@gnu.org>
Subject: [PATCH] Fix for displaying entities ending in a number
Date: Wed, 23 May 2012 21:22:52 -0400 [thread overview]
Message-ID: <4FBD8D6C.5040801@kli.org> (raw)
In-Reply-To: <87hav68syk.fsf@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
On 05/23/2012 05:53 PM, Nicolas Goaziou wrote:
> Hello,
>
> "Mark E. Shoulson"<mark@kli.org> writes:
>
>> There's a small bug in rendering the entities when org-pretty-entities
>> is on (I get the feeling that org-pretty-entities is not a very
>> commonly-used feature). The entities \sup1 \sup2 \sup3 and \there4 are
>> not rendered properly. The regex detecting entities apparently doesn't
>> catch numbers at the end, except for the special case of fractions. I've
>> added the others to the special-casing and attach a patch for it; I
>> hope I managed to include the changelog properly (is git format-patch -
>> -attach the way to go?).
> This looks good. You should add a title to your patch, like "Fix
> detection of entities ending with a number" or "org-entities: Add some
> entities".
>
> Also, please capitalize the word after the colons.
I was trying to copy the format seen in other patches on the list; I
guess I missed some details. I've set the subject of this thread as
I've seen done with other patches, and I attach only a single patch, as
requested by the website, and created the changelog with C-x 4 a and
everything. I hope I got it right.
Other patch follows under separate cover.
>
> Could you modify slightly your changelogs before I apply the patches?
>
> Thank you.
>
>
> Regards,
>
[-- Attachment #2: 0001-Fix-for-displaying-entities-ending-in-a-number.patch --]
[-- Type: text/x-patch, Size: 1006 bytes --]
From 9b8e1b56c5c60720f985ea2b26952702c6c730a6 Mon Sep 17 00:00:00 2001
From: Mark Shoulson <mark@kli.org>
Date: Wed, 23 May 2012 20:17:40 -0400
Subject: [PATCH] Fix for displaying entities ending in a number
* lisp/org.el (org-fontify-entities): Fix bug: The entities \sup[123] and
\there4 were not "prettified" when org-pretty-entities was enabled.
TINYCHANGE
---
lisp/org.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 0b00851..c44c7ab 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5966,7 +5966,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
(when org-pretty-entities
(catch 'match
(while (re-search-forward
- "\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)"
+ "\\\\\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)"
limit t)
(if (and (not (org-in-indented-comment-line))
(setq ee (org-entity-get (match-string 1)))
--
1.7.7.6
next prev parent reply other threads:[~2012-05-24 1:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 2:52 Entities Mark E. Shoulson
2012-05-23 21:53 ` Entities Nicolas Goaziou
2012-05-24 1:22 ` Mark E. Shoulson [this message]
2012-05-25 15:00 ` [PATCH] Fix for displaying entities ending in a number Nicolas Goaziou
2012-05-24 2:02 ` [PATCH] Add entities for /, +, _, = Mark E. Shoulson
2012-05-25 15:04 ` Nicolas Goaziou
2012-05-25 20:40 ` Mark E. Shoulson
2012-05-25 21:23 ` 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=4FBD8D6C.5040801@kli.org \
--to=mark@kli.org \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/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).