all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
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: Wed, 19 Jul 2023 04:35:22 +0000	[thread overview]
Message-ID: <87ilag1pth.fsf@localhost> (raw)
In-Reply-To: <e6e67b8d-53ac-d77f-4ab6-43823affbbc7@vodafonemail.de>

Jens Schmidt <jschmidt4gnu@vodafonemail.de> writes:

>> 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):
>
> ...
>   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.

OMG. What we had in the past is because of an obscure internal,
undocumented implementation detail of how Emacs adjusts point when it
ends up inside invisible region:

	  /* If the preceding character is both intangible and invisible,
	     and the invisible property is `rear-sticky', perturb it so
	     that the search starts one character earlier -- this ensures
	     that point can never move to the end of an invisible/
	     intangible/rear-sticky region.  */

Except that we do not have intanglible property there and the code below
that comment does not always check for intanglible property.

> 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):

I am not sure if it is a proper fix. The basic problem is that Org's
syntax table does not declare emphasis markup as part of a word.

I need to consult Emacs devs about rules of point adjustment.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2023-07-19  4:36 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
2023-07-18 20:53   ` Jens Schmidt
2023-07-19  4:35     ` Ihor Radchenko [this message]
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

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

  git send-email \
    --in-reply-to=87ilag1pth.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=jschmidt4gnu@vodafonemail.de \
    /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 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.