From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: New line and trailing whitespaces Date: Tue, 23 Apr 2024 19:19:02 +0300 Message-ID: <86h6fs3vd5.fsf@gnu.org> References: <86sezg87oh.fsf@gnu.org> <86o7a486gq.fsf@gnu.org> <86cyqj8f1a.fsf@gnu.org> <86h6fu6jn0.fsf@gnu.org> <86le544i6t.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23275"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 23 18:19:48 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 1rzIs0-0005tx-3a for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 23 Apr 2024 18:19:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzIrP-0005ig-NS; Tue, 23 Apr 2024 12:19:11 -0400 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 1rzIrK-0005iE-VR for help-gnu-emacs@gnu.org; Tue, 23 Apr 2024 12:19:07 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzIrK-0006t2-MT for help-gnu-emacs@gnu.org; Tue, 23 Apr 2024 12:19:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=bPMOdc7NOgalXsMN1m6M6myuwckcNfkjY4Z7EoGa+0w=; b=AZxSICVgYQRmHxdsg1Nc mKf5CdbekwinLQk9vrL65SoP9zMCWP+x2vj4XDuBV45ftL+5sClWF3k+FLb6IsbR3esEhu5+XQiPh ecYQRVYVBZ3nb9pXlh5ENGhJmYsCgqX2a2cjOfKM6TRgR6WidJnDFcW4jSUCy/H9+bR7VibTRy8Ud 2Yh6GWAFDolsWkprtl4ZKQYXgfYqkS7SPeUybjs2SdTSX5EAvkc30GrjwBsg05ZZYCFQ2xhb42Zb9 /UHrbqj6Z5/S6gGq2FwfJ897jspJzIarJrNNh56c5rkOJp3gtKVpChhWy9K5OJuLwRvreG8qXXS8U QUzp+h7dalrynA==; In-Reply-To: (message from Ergus on Tue, 23 Apr 2024 17:38:15 +0200) 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:146448 Archived-At: > Date: Tue, 23 Apr 2024 17:38:15 +0200 > From: Ergus > Cc: help-gnu-emacs@gnu.org > > >You need to customize whitespace-display-mappings. Specifically, the > >tab-mark element of the value is by default the vector '[?� ?\t], and > >you need to replace each of these two characters with a glyph that has > >the face you want, using make-glyph-code. Caveat: a comment in > >whitespace.el explains why only newlines are given a face: > > > > ;; Only insert face bits on NEWLINE char mapping to avoid > > ;; obstruction of other faces like TABs and (HARD) SPACEs > > ;; faces, font-lock faces, etc. > > > > Ahh this is exactly what I want.. > > Do you think it worth adding your paragraph as a comment somewhere in > whitespace or reference that in its manual section? IMO, if we want users to be able to do this, we need a more user-friendly way of doing that. Like define a special face, and make whitespace.el use make-glyph-code with that face, given some user option setting. Patches welcome.