unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* delete-char and composed characters
@ 2008-10-24 13:29 Eli Zaretskii
  2008-10-24 18:47 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2008-10-24 13:29 UTC (permalink / raw)
  To: emacs-devel

It looks like C-f and C-b move by composed character positions on the
screen, but DEL and C-d delete individual characters (i.e. a single
Unicode codepoint).

For example, after typing "C-h H", go to the parenthesized text in the
Bengali line and hit C-d.  You will see that you need to type C-d 5
times to delete the entire text in parentheses, but C-f traverses it
in only 2 keystrokes.

Do we have a single-codepoint variant of C-f and C-b?  If not, should
we?  I think we should, because without them, there's no simple way of
deleting or editing just one codepoint in the middle of a composition.

Or did I miss something?




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

* Re: delete-char and composed characters
  2008-10-24 13:29 delete-char and composed characters Eli Zaretskii
@ 2008-10-24 18:47 ` Stefan Monnier
  2008-10-24 19:47   ` Eli Zaretskii
  2008-10-25  0:46   ` Kenichi Handa
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Monnier @ 2008-10-24 18:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

> Do we have a single-codepoint variant of C-f and C-b?  If not, should we?

Where/how would we display the cursor in order for the user to know on
which codepoint he is?


        Stefan




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

* Re: delete-char and composed characters
  2008-10-24 18:47 ` Stefan Monnier
@ 2008-10-24 19:47   ` Eli Zaretskii
  2008-10-25  0:49     ` Kenichi Handa
  2008-10-25  0:46   ` Kenichi Handa
  1 sibling, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2008-10-24 19:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: emacs-devel@gnu.org
> Date: Fri, 24 Oct 2008 14:47:57 -0400
> 
> > Do we have a single-codepoint variant of C-f and C-b?  If not, should we?
> 
> Where/how would we display the cursor in order for the user to know on
> which codepoint he is?

We should display the corresponding portion of the composite character
in reverse video, IMO.

For example, in this example from etc/HELLO:

           Здра́вствуйте

moving one notch forward from `р' (the 3rd letter) puts the cursor on
`а' and should display in reverse video only the lower part occupied
by `а', moving one more notch should display the `́' accent in reverse
video, thus showing something reminiscent of a small cursor up on the
accent.





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

* Re: delete-char and composed characters
  2008-10-24 18:47 ` Stefan Monnier
  2008-10-24 19:47   ` Eli Zaretskii
@ 2008-10-25  0:46   ` Kenichi Handa
  2008-10-25 18:19     ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Kenichi Handa @ 2008-10-25  0:46 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: eliz, emacs-devel

In article <jwvy70dzv8i.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> > Do we have a single-codepoint variant of C-f and C-b?  If not, should we?
> Where/how would we display the cursor in order for the user to know on
> which codepoint he is?

I'm not sure if we need such a command or not, but when you
run such a command, it is possible disable the automatic
composition temporarily for that part.

---
Kenichi Handa
handa@ni.aist.go.jp




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

* Re: delete-char and composed characters
  2008-10-24 19:47   ` Eli Zaretskii
@ 2008-10-25  0:49     ` Kenichi Handa
  2008-10-25  8:01       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Kenichi Handa @ 2008-10-25  0:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

In article <uljwdydux.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> We should display the corresponding portion of the composite character
> in reverse video, IMO.

That doesn't work in general because, typically in Indic
case, multiple characters are displayed by a signle font
glyph.

---
Kenichi Handa
handa@ni.aist.go.jp




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

* Re: delete-char and composed characters
  2008-10-25  0:49     ` Kenichi Handa
@ 2008-10-25  8:01       ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2008-10-25  8:01 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: monnier, emacs-devel

> From: Kenichi Handa <handa@m17n.org>
> CC: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org
> Date: Sat, 25 Oct 2008 09:49:57 +0900
> 
> In article <uljwdydux.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:
> 
> > We should display the corresponding portion of the composite character
> > in reverse video, IMO.
> 
> That doesn't work in general because, typically in Indic
> case, multiple characters are displayed by a signle font
> glyph.

What is the "prior art" in this area? how do other editors and word
processors handle this in Indic scripts?

In any case, the fact that this won't work in general does not mean we
shouldn't do it where it does work.




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

* Re: delete-char and composed characters
  2008-10-25  0:46   ` Kenichi Handa
@ 2008-10-25 18:19     ` Stefan Monnier
  2008-10-25 22:20       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2008-10-25 18:19 UTC (permalink / raw)
  To: Kenichi Handa; +Cc: eliz, emacs-devel

>> > Do we have a single-codepoint variant of C-f and C-b?  If not, should we?
>> Where/how would we display the cursor in order for the user to know on
>> which codepoint he is?
> I'm not sure if we need such a command or not, but when you
> run such a command, it is possible disable the automatic
> composition temporarily for that part.

Indeed, that's how it currently works with the `composition' text
property.  E.g. I typically place a λ composition over the `lambda'
symbols in Lisp and if I somehow force point to land in the middle of
`lambda', then the display is temporarily changed to show "lambda".


        Stefan




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

* Re: delete-char and composed characters
  2008-10-25 18:19     ` Stefan Monnier
@ 2008-10-25 22:20       ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2008-10-25 22:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, handa

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Sat, 25 Oct 2008 14:19:14 -0400
> Cc: eliz@gnu.org, emacs-devel@gnu.org
> 
> >> > Do we have a single-codepoint variant of C-f and C-b?  If not, should we?
> >> Where/how would we display the cursor in order for the user to know on
> >> which codepoint he is?
> > I'm not sure if we need such a command or not, but when you
> > run such a command, it is possible disable the automatic
> > composition temporarily for that part.
> 
> Indeed, that's how it currently works with the `composition' text
> property.

This is IMO the least we should do for Emacs 23.1, but it should be a
user-level command, or better yet, some variation of normal motion
commands, because we don't really want the user to mess with
composition directly.




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

end of thread, other threads:[~2008-10-25 22:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-24 13:29 delete-char and composed characters Eli Zaretskii
2008-10-24 18:47 ` Stefan Monnier
2008-10-24 19:47   ` Eli Zaretskii
2008-10-25  0:49     ` Kenichi Handa
2008-10-25  8:01       ` Eli Zaretskii
2008-10-25  0:46   ` Kenichi Handa
2008-10-25 18:19     ` Stefan Monnier
2008-10-25 22:20       ` 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).