From ca44456488c129d859ff2609a9b754b2c8fb217f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 20 Aug 2021 17:28:09 -0500 Subject: Follow user preference in `org-return-follows-link' --- lisp/acdw-org.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'lisp') diff --git a/lisp/acdw-org.el b/lisp/acdw-org.el index de2bafc..2f798d9 100644 --- a/lisp/acdw-org.el +++ b/lisp/acdw-org.el @@ -52,13 +52,10 @@ appropriate. In tables, insert a new row or end the table." (_ (newline default))) (cond ;; Act depending on context around point. - - ;; NOTE: I prefer RET to not follow links, but by uncommenting this block, links will be - ;; followed. - - ;; ((eq 'link (car (org-element-context))) - ;; ;; Link: Open it. - ;; (org-open-at-point-global)) + ((and org-return-follows-link + (eq 'link (car (org-element-context)))) + ;; Link: Open it. + (org-open-at-point-global)) ((org-at-heading-p) ;; Heading: Move to position after entry content. -- cgit 1.4.1-21-gabe81