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

move-beginning-of-line move to wrong position on heading when markdown-hide-markup is enabled #815

Open
kuranari opened this issue Nov 19, 2023 · 1 comment

Comments

@kuranari
Copy link
Contributor

kuranari commented Nov 19, 2023

When markdown-hide-markup is enabled, invoking move-beginning-of-lineC-a) on a header line incorrectly moves the cursor to the previous line.

Headings do not use the invisible property. However, this appears to be an intentional choice. #130 (comment)

Expected Behavior

  • Move to beginning of current line

Actual Behavior

  • Move to previouse line

Steps to Reproduce

  1. Place the following in /tmp/emacs/.emacs:
(setq custom-file "/dev/null")

(package-initialize)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-install 'markdown-mode)
 
(setq markdown-hide-markup t)
  1. Make sample.md
text

# Heading 
  1. HOME=/tmp/emacs emacs -Q --load /tmp/emacs/.emacs /tmp/emacs/sample.md
  2. Move to line 3
  3. Hit C-a (move-beginning-of-line

Screenshot

default.mov

Software Versions

  • Markdown Mode: 2.7-alpha
  • Emacs: GNU Emacs 29.1
  • OS: macOS Sonoma 14.1
@kuranari kuranari changed the title move-beginning-of-line move to wrong position quion heading when markdown-hide-markup is enabled move-beginning-of-line move to wrong position on heading when markdown-hide-markup is enabled Nov 19, 2023
@kuranari
Copy link
Contributor Author

kuranari commented Nov 20, 2023

📝 Research Findings

When evaluating the following, it no longer moves to the previous line (not a fundamental solution).

(setq global-disable-point-adjustment t)

https://www.gnu.org/software/emacs/manual/html_node/elisp/Adjusting-Point.html

kuranari added a commit to kuranari/markdown-mode that referenced this issue Dec 5, 2023
kuranari added a commit to kuranari/markdown-mode that referenced this issue Dec 27, 2023
kuranari added a commit to kuranari/markdown-mode that referenced this issue Dec 27, 2023
kuranari added a commit to kuranari/markdown-mode that referenced this issue Dec 27, 2023
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

1 participant