From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Mark E. Shoulson" Subject: [PATCH] Fix for displaying entities ending in a number Date: Wed, 23 May 2012 21:22:52 -0400 Message-ID: <4FBD8D6C.5040801@kli.org> References: <4FA9DBFA.8080405@kli.org> <87hav68syk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050809000709050908050101" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXMlb-00037P-OA for emacs-orgmode@gnu.org; Wed, 23 May 2012 21:23:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXMlZ-0003C9-Ss for emacs-orgmode@gnu.org; Wed, 23 May 2012 21:23:03 -0400 Received: from pi.meson.org ([96.56.207.26]:44899) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SXMlZ-0003Bu-Nj for emacs-orgmode@gnu.org; Wed, 23 May 2012 21:23:01 -0400 In-Reply-To: <87hav68syk.fsf@gmail.com> 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: Nicolas Goaziou Cc: org-mode mailing list This is a multi-part message in MIME format. --------------050809000709050908050101 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 05/23/2012 05:53 PM, Nicolas Goaziou wrote: > Hello, > > "Mark E. Shoulson" 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, > --------------050809000709050908050101 Content-Type: text/x-patch; name="0001-Fix-for-displaying-entities-ending-in-a-number.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Fix-for-displaying-entities-ending-in-a-number.patch" >From 9b8e1b56c5c60720f985ea2b26952702c6c730a6 Mon Sep 17 00:00:00 2001 From: Mark Shoulson 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 --------------050809000709050908050101--