Introduce ~org-smart-line-beginning~ to avoid issues

Folded regions confuse the canonical implementation of
smart-line-beginning
master
Jacopo De Simoi 4 years ago
parent 6f11c99ea3
commit 992eeddd44
  1. 9
      global.org

@ -763,10 +763,17 @@
where I would not want to use this feature). Also, disable
~truncate-lines~
#+begin_src emacs-lisp
;; assume that we are in a folded headline; move back to heading
;; otherwise we will be trapped in the invisible region
(add-hook 'org-mode-hook 'turn-on-auto-fill)
(defun org-smart-line-beginning ()
(interactive)
(when (invisible-p (point))
(org-back-to-heading))
(smart-line-beginning))
(define-key org-mode-map (kbd "C-a") 'org-smart-line-beginning)
(setq org-starting-truncated nil
org-startup-folded t)
#+end_src
*** Cosmetics
Change the default ellipsis ~...~ to the unicode ellipsis ~…~

Loading…
Cancel
Save