From: Joe Wells <jbw@macs.hw.ac.uk>
To: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
rms@gnu.org
Subject: Re: Fwd: overlay face property not used for after-string property
Date: Mon, 05 Nov 2007 22:06:31 +0000 [thread overview]
Message-ID: <86tzo0fiu0.fsf@macs.hw.ac.uk> (raw)
In-Reply-To: <86wsswhbwb.fsf@lola.quinscape.zz> (David Kastrup's message of "Mon\, 05 Nov 2007 17\:53\:24 +0100")
David Kastrup <dak@gnu.org> writes:
> Joe Wells <jbw@macs.hw.ac.uk> writes:
>
>> David Kastrup <dak@gnu.org> writes:
>>
>>> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>
>>>>> I think that the before-string should, in effect, use
>>>>> (get-char-property (overlay-start ov) 'face)
>>>>> to determine the face to use if no fully specified face is in the
>>>>> before-string.
>>>>
>>>> No. Go read the beginning of this thread again where I explained
>>>> why this is bad: it's (much) harder to remove a face than to add
>>>> one.
>>>
>>> Then our problem is that it is much harder to remove a face than to
>>> add one. And that is the problem we should fix.
>>
>> It's not actually an issue of “removing” a face. The issue is
>> actually “preventing inheritance” of a face.
>>
>>>> Also text-properties should not affect before/after-strings.
>>>
>>> I don't see why not if they are appropriately sticky.
>>
>> An example application is linum.el. This code needs to display
>> strings at the beginning of each line and the strings need to be
>> displayed with a face independent of the face of the adjacent text
>> (regardless of whether there are sticky text properties there).
>
> That's what I say: instead of making the behavior illogical in order
> to default to some behavior good for some application, we should add
> the facility for the application to explicitly request the behavior it
> needs.
The current behavior is illogical, so I don't understand your
complaint.
Also, I believe adding a feature to try to block inheritance in some
cases will lead to a specification that is too complicated to
understand. It is simpler to have fewer inheritances occur in the
first place.
>>> Resolving partially specified faces goes through priorities. If
>>> there are usage cases for before/after-string that should not
>>> inherit, then we need to add a way to say "completely resolve to
>>> 'default (or whatever other face) here". Then things like lineno
>>> can use that way.
>>
>> The idea of “completely resolve to default” sounds interesting
>> (independently of what we are discussing).
>>
>>> But it does not make sense to substitute a missing facility with
>>> some fixed but illogical rules that cater for some but not all use
>>> cases because it is easier to override this in that manner.
>>
>> The problem is that the existing rules are already illogical
>
> Because of a bug.
I agree that there is a bug. I don't know what you think the bug is.
For me, the bug is that a face given by a text property in the buffer
can affect the display of before-string and after-string properties of
overlays.
I would be willing to allow this for overlays with negative priority.
That could be a useful meaning for negative priorities (which
currently have no meaning).
>> and we are trying to figure out how to make them less illogical.
>
> What I see happening is that the current bug is used as an excuse to
> establish a different inconsistent behavior as "correct", based on
> convenience for some applications.
Actually, we are trying to propose a more consistent behavior (which
is also more useful).
> Basically "if we are being
> inconsistent, we might as well be inconsistent in a more convenient
> manner."
I think it is perfectly consistent to think “only higher priority face
properties affect a piece of text”, with text properties in the buffer
being considered to have the lowest priority (or priority zero if we
now decide to allow negative overlay priorities).
> And I do not consider this a good idea. If the consistent and logical
> behavior is inconvenient for some applications, we need to add the
> facilities for overriding it. But the override should not become a
> fixed default.
As I mention above, I think adding a facility for preventing certain
cases of face inheritance will make things too complicated, and it is
better to remove the problematic cases of inheritance.
--
Joe
next prev parent reply other threads:[~2007-11-05 22:06 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-22 9:00 [jbw@macs.hw.ac.uk: overlay face property not used for after-string property] Richard Stallman
2007-10-22 15:44 ` Fwd: overlay face property not used for after-string property Stefan Monnier
2007-10-24 9:49 ` Joe Wells
[not found] ` <E1Im8Y2-0000zW-Tn@fencepost.gnu.org>
2007-10-28 15:06 ` Joe Wells
2007-10-28 15:21 ` Johan Bockgård
2007-10-29 9:22 ` Richard Stallman
2007-10-29 9:57 ` Joe Wells
2007-11-03 3:58 ` Richard Stallman
2007-11-03 16:03 ` Joe Wells
2007-11-04 19:56 ` Richard Stallman
2007-11-04 23:03 ` Joe Wells
2007-11-05 8:47 ` Richard Stallman
2007-11-05 9:30 ` David Kastrup
2007-11-05 11:51 ` Joe Wells
2007-11-05 12:05 ` Joe Wells
2007-11-06 2:16 ` Richard Stallman
2007-11-06 3:30 ` Joe Wells
2007-11-06 8:30 ` Stefan Monnier
2007-11-06 9:18 ` David Kastrup
2007-11-06 10:05 ` Stefan Monnier
2007-11-07 0:15 ` Richard Stallman
2007-11-07 0:15 ` Richard Stallman
2007-11-06 2:15 ` Richard Stallman
2007-11-06 3:19 ` Joe Wells
2007-11-05 14:55 ` Stefan Monnier
2007-11-05 15:04 ` David Kastrup
2007-11-05 16:35 ` Joe Wells
2007-11-05 16:53 ` David Kastrup
2007-11-05 22:06 ` Joe Wells [this message]
2007-11-05 16:29 ` Joe Wells
2007-11-05 19:38 ` Stefan Monnier
2007-11-05 21:59 ` Joe Wells
2007-11-06 8:37 ` Richard Stallman
2007-11-06 2:16 ` Richard Stallman
2007-11-05 11:55 ` Joe Wells
2007-11-06 2:16 ` Richard Stallman
2007-11-04 19:56 ` Richard Stallman
2007-11-04 23:10 ` Joe Wells
2007-11-03 19:21 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86tzo0fiu0.fsf@macs.hw.ac.uk \
--to=jbw@macs.hw.ac.uk \
--cc=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rms@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.