From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Completely hide the :PROPERTIES: drawer in org-mode. Date: Thu, 14 Feb 2019 17:11:13 +0100 Message-ID: <87y36iqrj2.fsf@nicolasgoaziou.fr> References: <87lg2l4d2g.fsf@nicolasgoaziou.fr> <875ztnu5c3.fsf@nicolasgoaziou.fr> <87y36jsmwk.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:39714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guJbe-0001Ry-Oe for emacs-orgmode@gnu.org; Thu, 14 Feb 2019 11:11:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guJbd-0006UX-Kb for emacs-orgmode@gnu.org; Thu, 14 Feb 2019 11:11:22 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:58141) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guJbd-0006SY-EO for emacs-orgmode@gnu.org; Thu, 14 Feb 2019 11:11:21 -0500 In-Reply-To: (=?utf-8?Q?=22Micha=C3=ABl?= Cadilhac"'s message of "Thu, 14 Feb 2019 14:16:20 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: =?utf-8?Q?Micha=C3=ABl?= Cadilhac Cc: Keith David Bershatsky , emacs-orgmode@gnu.org Hello, Micha=C3=ABl Cadilhac 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-drawe= r.) > > Any thoughts? Would you want to provide a patch including the replacement of `org-special-keyword' with `org-drawer'? Thank you! Regards, --=20 Nicolas Goaziou