unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>, Eli Zaretskii <eliz@gnu.org>
Subject: Fwd: Flymake and the 'face' property (was: master cd06d17: Fix bug with face-id after restoring from pdump)
Date: Tue, 29 Jan 2019 17:26:50 +0000	[thread overview]
Message-ID: <CALDnm53Tvd+OgpQg7kc7ZA-0+0T6PZTc-D=bjrRy1m-4B1CC2g@mail.gmail.com> (raw)
In-Reply-To: <CALDnm53FnkT+fjneg3uLNMsCu1MxJK1aKWQyvz85EjVdOyr4bg@mail.gmail.com>

[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 <eliz@gnu.org> 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 <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.

--
João Távora



  parent reply	other threads:[~2019-01-29 17:26 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                 ` João Távora [this message]
2019-01-29 17:51                   ` Fwd: " Eli Zaretskii
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='CALDnm53Tvd+OgpQg7kc7ZA-0+0T6PZTc-D=bjrRy1m-4B1CC2g@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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).