Skip to content

Commit

Permalink
Fix link folding when `org-fold-core-style' is set to 'overlays (#59)
Browse files Browse the repository at this point in the history
When `org-fold-core-style' is set to 'overlays, do not use
`org-fold-core' property symbols but use 'invisible instead.
  • Loading branch information
awth13 authored Jul 16, 2024
1 parent 81eba5d commit 32ee50f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ jobs:
strategy:
matrix:
emacs-version:
- 27.1
- 27.2
- 29.1
- snapshot
elisp-check:
- melpa
Expand Down
10 changes: 6 additions & 4 deletions org-appear.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
;; org-fragtog Copyright (C) 2020 Benjamin Levy - MIT/X11 License
;; org-appear Copyright (C) 2021 Alice Istleyeva - MIT License
;; Author: Alice Istleyeva <[email protected]>
;; Version: 0.3.0
;; Version: 0.3.1
;; Description: Toggle Org mode element visibility upon entering and leaving
;; Homepage: https://github.com/awth13/org-appear
;; Package-Requires: ((emacs "25.1") (org "9.3"))
;; Package-Requires: ((emacs "29.1") (org "9.3"))

;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -358,7 +358,8 @@ Return nil if element cannot be parsed."
((eq elem-type 'keyword)
(remove-text-properties start end '(invisible org-link)))
((and (featurep 'org-fold)
(eq elem-type 'link))
(eq elem-type 'link)
(eq org-fold-core-style 'text-properties))
(remove-text-properties start
visible-start
(list (org-fold-core--property-symbol-get-create 'org-link) nil))
Expand Down Expand Up @@ -405,7 +406,8 @@ When RENEW is non-nil, obtain element at point instead."
((memq elem-type '(keyword latex-fragment latex-environment))
(font-lock-flush start end))
((and (featurep 'org-fold)
(eq elem-type 'link))
(eq elem-type 'link)
(eq org-fold-core-style 'text-properties))
(put-text-property start
visible-start
(org-fold-core--property-symbol-get-create 'org-link)
Expand Down

0 comments on commit 32ee50f

Please sign in to comment.