[-- Attachment #1: Type: text/plain, Size: 85 bytes --] Hi, How can I prevent orgmode from turning timestamps and tags into links? Thanks! [-- Attachment #2: Type: text/html, Size: 154 bytes --]
Peter Bienstman writes:
> How can I prevent orgmode from turning timestamps and tags into links?
Could you provide a minimal example that demonstrates that behavior
you're referring to?
[-- Attachment #1: Type: text/plain, Size: 336 bytes --] I don't want clicking on timestamps and tags to open a search Window. On Sat, 10 Oct 2020, 17:33 Kyle Meyer, <kyle@kyleam.com> wrote: > Peter Bienstman writes: > > > How can I prevent orgmode from turning timestamps and tags into links? > > Could you provide a minimal example that demonstrates that behavior > you're referring to? > [-- Attachment #2: Type: text/html, Size: 624 bytes --]
Peter Bienstman writes:
> I don't want clicking on timestamps and tags to open a search Window.
You can customize org-highlight-links. For example, assuming you have
seq and org loaded:
(setq org-highlight-links
(seq-remove (lambda (x) (memq x '(tag date)))
org-highlight-links))
[-- Attachment #1: Type: text/plain, Size: 500 bytes --] Thanks! Is there a way to achieve this while still keeping the syntax highlighting intact? On Sun, Oct 11, 2020 at 7:23 AM Kyle Meyer <kyle@kyleam.com> wrote: > Peter Bienstman writes: > > > I don't want clicking on timestamps and tags to open a search Window. > > You can customize org-highlight-links. For example, assuming you have > seq and org loaded: > > (setq org-highlight-links > (seq-remove (lambda (x) (memq x '(tag date))) > org-highlight-links)) > [-- Attachment #2: Type: text/html, Size: 836 bytes --]
Peter Bienstman writes:
> Thanks! Is there a way to achieve this while still keeping the syntax
> highlighting intact?
I'm not aware of a built-in option to do that. If you want to come up
with a custom solution, the code to study is org-set-font-lock-defaults,
which in turn calls org-activate-tags and org-activate-dates. You could
override -activate-tags and -activate-dates to not apply the mouse-face
and keymap properties. Or perhaps just remove them afterwards:
(defun my/org-discard-mouse (&rest _)
(remove-text-properties (match-beginning 1) (match-end 1)
'(mouse-face nil keymap nil))
t)
(advice-add 'org-activate-tags :after-while #'my/org-discard-mouse)
(advice-add 'org-activate-dates :after-while #'my/org-discard-mouse)