unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "João Távora" <joaotavora@gmail.com>
Cc: emacs-devel@gnu.org
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 19:51:36 +0200	[thread overview]
Message-ID: <83bm3z2vyv.fsf@gnu.org> (raw)
In-Reply-To: <CALDnm53Tvd+OgpQg7kc7ZA-0+0T6PZTc-D=bjrRy1m-4B1CC2g@mail.gmail.com> (message from João Távora on Tue, 29 Jan 2019 17:26:50 +0000)

> From: João Távora <joaotavora@gmail.com>
> Date: Tue, 29 Jan 2019 17:26:50 +0000
> 
> > 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,

Ah, okay.  Yes, this will solve the problem with the face.

> > 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...

That is okay as long as the properties are used as documented.

> 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.

A 'face' property is documented for general use only for text, not for
symbol plists.

> 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 <facility-name>--face-id
> or something.
> 
> I think this second alternative is consistent with your views on the
> global namespace.  It might be more work though.

More importantly, I see no reason for such backward-incompatible
change.  It is easier to change one package, flymake, than to
potentially impose incompatible changes on external packages and user
customizations, even though this is an internal usage.  It just is too
veteran to change it for this reason.



  reply	other threads:[~2019-01-29 17:51 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190128152540.6870.46132@vcs0.savannah.gnu.org>
     [not found] ` <20190128152541.12A4D20B50@vcs0.savannah.gnu.org>
2019-01-28 16:05   ` [Emacs-diffs] master cd06d17: Fix bug with face-id after restoring from pdump Daniel Colascione
2019-01-28 18:14     ` Eli Zaretskii
2019-01-28 19:37       ` Daniel Colascione
2019-01-28 20:19         ` Eli Zaretskii
2019-01-28 17:58   ` Glenn Morris
2019-01-28 20:05     ` Eli Zaretskii
2019-01-28 20:12     ` Flymake and the 'face' property (was: master cd06d17: Fix bug with face-id after restoring from pdump) Eli Zaretskii
2019-01-28 20:39       ` João Távora
2019-01-28 20:57         ` Eli Zaretskii
2019-01-28 21:38           ` João Távora
2019-01-29 16:54             ` Eli Zaretskii
     [not found]               ` <CALDnm53FnkT+fjneg3uLNMsCu1MxJK1aKWQyvz85EjVdOyr4bg@mail.gmail.com>
2019-01-29 17:26                 ` Fwd: " João Távora
2019-01-29 17:51                   ` Eli Zaretskii [this message]
2019-01-29 17:54                     ` Daniel Colascione
2019-01-29 18:30                       ` Eli Zaretskii
2019-01-29 18:43                         ` Fwd: Flymake and the 'face' property Daniel Colascione
2019-01-29 19:19                           ` Eli Zaretskii
2019-01-29 18:47                       ` Fwd: Flymake and the 'face' property (was: master cd06d17: Fix bug with face-id after restoring from pdump) João Távora
2019-01-29 18:53                         ` Fwd: Flymake and the 'face' property Daniel Colascione
2019-01-29 19:00                           ` João Távora
2019-01-29 19:21                         ` Fwd: Flymake and the 'face' property (was: master cd06d17: Fix bug with face-id after restoring from pdump) Eli Zaretskii
2019-01-29 19:28                           ` João Távora
2019-01-29 18:28                     ` João Távora
2019-01-29 18:34                     ` Fwd: Flymake and the 'face' property Johan Bockgård
2019-01-29 18:49                       ` João Távora
2019-01-29 19:17                       ` Eli Zaretskii
2019-01-29 19:33                         ` João Távora
2019-01-29 19:48                           ` Eli Zaretskii
2019-01-29 19:58                             ` João Távora
2019-01-30  9:37                     ` Stefan Monnier
2019-01-30 15:40                       ` Eli Zaretskii
2019-01-30 17:05                         ` João Távora
2019-01-30 18:01                           ` Eli Zaretskii
2019-01-30 20:56                         ` Stefan Monnier
2019-01-31  3:38                           ` Eli Zaretskii
2019-02-02  8:23                             ` Stefan Monnier
2019-02-02 10:12                               ` Eli Zaretskii
2019-02-02 22:49                                 ` Stefan Monnier
2019-02-03  3:39                                   ` Eli Zaretskii
2019-02-03 12:35                                     ` Stefan Monnier
2019-01-29 17:52                   ` Fwd: Flymake and the 'face' property (was: master cd06d17: Fix bug with face-id after restoring from pdump) Daniel Colascione

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83bm3z2vyv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).