unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Character FOO
@ 2012-01-24  9:18 Eli Zaretskii
  2012-01-24 11:36 ` Juanma Barranquero
  2012-01-25  0:48 ` Kenichi Handa
  0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2012-01-24  9:18 UTC (permalink / raw)
  To: emacs-devel

In "emacs -Q" try this:

  M-: (put-text-property 149 154 'display "FOO") RET

Then move point to buffer position 149 (under F from "FOO"), and type
"C-u C-x =".  The popped up buffer shows in its first line that the
character at point is "FOO" (while the echo area says it's `e').

Bug? feature?



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

* Re: Character FOO
  2012-01-24  9:18 Character FOO Eli Zaretskii
@ 2012-01-24 11:36 ` Juanma Barranquero
  2012-01-25  0:48 ` Kenichi Handa
  1 sibling, 0 replies; 6+ messages in thread
From: Juanma Barranquero @ 2012-01-24 11:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On Tue, Jan 24, 2012 at 10:18, Eli Zaretskii <eliz@gnu.org> wrote:

> Bug? feature?

            `(("character"
               ,(format "%s (%d, #o%o, #x%x)"
                        (apply 'propertize char-description
                               (text-properties-at pos))
                        char char char))
              ...

Now, applying the properties to the char is obviously a feature. The
question is, should display properties be ignored when displaying the
character?

    Juanma



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

* Re: Character FOO
  2012-01-24  9:18 Character FOO Eli Zaretskii
  2012-01-24 11:36 ` Juanma Barranquero
@ 2012-01-25  0:48 ` Kenichi Handa
  2012-01-25  6:32   ` Eli Zaretskii
  2012-01-28 10:35   ` Eli Zaretskii
  1 sibling, 2 replies; 6+ messages in thread
From: Kenichi Handa @ 2012-01-25  0:48 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

In article <E1RpcW2-0004sg-SR@fencepost.gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> In "emacs -Q" try this:
>   M-: (put-text-property 149 154 'display "FOO") RET

> Then move point to buffer position 149 (under F from "FOO"), and type
> "C-u C-x =".  The popped up buffer shows in its first line that the
> character at point is "FOO" (while the echo area says it's `e').

> Bug? feature?

It's a feature, but it has a bad effect in the above case.

C-u C-x = (describe-char) tries to display the character at position in
*Help* buffer as the same way as in the original buffer by
adding the same text properties.

      (setq item-list
            `(("character"
               ,(format "%s (%d, #o%o, #x%x)"
                        (apply 'propertize char-description
                               (text-properties-at pos))
                        char char char))

Changing that part to something like this:

      (setq item-list
            `(("character"
               ,(format "%s (displayed as %s) (%d, #o%o, #x%x)"
			char-description
                        (apply 'propertize char-description
                               (text-properties-at pos))
                        char char char))

may be an improvement.

---
Kenichi Handa
handa@m17n.org



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

* Re: Character FOO
  2012-01-25  0:48 ` Kenichi Handa
@ 2012-01-25  6:32   ` Eli Zaretskii
  2012-01-25 16:58     ` Drew Adams
  2012-01-28 10:35   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2012-01-25  6:32 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-devel

> From: Kenichi Handa <handa@m17n.org>
> Cc: emacs-devel@gnu.org
> Date: Wed, 25 Jan 2012 09:48:09 +0900
> 
>       (setq item-list
>             `(("character"
>                ,(format "%s (%d, #o%o, #x%x)"
>                         (apply 'propertize char-description
>                                (text-properties-at pos))
>                         char char char))
> 
> Changing that part to something like this:
> 
>       (setq item-list
>             `(("character"
>                ,(format "%s (displayed as %s) (%d, #o%o, #x%x)"
> 			char-description
>                         (apply 'propertize char-description
>                                (text-properties-at pos))
>                         char char char))
> 
> may be an improvement.

Thanks.

Does anyone object to this change on the trunk?



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

* RE: Character FOO
  2012-01-25  6:32   ` Eli Zaretskii
@ 2012-01-25 16:58     ` Drew Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2012-01-25 16:58 UTC (permalink / raw)
  To: 'Eli Zaretskii', 'Kenichi Handa'; +Cc: emacs-devel

> > Changing that part to something like this: ...
> > may be an improvement.
> 
> Does anyone object to this change on the trunk?

It's a good change.

Why not apply this patch as well, while you're at it:
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10129




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

* Re: Character FOO
  2012-01-25  0:48 ` Kenichi Handa
  2012-01-25  6:32   ` Eli Zaretskii
@ 2012-01-28 10:35   ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2012-01-28 10:35 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: emacs-devel

> From: Kenichi Handa <handa@m17n.org>
> Cc: emacs-devel@gnu.org
> Date: Wed, 25 Jan 2012 09:48:09 +0900
> 
> In article <E1RpcW2-0004sg-SR@fencepost.gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> 
> > In "emacs -Q" try this:
> >   M-: (put-text-property 149 154 'display "FOO") RET
> 
> > Then move point to buffer position 149 (under F from "FOO"), and type
> > "C-u C-x =".  The popped up buffer shows in its first line that the
> > character at point is "FOO" (while the echo area says it's `e').
> 
> > Bug? feature?
> 
> It's a feature, but it has a bad effect in the above case.
> 
> C-u C-x = (describe-char) tries to display the character at position in
> *Help* buffer as the same way as in the original buffer by
> adding the same text properties.
> 
>       (setq item-list
>             `(("character"
>                ,(format "%s (%d, #o%o, #x%x)"
>                         (apply 'propertize char-description
>                                (text-properties-at pos))
>                         char char char))
> 
> Changing that part to something like this:
> 
>       (setq item-list
>             `(("character"
>                ,(format "%s (displayed as %s) (%d, #o%o, #x%x)"
> 			char-description
>                         (apply 'propertize char-description
>                                (text-properties-at pos))
>                         char char char))
> 
> may be an improvement.

Thanks, I installed this change.



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

end of thread, other threads:[~2012-01-28 10:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24  9:18 Character FOO Eli Zaretskii
2012-01-24 11:36 ` Juanma Barranquero
2012-01-25  0:48 ` Kenichi Handa
2012-01-25  6:32   ` Eli Zaretskii
2012-01-25 16:58     ` Drew Adams
2012-01-28 10:35   ` Eli Zaretskii

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