From: Miles Bader <miles@lsi.nec.co.jp>
Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org
Subject: Re: [ortmann@isl.net: asymmetries and contradictions in shell navigation using C-a and C-e on a prompt line]
Date: 18 Mar 2002 11:39:35 +0900 [thread overview]
Message-ID: <buou1rey4yg.fsf@mcspd15.ucom.lsi.nec.co.jp> (raw)
In-Reply-To: <200201210941.g0L9f9s14343@aztec.santafe.edu>
[ This is in reply to an old message complainging that commands like C-e
or C-k, when invoked inside a comint prompt, would jump-to/kill-to
the end of the prompt, instead of the end of the line. ]
It seems to me that the right answer to this problem is to augment the
field handling to distinguish between the `inside' and the `outside' of
a field (currently there is no such distinction). Then some commands
(such as `end-of-line' or `kill-line') would only use the field-
sensitive behavior when invoked inside a field, and would act normally
when invoked outside a field.
[ There is one twist, which I'm not sure the right answer too (but which
doesn't effect the comint case). If there's a field inside a line,
like this ([ and ] demark the field):
1xxxxxxxxxxx[FFFFFFFFFFFFFFFFFFFF]yyyyyyyyyyyyyyyyy2
Currently, if you type `C-e' while point is at position `1' in such a
line, it will jump to the beginning of the field, at `[', which is
clearly wrong (though I find that it's sometimes convenient :-).
However, is the right behavior for C-e at position `1' to jump to (a)
the real end of the line (position `2'), or the end of the field at
position `]'? Both behaviors seem fairly sane, and both would be
useful in some cases. ]
The question is, what's a good interface to distinguish the inside of a
field from the outside?
I suggest saying that a field property of `nil' is always `outside', and
any non-nil value is `inside'. This is very easy to understand and
implement, and would be convenient for most user code (since the bulk of
text would automatically be considered `outside').
Unfortunately, the most common use of fields currently is in the
minibuffer, and it uses a `nil' field property as the `inside'
(and puts a non-nil field property on the prompt, to distinguish it).
The reason it does this is because the minibuffer input field is at the
end of the buffer, and can have a size of zero. Thus any inserted
characters will have nil values for their properties, including the
`field' property. Also, it's important that the field code recognize
that there's an empty field there, so that commands such as C-a don't
act wierdly when nothing's been typed into the minibuffer.
However, I think this can be handled by making the minibuffer input use
an overlay for the input field, instead of relying on the nil-properties
inserted at the end of the buffer. [The field code doesn't seem to
always handle this properly, but I think that's an implementation bug.]
So, that's what I propose to do. Any objections, or better ideas?
Thanks,
-Miles
--
80% of success is just showing up. --Woody Allen
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
next parent reply other threads:[~2002-03-18 2:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200201210941.g0L9f9s14343@aztec.santafe.edu>
2002-03-18 2:39 ` Miles Bader [this message]
2002-03-18 15:17 ` [ortmann@isl.net: asymmetries and contradictions in shell navigation using C-a and C-e on a prompt line] Kim F. Storm
2002-03-18 15:39 ` Miles Bader
2002-03-18 16:59 ` Kim F. Storm
2002-03-19 0:02 ` Miles Bader
2002-03-19 9:07 ` Kim F. Storm
2002-03-19 9:24 ` Miles Bader
2002-03-19 8:44 ` Richard Stallman
2002-03-18 20:07 ` Richard Stallman
2002-03-19 0:18 ` Miles Bader
2002-03-20 5:11 ` Richard Stallman
2002-03-20 5:41 ` Miles Bader
2002-03-20 6:30 ` Eli Zaretskii
2002-03-20 6:38 ` Miles Bader
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=buou1rey4yg.fsf@mcspd15.ucom.lsi.nec.co.jp \
--to=miles@lsi.nec.co.jp \
--cc=emacs-devel@gnu.org \
--cc=emacs-pretest-bug@gnu.org \
--cc=miles@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.