help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: mthesaur v synonyms


From: Drew Adams
Subject: RE: mthesaur v synonyms
Date: Fri, 10 Aug 2007 08:34:31 -0700

> FYI,  I have (setq icicle-init-value-flag (quote preselect-end)) and have
> noticed an annoying "bug" (I guess bug but I suspect you will tell me
> how to modify it so it does what I want :-)) This is conjunction with
> delete-selection-mode.
>
> If you bring up file-open, C-x C-f, then the first option (home dir in
> this example) is there and preselected with the cursor at the end. If I
> hit "end" or right cursor then it should unselect the text and
> append. As it is, its behaviour seems inconcistent. Right cursor says
> "end of buffer", "end" does nothing. In both cases the text stays
> selected which means any typing removes the base path.
>
> e.g bring up  file open, "~/" is the hilited default. There is no easy way
> to append to this in "preselect" mode. If I cursor left, the select is
> dropped but when I cursor right again the "~"is reselected for some
> reason.

That's delete-selection mode. Cursor movement extends the selection; it does
not unselect. This applies to both the arrow keys (e.g. `right') and `end'.

To unselect (that is, to deactivate the mark) in delete-selection mode, you
can use `C-g', but that won't work during minibuffer input - the current
command will just be canceled.

Alternatively, you can hit `C-SPC' to set the mark. That's what I recommend
in this case: instead of hitting `right' or `end', hit `C-SPC'. Usually, if
you don't want to use the current selection, you don't mind setting the mark
at point.

Doing that gives you the same effect as using `insert' as the value of
`icicle-init-value-flag', but it does so only on demand. That sounds like
what you want: have the init value selected for easy replacement or
deletion, but be able to cancel the selection whenever you want.

I choose the opposite approach: I use `insert' as the flag value, because I
usually do not want to replace or delete the whole input (I edit parts of
it), and I then use `C-x h' when I want to select the whole input.

> I prefer not to  use "insert" mode as I am too used to
> "preselect" modes in other
> apps I use so any advice on the above would be appreciated.

It often happens that Emacs provides additional features unavailable in
other apps, and carrying over the UI exactly from other apps to Emacs can
conflict to some extent with being able to use those additional features.

In many cases, Emacs has provided ways to get some of the more common UI
behavior, without also sacrificing the extra functionality that Emacs
provides. But there is often a certain tension, and this can be a delicate
balancing act.

Sometimes it's better to take Emacs at its word and try to get used to its
UI. In many cases it's superior, and the change in old habits is worth it.

The problem comes in moving back and forth between Emacs and other apps.
Some people, for instance use cua-mode to avoid finger/brain confusion over
C-x, C-c, etc. The one that trips me up the most is C-s - I occasionally hit
C-s in Emacs, intending to save, because I've been using another app for a
while.









reply via email to

[Prev in Thread] Current Thread [Next in Thread]