emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: Peter Bienstman <peter.bienstman@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Disabling automatic links for timestamps and tags
Date: Sun, 18 Oct 2020 15:27:34 -0400	[thread overview]
Message-ID: <87r1pvz655.fsf@kyleam.com> (raw)
In-Reply-To: <CAMdxoPHWJiNC_eK49uj7B9SU-4fVU0iCJ-x8-1nfwpAgX1VAQA@mail.gmail.com>

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)


      reply	other threads:[~2020-10-18 19:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1pvz655.fsf@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=peter.bienstman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).