From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: feature request: text property to prevent font-locking Date: Sat, 30 Aug 2014 23:06:56 -0700 (PDT) Message-ID: <7a50dd60-5b1c-4f21-aa38-b095d4449d09@default> References: <20140830092701.GA3351@acm.acm> <34f3e246-bbfb-4864-83e9-4a0c81d4202e@default> <87wq9pirvf.fsf@zigzag.favinet> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409465256 17732 80.91.229.3 (31 Aug 2014 06:07:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 31 Aug 2014 06:07:36 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 31 08:07:29 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XNyIR-00034T-Rm for ged-emacs-devel@m.gmane.org; Sun, 31 Aug 2014 08:07:28 +0200 Original-Received: from localhost ([::1]:48780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNyIR-0007Ef-A7 for ged-emacs-devel@m.gmane.org; Sun, 31 Aug 2014 02:07:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNyI6-0007DU-I1 for emacs-devel@gnu.org; Sun, 31 Aug 2014 02:07:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNyHx-0008WB-I8 for emacs-devel@gnu.org; Sun, 31 Aug 2014 02:07:06 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:28396) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNyHx-0008W0-Br for emacs-devel@gnu.org; Sun, 31 Aug 2014 02:06:57 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s7V66tTt025395 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 31 Aug 2014 06:06:56 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7V66sf3024271 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 31 Aug 2014 06:06:55 GMT Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s7V66s26002426 for ; Sun, 31 Aug 2014 06:06:54 GMT In-Reply-To: <87wq9pirvf.fsf@zigzag.favinet> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8.2 (807160) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173917 Archived-At: > But since your reply is the only one so far, Alan, I conclude > so far that there is no special interest in this -the problem > or the proposed solution. >=20 > Maybe it takes a while for answers to arrive. Yes, maybe. That's why I called the conclusion tentative ("so far"). > As you point out, font-lock must self-gate in some manner, > especially to avoid doing useless re-work. Have you looked at > the source? A brief dive shows me that >=20 > =E2=80=98font-lock-mode=E2=80=99 docstring mentions > =E2=80=98font-lock-fontify-buffer=E2=80=99 which calls > =E2=80=98font-lock-fontify-buffer-function=E2=80=99 which has the value > =E2=80=98jit-lock-refontify=E2=80=99 (for me), which calls > =E2=80=98put-text-property=E2=80=99 w/ > property name =E2=80=98fontified=E2=80=99 and > property value =E2=80=98nil=E2=80=99 >=20 > suggesting that property =E2=80=98fontified=E2=80=99 w/ non-=E2=80=98nil= =E2=80=99 value is what > jit-lock must do as testimony of its work. Now, that took all of > two minutes. The next twenty or two-hundred (if i were lucky > enough to have them available) would be to understand what > weirdness must mar this simple model. Maybe you can do that? I did look into that in the past (and again before my OP message). And I did try simply setting `fontified' to non-nil, with no luck. It's quite possible I am missing something simple, which is why I asked about that. I still would like to hear that that is the case, and how. > Regardless, i like the straightforward =E2=80=98font-lock-ignore=E2=80=99= method > you demo. It would be nice to have that level of friendliness in > Emacs (and documented!). Seems simple to me too. But maybe there is something simpler and already available. After all, font lock was not added yesterday. And surely people have tried to use ad hoc highlighting in a font-locked buffer. If nothing else, they must have tried `facemenu-set-face' (`M-o o') and `facemenu-add-face', which are about as old as font-lock. But maybe they tried and just gave up when they saw the unfriendly message "Font-lock mode will override any faces you set in this buffer", as if that were the final (discouraging) word. In any case, it is not the final word. With the patch I sent (bug #18367), font-lock no longer prevents you from using `M-o o' etc. (If the patch is accepted then that message should of course be removed.) That message's presence is another thing that gives me the impression that I am maybe not missing something: if there were already a simple way to stop font-lock from overriding facemenu highlighting then why would we warn people that it does override it? Why wouldn't the `facemenu.el' code just DTRT and stop font-lock's king-of-the-sandbox bullying ;-) for the space of facemenu's ad hoc highlighting?