From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.help Subject: Re: Varying line spacing with font-locking in org Date: Mon, 29 Jan 2024 16:45:50 +0000 Message-ID: <87h6iw3x6p.fsf@localhost> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32688"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Psionic K Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jan 29 17:43:01 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rUUiq-0008HF-KK for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 29 Jan 2024 17:43:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUUiJ-0004nR-7R; Mon, 29 Jan 2024 11:42:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUUiH-0004nE-6f for help-gnu-emacs@gnu.org; Mon, 29 Jan 2024 11:42:25 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUUiE-0002Pk-6K for help-gnu-emacs@gnu.org; Mon, 29 Jan 2024 11:42:24 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 6459F240104 for ; Mon, 29 Jan 2024 17:42:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706546538; bh=3nbugHdFCZoKuweFT2mhzgFj5GLZUbOk1WIeB7/WaN0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=f4iELDW3mskYeZ7JxS9tiwG7u5KAXdsfJYNLHxSTcKuITBUmFW8ofIuV4iTXgt4SH 3tLrprykCVlGQcj4H4/znpuZ0X/OHRUjVkRt52Jeh/aoSJO+XlvNBrzJW7sfvVu45K 4IiWBolzcMQTP0qZyDwlVx20fJJkfDOWMHZXa/pZchXFlTH9aD8BzV4MjlzZJSqKEN fAVftuEYOfyDZx4V2/CIkwVglrdl/jUTvPwDR11A2PuoaE3Gla1K+5nrb/id1tZQqp ++TS5Wu6LuYoDVkOlJh4WjqyL8B4HaQP1LoXwBf2JxXv1eN+dkGtTphNl+zyUyplv6 0R42GWRr8/e/Q== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TNvGd1xXhz6twc; Mon, 29 Jan 2024 17:42:16 +0100 (CET) In-Reply-To: Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145817 Archived-At: Psionic K writes: > I implemented element by element line spacing in org using font > locking. Here's a description of my method and some findings. > ... > The result is mostly satisfactory. Two issues I ran into so far: > 1. Org mode folding creates a situation where a different newline > becomes the one considered for spacing and height. This can likely be > fixed by folding the trailing newline rather than the heading's > newline (notified Org maintainer) That's not trivial, but should be there on the latest main branch of Org mode. The reason why it is impossible to fold the trailing newline is simple: * Heading * Another heading would look like * Heading ...* Another heading -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at