From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Daniel Colascione" Newsgroups: gmane.emacs.devel Subject: Re: Fwd: Flymake and the 'face' property (was: master cd06d17: Fix bug with face-id after restoring from pdump) Date: Tue, 29 Jan 2019 09:52:58 -0800 Message-ID: <6d418e10c70691f25ebd623e1501658b.squirrel@dancol.org> References: <20190128152540.6870.46132@vcs0.savannah.gnu.org> <20190128152541.12A4D20B50@vcs0.savannah.gnu.org> <30bm401x64.fsf@fencepost.gnu.org> <83r2cw35jq.fsf@gnu.org> <83munk33gj.fsf@gnu.org> <83h8dr2yll.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="245408"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: SquirrelMail/1.4.23 [SVN] Cc: Eli Zaretskii , emacs-devel To: =?iso-8859-1?Q?=22Jo=C3=A3o_T=C3=A1vora=22?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 29 18:53:45 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1goXZw-0011hC-JV for ged-emacs-devel@m.gmane.org; Tue, 29 Jan 2019 18:53:45 +0100 Original-Received: from localhost ([127.0.0.1]:53138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goXZv-0000eR-Lm for ged-emacs-devel@m.gmane.org; Tue, 29 Jan 2019 12:53:43 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goXZO-0000e9-G5 for emacs-devel@gnu.org; Tue, 29 Jan 2019 12:53:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goXZN-0007mk-KJ for emacs-devel@gnu.org; Tue, 29 Jan 2019 12:53:10 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:49242) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1goXZN-0007eL-2m; Tue, 29 Jan 2019 12:53:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=Z6TztenidZAqhuH2ROazsUTaI7umI7MFIMJQHllz698=; b=G0gmf3sgCxdZWJGY5IxOwGCtK3edlCx+QCeXM3bmEg3ymVhka6VbK0ofPThaq5RXqDErdk6LF7fNWc+VkYi8WIwoa02G1uWE/6nYRYz5jA00xnDaltrrp3eT/5HfvWRTDc2yZ41bS1FdAqrjpg5wL0oicvKcHCzCsQ55do2FeORnoUPFhMJysaRx8T8wz7eqIUe1g86dmEHDGTj7Yj3EvNUCIL4cmgaxgGvCK9bjE4KR7XAdnEEowE2spiOLA6WGkEYsfSwd3/Ac5x/NE//L3rKq4vGNFhLP26ntvUyIlWC49PejH9dwQ64PuU9Jw04GckOXaeO406j+1SoFUW/9HQ==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.84_2) (envelope-from ) id 1goXZC-0005Gl-BI; Tue, 29 Jan 2019 09:52:58 -0800 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Tue, 29 Jan 2019 09:52:58 -0800 In-Reply-To: X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:232794 Archived-At: > [Sorry for the double email Eli, I forgot to CC the list in the first one] > > On Tue, Jan 29, 2019 at 4:55 PM Eli Zaretskii wrote: > >> > As far as I can understand, this is because flymake-error, the flymake >> error >> > type, is conflated with flymake-error, the face. >> No, the problem is that each face has its numeric face ID stored as >> the value of the face symbol's 'face' property. So, no matter what is >> the face symbol, its 'face' property should not be touched. > > Undoubtedly, but if the face changes the name to 'flymake-error-face' and > the diagnostic type retains the name 'flymake-error', then the 'face' > property > will not be applied to a face, but to an arbitrary, non-face related > symbol, > designating no more than a flymake diagnostic type (and not a face). > There is no reason why you would ask for the face ID of _that_ symbol, > is there? > >> It's too late for that, I think. Instead, packages should IMO try to >> keep the global namespace clean in the property domain as well, thus >> defining properties whose names have the prefix of the package name. > > That is certainly true for properties whose semantics are valid only > within a package. But flymake.el here is merely managing existing > properties of overlays designated by "external" symbols, such as > 'face' ,'priority' ,'display', 'help-echo' ,etc... Now, flymake.el > happened > to be unlucky enough to store these properties in the plist of a symbol > which, by doubling as a face symbol, already had some > implementation-specific a meaning for some of those properties. > > So I'd first study the possibility of avoiding this "doubling as a > face symbol", which was merely aesthetic and even slightly confusing. > > As a backward-compatible alternative to that, if it is not an immense > amount of work, we could look at the Emacs facility that treats 'face' > as an implementation detail (i.e. doesn't give it public meaning, contrary > to what text- and overlay properties do), and change it to use another > name for that implementation detail, such as --face-id > or something. > > I think this second alternative is consistent with your views on the > global namespace. It might be more work though. > We could also just use an uninterned symbol.