Org-mode mailing list
 help / color / mirror / Atom feed
* Disabling automatic links for timestamps and tags
@ 2020-10-10 14:31 Peter Bienstman
  2020-10-10 15:33 ` Kyle Meyer
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Bienstman @ 2020-10-10 14:31 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Disabling automatic links for timestamps and tags
  2020-10-10 14:31 Disabling automatic links for timestamps and tags Peter Bienstman
@ 2020-10-10 15:33 ` Kyle Meyer
  2020-10-11  4:59   ` Peter Bienstman
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle Meyer @ 2020-10-10 15:33 UTC (permalink / raw)
  To: Peter Bienstman; +Cc: emacs-orgmode

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?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Disabling automatic links for timestamps and tags
  2020-10-10 15:33 ` Kyle Meyer
@ 2020-10-11  4:59   ` Peter Bienstman
  2020-10-11  5:22     ` Kyle Meyer
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Bienstman @ 2020-10-11  4:59 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Disabling automatic links for timestamps and tags
  2020-10-11  4:59   ` Peter Bienstman
@ 2020-10-11  5:22     ` Kyle Meyer
  2020-10-11  7:24       ` Peter Bienstman
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle Meyer @ 2020-10-11  5:22 UTC (permalink / raw)
  To: Peter Bienstman; +Cc: emacs-orgmode

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))


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Disabling automatic links for timestamps and tags
  2020-10-11  5:22     ` Kyle Meyer
@ 2020-10-11  7:24       ` Peter Bienstman
  2020-10-18 19:27         ` Kyle Meyer
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Bienstman @ 2020-10-11  7:24 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Disabling automatic links for timestamps and tags
  2020-10-11  7:24       ` Peter Bienstman
@ 2020-10-18 19:27         ` Kyle Meyer
  0 siblings, 0 replies; 6+ messages in thread
From: Kyle Meyer @ 2020-10-18 19:27 UTC (permalink / raw)
  To: Peter Bienstman; +Cc: emacs-orgmode

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)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-18 19:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-10 14:31 Disabling automatic links for timestamps and tags Peter Bienstman
2020-10-10 15:33 ` Kyle Meyer
2020-10-11  4:59   ` Peter Bienstman
2020-10-11  5:22     ` Kyle Meyer
2020-10-11  7:24       ` Peter Bienstman
2020-10-18 19:27         ` Kyle Meyer

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git