[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: prettify-symbols-mode in org agenda?
From: |
William Xu |
Subject: |
Re: prettify-symbols-mode in org agenda? |
Date: |
Sat, 01 May 2021 15:33:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) |
Ihor Radchenko <yantar92@gmail.com> writes:
> Bastien <bzg@gnu.org> writes:
>
>> Thanks for bringing this idea up.
>>
>> If allowing prettify-symbols-mode in Org agenda mode does not slow
>> down the agenda display and does not create spacing problems, then
>> yes, why not.
>
> Here is the patch. It will be great if other people test it first, as I
> rewrote it from advised functions in my personal config.
Works for me. Thanks!
> (org-agenda-highlight-todo): Preserve composition property used,
> i.e. by `prettify-symbols-mode'.
It looks like this change is not really needed, my emacs is built from
git master. Maybe the 'composition property is now preserved
automatically in the buffer?
-William
> @@ -7110,7 +7119,8 @@ (defun org-agenda-limit-interactively (remove)
> (defun org-agenda-highlight-todo (x)
> (let ((org-done-keywords org-done-keywords-for-agenda)
> (case-fold-search nil)
> - re)
> + re
> + composition-property)
> (if (eq x 'line)
> (save-excursion
> (beginning-of-line 1)
> @@ -7119,10 +7129,12 @@ (defun org-agenda-highlight-todo (x)
> (when (looking-at (concat "[ \t]*\\.*\\(" re "\\) +"))
> (add-text-properties (match-beginning 0) (match-end 1)
> (list 'face (org-get-todo-face 1)))
> - (let ((s (buffer-substring (match-beginning 1) (match-end 1))))
> + (setq composition-property (plist-get (text-properties-at
> (match-beginning 1)) 'composition))
> + (let ((s (org-buffer-substring-fontified (match-beginning 1)
> (match-end 1))))
> (delete-region (match-beginning 1) (1- (match-end 0)))
> (goto-char (match-beginning 1))
> - (insert (format org-agenda-todo-keyword-format s)))))
> + (insert (format org-agenda-todo-keyword-format s))
> + (add-text-properties (match-beginning 1) (match-end 1) (list
> 'composition composition-property)))))
> (let ((pl (text-property-any 0 (length x) 'org-heading t x)))
> (setq re (get-text-property 0 'org-todo-regexp x))
> (when (and re
- Re: prettify-symbols-mode in org agenda?, Ihor Radchenko, 2021/05/01
- Re: prettify-symbols-mode in org agenda?,
William Xu <=
- Re: prettify-symbols-mode in org agenda?, Ihor Radchenko, 2021/05/01
- Re: prettify-symbols-mode in org agenda?, William Xu, 2021/05/02
- Re: prettify-symbols-mode in org agenda?, Ihor Radchenko, 2021/05/02
- Re: prettify-symbols-mode in org agenda?, William Xu, 2021/05/02
- Re: prettify-symbols-mode in org agenda?, Bastien, 2021/05/03
- Re: prettify-symbols-mode in org agenda?, Ihor Radchenko, 2021/05/04
- Re: prettify-symbols-mode in org agenda?, Ihor Radchenko, 2021/05/04
- Re: prettify-symbols-mode in org agenda?, Ihor Radchenko, 2021/05/05
- Re: prettify-symbols-mode in org agenda?, William Xu, 2021/05/05
- Re: prettify-symbols-mode in org agenda?, Ihor Radchenko, 2021/05/05