[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Completely hide the :PROPERTIES: drawer in org-mode.
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Completely hide the :PROPERTIES: drawer in org-mode. |
Date: |
Thu, 14 Feb 2019 17:11:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hello,
Michaël Cadilhac <address@hidden> writes:
> I agree; following your advice, I took the simpler path of customizing
> org-special-keyword. By changing its height, I got a small glitch;
> consider:
> https://michael.cadilhac.name/public/org-props-small-1.png
> The lines with ":PROPERTIES:" did not change height; this is simply
> due to the line-feed having the default face. With:
>
> --- a/lisp/org.el
> +++ b/lisp/org.el
> @@ -5934,7 +5934,7 @@ by a #."
> "Fontify drawers."
> (when (re-search-forward org-drawer-regexp limit t)
> (add-text-properties
> - (match-beginning 0) (match-end 0)
> + (match-beginning 0) (+ 1 (match-end 0))
I suggest replacing (match-beginning 0) and (match-end 0) by,
respectively (line-beginning-position) and (line-beginning-position 2)
(+ 1 (match-end 0)) could be greater than (point-max),
(line-beginning-position 2) cannot.
> '(font-lock-fontified t face org-special-keyword))
> (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
> t))
>
> I get the desired outcome:
> https://michael.cadilhac.name/public/org-props-small-2.png
>
> (this is also where org-special-keyword should be replaced with org-drawer.)
>
> Any thoughts?
Would you want to provide a patch including the replacement of
`org-special-keyword' with `org-drawer'?
Thank you!
Regards,
--
Nicolas Goaziou
- [O] Completely hide the :PROPERTIES: drawer in org-mode., Keith David Bershatsky, 2019/02/07
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Nicolas Goaziou, 2019/02/12
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Michaël Cadilhac, 2019/02/12
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Nicolas Goaziou, 2019/02/13
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Michaël Cadilhac, 2019/02/13
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Nicolas Goaziou, 2019/02/13
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Michaël Cadilhac, 2019/02/14
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode.,
Nicolas Goaziou <=
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Michaël Cadilhac, 2019/02/14
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Nicolas Goaziou, 2019/02/14
- Re: [O] Completely hide the :PROPERTIES: drawer in org-mode., Marco Wahl, 2019/02/13