Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tags misalign when editing heading in org-mode #1264

Open
some-mthfka opened this issue Feb 2, 2020 · 2 comments
Open

Tags misalign when editing heading in org-mode #1264

some-mthfka opened this issue Feb 2, 2020 · 2 comments

Comments

@some-mthfka
Copy link

Issue type

  • Bug report

Environment

Emacs version: 26.3
Operating System: arch linux
Evil version: evil-git-874beba
Evil installation type:
Graphical/Terminal: graphical
Tested in a make emacs session (see CONTRIBUTING.md): yes

Reproduction steps

  • Start Emacs
  • (org-mode)
  • (org-insert-heading)
  • (org-set-tags) and add at least one tag
  • edit the title of the heading

when editing the title, you will see that adding characters preserves the alignment of the tags; removing characters breaks the alignment.

In vanilla emacs the alignment is always preserved.

@some-mthfka
Copy link
Author

a similar thing happens when editing table cells

@duianto
Copy link
Contributor

duianto commented Apr 16, 2021

Tags move

insert state

 <backspace>		;; evil-delete-backward-char-and-join

normal and visual state

 <delete>		;; evil-delete-char
 c			;; evil-change
 d			;; evil-delete
 s			;; evil-substitute
 x			;; evil-delete-char
 X			;; evil-delete-backward-char

emacs state (C-z)

 <delete>		;; delete-forward-char

Tags remain aligned

insert state

 <delete>		;; org-delete-char

emacs state (C-z)

 <backspace>		;; org-delete-backward-char

Opposite behavior

In at least one case, Evil behaves as expected, while vanilla Emacs moves the tags.

The tags don't move when pressing delete in insert state:

 <delete>		;; org-delete-char

<delete> runs the command org-delete-char (found in org-mode-map),
which is an interactive compiled Lisp function in ‘org.el’.

It is bound to <delete>.

(org-delete-char N)

But they move in vanilla Emacs:

 <delete>		   ;; delete-forward-char

<deletechar> (translated from <delete>) runs the command
delete-forward-char (found in global-map), which is an interactive
compiled Lisp function in ‘simple.el’.

It is bound to <deletechar>.

(delete-forward-char N &optional KILLFLAG)

Both when Emacs is started with:

  • emacs -q
    Org mode version 9.4.4 (release_9.4.4 @ c:/Program Files/Emacs/x86_64/share/emacs/27.2/lisp/org/)Org mode version 9.4.4 (release_9.4.4 @ c:/Program Files/Emacs/x86_64/share/emacs/27.2/lisp/org/)
  • and with the org-plus-contrib package is installed:
    Org mode version 9.4.5 (9.4.5-16-g94be20-elpaplus @ c:/Users/username/AppData/Roaming/.org-plus-contrib.emacs.d/elpa/org-plus-contrib-20210412/)

The Evil config (Evil version 1.14.0) uses the default Emacs 27.2, org version:
Org mode version 9.4.4 (release_9.4.4 @ c:/Program Files/Emacs/x86_64/share/emacs/27.2/lisp/org/)

The above was tested with:

GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26
Windows 10 Version 2004

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants