From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.help Subject: Re: New line and trailing whitespaces Date: Wed, 24 Apr 2024 04:41:26 +0200 Message-ID: References: <86sezg87oh.fsf@gnu.org> <86o7a486gq.fsf@gnu.org> <86cyqj8f1a.fsf@gnu.org> <86h6fu6jn0.fsf@gnu.org> <86le544i6t.fsf@gnu.org> <86h6fs3vd5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17876"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 24 04:42:08 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 1rzSaF-0004Qf-JK for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 24 Apr 2024 04:42:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzSZj-0002DZ-0m; Tue, 23 Apr 2024 22:41:35 -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 1rzSZh-0002DG-MA for help-gnu-emacs@gnu.org; Tue, 23 Apr 2024 22:41:33 -0400 Original-Received: from sonic315-14.consmr.mail.bf2.yahoo.com ([74.6.134.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rzSZg-00022s-0z for help-gnu-emacs@gnu.org; Tue, 23 Apr 2024 22:41:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1713926489; bh=0ZjzZmtKtYXC3bgLiubaidW6MMzooFnfNPuiUgDGgqE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=E1EJuGY817179uvj0TwiLqnRLTW/DjN6FT6m4J083c+PVYhVQ4Uq+HxNBX4hJSV9dWCDSEl4eL8tVXf2lK6R3ElfcPoLW5DzN3k2ez6sGjALVggZJ6wihCyOktjChQEhPqDGNeqJ5JYQQINxLZYhpF5Zja0BxQGxu/s1Cw53emDBHOOqhyYOQEMt30eibidKzmT4mH9Wu2pBgrn4PABQaj7/K+goM9980/KcO53F7x+TSFCNCHJEdYSutDWmBC2+adh/zGswMwMaKwvLohqh0Xs4BWpoYUWXpHqNn9b+O6LIbs4rjoP59eiZn0PI30apE7F9yecSRJoOJj3JT8tEEg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1713926489; bh=LahPxWCs2T/LVl64xw90Q/hUL2uPtWGTuvu8ZhUZIOf=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=goPhclBYPmWaIxRA2T8EWzavy25FOl6YDVy3hF3dMmnUorV0aRjY0wGXs2HOBrH1PMtg1M+4D+WH9TOmcvdqnjCdb3CORJQgmxVYMl9boBR+zJ7zqf6eXBP8w8BOkjYTgMYLZ6fszKvDuY/S13E8pqmHFGO1S13Fh/XZcTn6kdkid0oYzY+zD/z5uZxE6gms8xrlnVEexTCnwkyAuuVOPE5czduDq8J2FzKpslb2V6irO+JUYn3k32AHHpmI9GnBMAwBB0Sl1gDJWAEtyW8jBfPt2gnSS9Q5ZKVawm1TraWSDcrlEukhOs2dSlK6Lh7t2hOn0IVLCU/MVCALZgL3lA== X-YMail-OSG: KNm_zNMVM1lLRJzLXOsYLk8zXe62jciPL0Nx2r0iEem2Ny.ey.mV5m0ZoV8xA7t GIrTMw7UCyV5yrpeHVICwkRdwlqzFFyCMEFMrZ.pQsW84rHahi6ICWXR5lz9g03fWset6SK_pIv6 bj2mTH0c2LuqZxcxe4jvf84owh0XDj_.kR7Czy7.pJEIz_h61scH9Lr4ZmfeunG4OAPZCw7U8PUy NUiu8a_oDsiRqd7j_ahgkVArJ9N_stJMZTuyddqBro0m_8PK88TrmKbWE91rGSdzUn62ARTJL4O4 AT1D8zXP1MU4kQlGEGHqsAKMDyFszzoOJvqwXPaFLrsJdUnK1HeH3jgME1rZXBmI7fQgGA0lPyQq zOJwFs3A9LSyfMJIIIF8KSP8FEvHAdnSyi40yyCTBhnoUgfoprPn9I6edDTbtN.DhNVEVLhZZDXm fMnP5C_2lWWFf2I7TLtCl2KfVTUTl1Xpy63vtuxD9kh3dqGMd_7.gnzhd7VZDPBwxR1jTubLJiex lq.MyOYXGZl6F8kd.Im9BmV2467b1Jtmapkgn.3L.9jIaEI5AxaJFaEYAwtqAtX5uHSO6CdUF.6i Zo6nhTAsG.nhrkbj4Rb7rIUg4i0yixR9O9vk8CsWfUAlAyDh756vE0RDNIuDY_BLYUyAXU65FFRQ opB1rjycLKENyZbLbw1jmO2NljbE6gqCmiDcZxLhREdVzeNr5K.ClrxMy9fD4bcMnj7ijutkAVlZ dZq3vfL.fJINlSPGGxcz5DZpTCTE59n6Mj.lGhmUUuN6ZoRIPpxxBjZb7Ugt8XkEAErUnk6mTQY0 KEi7KR6POK9dVsWvlFtMT4aTFtPgGwIiIW2yUZAQsd X-Sonic-MF: X-Sonic-ID: e7dda571-fb6f-4bfc-a2fb-b4b6fc0f6e63 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Wed, 24 Apr 2024 02:41:29 +0000 Original-Received: by hermes--production-ir2-7b99fc9bb6-4j82p (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 348940bd2d3a0211cfeac97ac16186f0; Wed, 24 Apr 2024 02:41:28 +0000 (UTC) Content-Disposition: inline In-Reply-To: <86h6fs3vd5.fsf@gnu.org> X-Mailer: WebService/1.1.22256 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.134.124; envelope-from=spacibba@aol.com; helo=sonic315-14.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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:146461 Archived-At: On Tue, Apr 23, 2024 at 07:19:02PM GMT, Eli Zaretskii wrote: >> 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. > Hi Eli: I tried this. (with-eval-after-load 'whitespace (setq whitespace-style '(faces tab-mark) whitespace-display-mappings `((tab-mark ?\t [,(make-glyph-code ?� 'whitespace-tab) ?\t] )) )) (whitespace-mode 1) But I only get the error: wrong-type-argument number-or-marker-p (187 . 235) Some idea what I am doing wrong? Best, Ergus