emacs-orgmode
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]