From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#27517: 26.0.50; 25.2.2; Cannot add "help-echo" property to buffer regions in *lisp-mode Date: Fri, 13 Aug 2021 23:06:38 -0400 Message-ID: References: <87efu4l284.fsf@galago> <83shikqd87.fsf@gnu.org> <87lf55bi00.fsf_-_@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7185"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 27517@debbugs.gnu.org, Eli Zaretskii , Vitalie Spinu To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 14 05:07:09 2021 Return-path: Envelope-to: geb-bug-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 1mEk0r-0001dA-EY for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Aug 2021 05:07:09 +0200 Original-Received: from localhost ([::1]:56946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEk0p-0001E5-Hr for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Aug 2021 23:07:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEk0k-0001Dx-EF for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 23:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEk0k-0003tH-80 for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 23:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mEk0k-0005sH-1e for bug-gnu-emacs@gnu.org; Fri, 13 Aug 2021 23:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Aug 2021 03:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27517 X-GNU-PR-Package: emacs Original-Received: via spool by 27517-submit@debbugs.gnu.org id=B27517.162891041322566 (code B ref 27517); Sat, 14 Aug 2021 03:07:01 +0000 Original-Received: (at 27517) by debbugs.gnu.org; 14 Aug 2021 03:06:53 +0000 Original-Received: from localhost ([127.0.0.1]:43386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEk0b-0005ru-DJ for submit@debbugs.gnu.org; Fri, 13 Aug 2021 23:06:53 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEk0W-0005rb-5b for 27517@debbugs.gnu.org; Fri, 13 Aug 2021 23:06:51 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B2A9E4414E9; Fri, 13 Aug 2021 23:06:42 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8087244151D; Fri, 13 Aug 2021 23:06:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1628910401; bh=A9fwUXQjBmYcBa4RduIuG/38Jl5UJocoMs6lC4kfWTI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Y9yLwHGgVuAr4M1Fiaim5xhnsn3taEoHPS2u+vqH2z8yGlC70KHJw6o2vnVawwL3O YC+Hrof9LIfylKyUOjs+pjomiQXgUwIUqxAlCnnQFcGohvrABbBAeZlckx7RC+ZyJZ 8QYUx86vmempXzYN0fxnASa9V0LREnn5L71x9DKQICCZ6ujiByftsX/F81FO4uq47l UkwLOFegzUYxUkox7lfEiX0gO3lhyxsbKX46HMvXpQJF+OSU4UppkGbzkpQf4Wg52k TjilUlLGNycpQgxt/d9mI+FLm/Gx9ETEF3alo4PoTJdYY+4NKtSknTVqCOssrvXVCL IJSNUGTqFWFOQ== Original-Received: from alfajor (unknown [104.247.244.135]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 41E6F120370; Fri, 13 Aug 2021 23:06:41 -0400 (EDT) In-Reply-To: <87lf55bi00.fsf_-_@gnus.org> (Lars Ingebrigtsen's message of "Fri, 13 Aug 2021 15:18:23 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:211800 Archived-At: Lars Ingebrigtsen [2021-08-13 15:18:23] wrote: > Eli Zaretskii writes: >> This happens because lisp-mode.el wants itself to manage the help-echo >> property: > > [...] > >> (font-lock-extra-managed-props help-echo) >> >> When a property appears in font-lock-extra-managed-props, font-lock >> removes that property when it's about to re-fontify some region, see >> font-lock-default-unfontify-region. > > This is presumably so that font-locking can add help-echo warnings like > > + (lisp--match-hidden-arg > + (0 '(face font-lock-warning-face > + help-echo "Hidden behind deeper element; move to another line?"))) > > which seems useful. > > But it'd also be nice to allow other packages to also add help-echo on > bits and bobs. Is there no way to achieve that? There is sadly no easy way to do that currently. You can do things like: - Use an overlay instead of a text-property. - Apply the text-property via `font-lock-add-keywords` rather than directly. - Add support for "multiple planes" in text-properties. This means that font-lock would use its own "plane" and your package could use another plane, and the two would be correctly merged and font-lock wouldn't erase your properties. It's been on my todo list for many years. I've proposed it to as a summer project to some of my students but so far to no avail. Stefan