all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Single opening star induces bold face if immediately preceeding inlinetask
@ 2019-03-27 10:26 Alain.Cochard
  2021-10-03  7:53 ` [PATCH] [O] " Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Alain.Cochard @ 2019-03-27 10:26 UTC (permalink / raw)
  To: emacs-orgmode



Hello.

With this org file, the "blah" is in bold face.

* foo
a *blah
*************** task
bar
*************** END

I would it is a small bug.  NB: If I insert a blank line before the
task, the face goes back to normal.

Regards.

I am using

emacs -Q -l minimal

with 'mininmal' containing only 

(add-to-list 'load-path "~/Org/Coch-git/org-mode/lisp")
(require 'org-inlinetask)

Emacs : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.18.9) of 2018-05-30 Package: Org mode version 9.2.2
(release_9.2.2-339-gd9afed @
/home/cochard/Org/Coch-git/org-mode/lisp/)



-- 
EOST (École et Observatoire des Sciences de la Terre) 
IPG (Institut de Physique du Globe) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106] | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France    | Fax:   +33 (0)3 68 85 01 25     

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] [O] Single opening star induces bold face if immediately preceeding inlinetask
  2019-03-27 10:26 Single opening star induces bold face if immediately preceeding inlinetask Alain.Cochard
@ 2021-10-03  7:53 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2021-10-03  7:53 UTC (permalink / raw)
  To: alain.cochard; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

Alain.Cochard@unistra.fr writes:

> Hello.
>
> With this org file, the "blah" is in bold face.
>
> * foo
> a *blah
> *************** task
> bar
> *************** END
>
> I would it is a small bug.  NB: If I insert a blank line before the
> task, the face goes back to normal.

Thanks for your report. It took a while to process, but here is the fix.

Best,
Ihor


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org.el-Do-not-span-emphasis-over-inlinetask-boundari.patch --]
[-- Type: text/x-diff, Size: 1678 bytes --]

From ae325834b75944d81ad57087336ca6efa6e57480 Mon Sep 17 00:00:00 2001
Message-Id: <ae325834b75944d81ad57087336ca6efa6e57480.1633247511.git.yantar92@gmail.com>
From: Ihor Radchenko <yantar92@gmail.com>
Date: Sun, 3 Oct 2021 15:48:23 +0800
Subject: [PATCH] org.el: Do not span emphasis over inlinetask boundaries

* lisp/org.el (org-do-emphasis-faces): Check paragraph boundaries
within emphasis even when the boundary is not starting right at the
beginning of the emphasis.

Fixes https://orgmode.org/list/23707.20428.546749.44853@frac.u-strasbg.fr
---
 lisp/org.el | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 3546e7edd..1551986f6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5096,8 +5096,14 @@ (defun org-do-emphasis-faces (limit)
 		   ;; Match full emphasis markup regexp.
 		   (looking-at (if verbatim? org-verbatim-re org-emph-re))
 		   ;; Do not span over paragraph boundaries.
-		   (not (string-match-p org-element-paragraph-separate
-					(match-string 2)))
+		   (not (save-match-data
+                        (save-excursion
+                          (goto-char (match-beginning 2))
+                          (re-search-forward org-element-paragraph-separate
+                                             (save-excursion
+                                               (goto-char (match-end 2))
+                                               (line-end-position))
+                                             'noerror))))
 		   ;; Do not span over cells in table rows.
 		   (not (and (save-match-data (org-match-line "[ \t]*|"))
 			     (string-match-p "|" (match-string 4))))))
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-03  8:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-27 10:26 Single opening star induces bold face if immediately preceeding inlinetask Alain.Cochard
2021-10-03  7:53 ` [PATCH] [O] " Ihor Radchenko

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.