emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anders Johansson <mejlaandersj@gmail.com>
To: org-mode-email <emacs-orgmode@gnu.org>
Subject: [BUG] org-get-buffer-tags no longer strips text properties
Date: Thu, 11 Aug 2022 11:31:21 +0200	[thread overview]
Message-ID: <CAKJdtO_0aUmiKFjS34hoD525vMFkUJuVCCzGrFfR_Lt2_Vm58g@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

Commit 819409 introduced a change where the text-properties of tags
collected from a buffer are no longer stripped, which means tags may be
fontified in unwanted ways in completing-read (this became especially ugly
using org-modern and code for right aligning tags with display properties).

Something like this would fix it:
@@ -11974,7 +11974,7 @@ (defun org-get-buffer-tags ()
          (lambda (el)
            (dolist (tag (org-element-property :tags el))
-             (puthash (list tag) t hashed))))
+             (puthash (list (substring-no-properties tag)) t hashed))))

Anders Johansson

[-- Attachment #2: Type: text/html, Size: 815 bytes --]

             reply	other threads:[~2022-08-11  9:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11  9:31 Anders Johansson [this message]
2022-08-11 11:40 ` [BUG] org-get-buffer-tags no longer strips text properties Ihor Radchenko

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:

  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=CAKJdtO_0aUmiKFjS34hoD525vMFkUJuVCCzGrFfR_Lt2_Vm58g@mail.gmail.com \
    --to=mejlaandersj@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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