unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Messed up display and incorrect handling of `face' specs on before-strings
@ 2010-04-07  3:13 Stefan Monnier
  2010-04-07  5:15 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2010-04-07  3:13 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

Try the nhexl-mode below on a buffer.
You should see that the first line of the buffer is displayed
differently from the rest (the first line is displayed the way I'd want
it).  On the subsequent lines, the `face' properties as well as the
`display' properties on the before-strings seem to be ignored (or
something like that).

This minor mode seems to hit several other bugs, but let's start
with this one since I haven't found easily reproducible test cases for
the other ones yet.


        Stefan



[-- Attachment #2: nhexl-mode.el --]
[-- Type: application/emacs-lisp, Size: 6510 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Messed up display and incorrect handling of `face' specs on before-strings
  2010-04-07  3:13 Messed up display and incorrect handling of `face' specs on before-strings Stefan Monnier
@ 2010-04-07  5:15 ` Eli Zaretskii
  2010-04-07 13:46   ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2010-04-07  5:15 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Tue, 06 Apr 2010 23:13:22 -0400
> 
> Try the nhexl-mode below on a buffer.
> You should see that the first line of the buffer is displayed
> differently from the rest (the first line is displayed the way I'd want
> it).  On the subsequent lines, the `face' properties as well as the
> `display' properties on the before-strings seem to be ignored (or
> something like that).

In which version(s) of Emacs? TTY? GUI? both?

In Emacs 23.1.92 on a TTY I see the ASCII characters on the right
underlined, while the hex part is not.  The other lines are underlined
in the hex part as well.  Also, the first line is 2 columns to the
right after the address part, relative to the other lines.  And the
highlight of the current byte in the hex part does not work on any
line but the first one.

Is this what you meant?

If so, could you perhaps summarize the problems you see in terms of
the underlying features (`display' properties, overlays,
`before-strings', etc.)?  Armed with that knowledge, it would be much
easier to look in the display code what it would do under the
circumstances.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Messed up display and incorrect handling of `face' specs on before-strings
  2010-04-07  5:15 ` Eli Zaretskii
@ 2010-04-07 13:46   ` Stefan Monnier
  2010-04-07 17:44     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2010-04-07 13:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>> Try the nhexl-mode below on a buffer.
>> You should see that the first line of the buffer is displayed
>> differently from the rest (the first line is displayed the way I'd want
>> it).  On the subsequent lines, the `face' properties as well as the
>> `display' properties on the before-strings seem to be ignored (or
>> something like that).

> In which version(s) of Emacs? TTY? GUI? both?

I only tested it in GUI, but your tty description indicates it also
shows up for ttys (unsurprisingly).

> In Emacs 23.1.92 on a TTY I see the ASCII characters on the right
> underlined, while the hex part is not.  The other lines are underlined
> in the hex part as well.

That's the kind of discrepency I'm talking about, yes.

> Also, the first line is 2 columns to the right after the address part,
> relative to the other lines.

That as well.

> And the highlight of the current byte in the hex part does not work on
> any line but the first one.

Also.

> Is this what you meant?

Yup.

> If so, could you perhaps summarize the problems you see in terms of
> the underlying features (`display' properties, overlays,
> `before-strings', etc.)?

The first and 3rd issues seem to be due to the fact that `face'
properties on the before-strings of the overlays aren't obeyed except on
the first line.  And the second is the same problem but for the
`display' property.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Messed up display and incorrect handling of `face' specs on before-strings
  2010-04-07 13:46   ` Stefan Monnier
@ 2010-04-07 17:44     ` Eli Zaretskii
  2010-04-07 18:54       ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2010-04-07 17:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org
> Date: Wed, 07 Apr 2010 09:46:16 -0400
> 
> The first and 3rd issues seem to be due to the fact that `face'
> properties on the before-strings of the overlays aren't obeyed except on
> the first line.  And the second is the same problem but for the
> `display' property.

Can you construct a simple test case that shows these problems?  I
tried a few, but they all seem to work, so I probably do something
differently than nhexl-mode.el does.  Specifically, I don't know how
to simulate ``non-first lines''.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Messed up display and incorrect handling of `face' specs on before-strings
  2010-04-07 17:44     ` Eli Zaretskii
@ 2010-04-07 18:54       ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2010-04-07 18:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>> The first and 3rd issues seem to be due to the fact that `face'
>> properties on the before-strings of the overlays aren't obeyed except on
>> the first line.  And the second is the same problem but for the
>> `display' property.
> Can you construct a simple test case that shows these problems?

If you look at the code, it's pretty simple.

> I tried a few, but they all seem to work, so I probably do something
> differently than nhexl-mode.el does.  Specifically, I don't know how
> to simulate ``non-first lines''.

If you set nhexl-point to some integer value and then run (nhexl-jit
(point-min) (+ 30 (point-min))) without enabling the mode, you should
get just two overlays and the problem is already visible there.

I think the trick is to have two consecutive overlays, the first with an
after-string and the second with a before-string.


        Stefan




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-07 18:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-07  3:13 Messed up display and incorrect handling of `face' specs on before-strings Stefan Monnier
2010-04-07  5:15 ` Eli Zaretskii
2010-04-07 13:46   ` Stefan Monnier
2010-04-07 17:44     ` Eli Zaretskii
2010-04-07 18:54       ` Stefan Monnier

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