emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Farblos <akfkqu.9df7rp@vodafonemail.de>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] SPACE jumps to tag in header line after hidden emphasis marker [9.7-pre (release_9.6.7-562-g5b6268 @ /home/jschmidt/work/org-mode/lisp/)]
Date: Tue, 18 Jul 2023 21:55:46 +0200	[thread overview]
Message-ID: <4f92a0f3-6547-61cf-2f8e-e79dffa30188@vodafonemail.de> (raw)
In-Reply-To: <87edl53ae3.fsf@localhost>

On 2023-07-18  10:13, Ihor Radchenko wrote:

> Confirmed.

Thanks for caring about this so quickly ...

> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=64696

... and for the discussion with Eli & co.  Which I did not try to follow 
TBH.

> Fixed, on main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3e3b873d3

Well, I have one not-so-minor nit here: With that commit you cannot 
insert text *before* some text having hidden emphasis without breaking 
the emphasis.  More concretely (in an empty org-mode buffer):

  t	     ;; org-self-insert-command
  e	     ;; org-self-insert-command
  s	     ;; org-self-insert-command
  t	     ;; org-self-insert-command
  SPC	     ;; org-self-insert-command
  =	     ;; org-self-insert-command
  t	     ;; org-self-insert-command
  e	     ;; org-self-insert-command
  s	     ;; org-self-insert-command
  t	     ;; org-self-insert-command
  =	     ;; org-self-insert-command
  SPC	     ;; org-self-insert-command
  t	     ;; org-self-insert-command
  e	     ;; org-self-insert-command
  s	     ;; org-self-insert-command
  t	     ;; org-self-insert-command
  C-<left>    ;; left-word
  C-<left>    ;; left-word
  SPC	     ;; org-self-insert-command

The last SPC breaks the emphasis around the middle "test", which it did 
not previously.  Previously, the SPC would just move the whole 
emphasized word one space to the right.  Which I somehow got used to, 
and probably many others as well.

OTOH, to fix my bug, only the first of the new `org-rear-nonsticky-at' 
calls is actually needed.  So probably we could have something like the 
following to get my bug fixed without any changes in behavior (diff on 
top of main, that is, in addition to your commit):

diff --git a/lisp/org.el b/lisp/org.el
index 0d8b5386c..71f482f64 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5153,8 +5153,7 @@ stacked delimiters is N.  Escaping delimiters is 
not possible."
                  ;; 
https://orgmode.org/list/8b691a7f-6b62-d573-e5a8-80fac3dc9bc6@vodafonemail.de
                  (org-rear-nonsticky-at (match-beginning 5))
  		(add-text-properties (match-beginning 3) (match-end 3)
-				     '(invisible t))
-                (org-rear-nonsticky-at (match-end 3)))
+				     '(invisible t)))
  	      (throw :exit t))))))))

  (defun org-emphasize (&optional char)



  reply	other threads:[~2023-07-19  7:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 20:34 [BUG] SPACE jumps to tag in header line after hidden emphasis marker [9.7-pre (release_9.6.7-562-g5b6268 @ /home/jschmidt/work/org-mode/lisp/)] Jens Schmidt
2023-07-18  8:13 ` Ihor Radchenko
2023-07-18 19:55   ` Farblos [this message]
2023-07-18 20:53   ` Jens Schmidt
2023-07-19  4:35     ` Ihor Radchenko
2023-07-19  6:53       ` [BUG] Emphasis markers should be considered word constituents (was: [BUG] SPACE jumps to tag in header line after hidden emphasis marker [9.7-pre (release_9.6.7-562-g5b6268 @ /home/jschmidt/work/org-mode/lisp/)]) Ihor Radchenko
2023-07-19  7:10       ` [BUG] SPACE jumps to tag in header line after hidden emphasis marker [9.7-pre (release_9.6.7-562-g5b6268 @ /home/jschmidt/work/org-mode/lisp/)] Ihor Radchenko
2023-07-19 22:37         ` Jens Schmidt
2023-07-20 20:55   ` Jens Schmidt
2023-07-21  8:30     ` Ihor Radchenko

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=4f92a0f3-6547-61cf-2f8e-e79dffa30188@vodafonemail.de \
    --to=akfkqu.9df7rp@vodafonemail.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /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).