Re: [PATCH] Fix moving cursor in org-set-tags-command

2020-05-10 Thread Matthew Lundin
Nicolas Goaziou writes: > >> -(when (save-excursion (skip-chars-backward "*") (bolp)) >> - (forward-char >> +(and (looking-at " ") >> + (string-match "\\*+" (buffer-substring (point-at-bol) (point))) >> + (forward-char > > Please replace `and' with `when' if

Re: [PATCH] Fix moving cursor in org-set-tags-command

2020-05-09 Thread Kyle Meyer
Nicolas Goaziou writes: > Then let's push Matt Lundin's solution (with skip-chars-backward), along > with your tests! Pushed (6e50b22ff). Thanks.

Re: [PATCH] Fix moving cursor in org-set-tags-command

2020-05-09 Thread Nicolas Goaziou
Hello, Kyle Meyer writes: > I've tried to capture the issues in the tests below. The first added > check would fail before 450452de4 (and its replacement, 44ec473c1). The > second check would fail with 44ec473c1, the third with both 450452de4 > and 44ec473c1. Matt's patch would get past the

Re: [PATCH] Fix moving cursor in org-set-tags-command

2020-05-08 Thread Kyle Meyer
Nicolas Goaziou writes: > Matt Lundin writes: > >> -(when (save-excursion (skip-chars-backward "*") (bolp)) >> - (forward-char >> +(and (looking-at " ") >> + (string-match "\\*+" (buffer-substring (point-at-bol) (point))) >> + (forward-char > > Please replace `and'

Re: [PATCH] Fix moving cursor in org-set-tags-command

2020-05-08 Thread Nicolas Goaziou
Hello, Matt Lundin writes: > -(when (save-excursion (skip-chars-backward "*") (bolp)) > - (forward-char > +(and (looking-at " ") > + (string-match "\\*+" (buffer-substring (point-at-bol) (point))) > + (forward-char Please replace `and' with `when' if side-effects

Re: [PATCH] Fix moving cursor in org-set-tags-command

2020-05-07 Thread Kyle Meyer
Matt Lundin writes: > Commit 44ec473c199262d89b372d8a6cd35bed7672164d from Feb. 23 causes > org-set-tags-command to move the cursor forward 1 char when situated on > headline asterisks. [...] > This commit modified a previous change on Feb. 21 > (450452de4b790706d187291f9f71a286f8f62004). But

[PATCH] Fix moving cursor in org-set-tags-command

2020-05-07 Thread Matt Lundin
Commit 44ec473c199262d89b372d8a6cd35bed7672164d from Feb. 23 causes org-set-tags-command to move the cursor forward 1 char when situated on headline asterisks. So if I am on the following level 1 headline with the cursor on the asterisk as below... * Headline ^ ...and I call org-set-tags