On Tue, Dec 12, 2006 at 06:37:16PM +0100, Norbert Nemec wrote: > 1) make an active selection "volatile", i.e.: the selected text gets > unselected as soon as the cursor is moved. (unless you are in Emacs > selection mode that is initated by C-space)
> This is default behavior of both Windows and XEmacs. For plain Emacs > there is no comparison, since the only selection mode is the C-space > selection, where this does not apply. FSF emacs does permit selection with the mouse, so the comparison does apply. I don't see how the comparison is relevant for discussing what TeXmacs does, however. > I hope this satisfies everybody? It is probably what will make TeXmacs the easiest to use to the masses; it is behaviour I personally would dislike, but don't let that stop you. > Apart from being standard behavior, this also has the advantage that > there can never be any active selection except at the location of > the cursor. How often did it happen to you that you forgot an active > selection and accidentally deleted that instead of the character at > the cursor position? Far too often; I do indeed think that this was one of the major UI flaws in TeXmacs. However, I would have solved it by having the backspace / delete keys delete before / after the cursor position, and not the selection. IMHO TeXmacs's problem is that it uses an inconsistent mix between the Emacs selection/copy/paste behaviour and the MS Windows / Gnome / KDE one; both models are internally consistent and TeXmacs could use either of them. But mixing the two in an inconsistent way leads to UI disasters such as the "I forgot there was an active selection and press delete/backspace and the selection gets cut" you describe. > 2) A tiny change to the behavior of Backspace/Delete with an active > selection. Instead of doing a CUT operation (for which you should use > C-X), the selection is now simply DELETED keeping the clipboard content > untouched. Again, this is standard behavior for Windows. Emacs/XEmacs > behave differently, Indeed, there it deletes the character near the cursor, not the selection. > Index: TeXmacs/progs/generic/generic-edit.scm > =================================================================== > --- texmacs.orig/TeXmacs/progs/generic/generic-edit.scm 2006-12-12 > 17:50:25.000000000 +0100 > +++ texmacs/TeXmacs/progs/generic/generic-edit.scm 2006-12-12 > 17:51:11.000000000 +0100 > @@ -41,7 +41,8 @@ > (tm-define (kbd-remove forward?) (remove-text forward?)) > (tm-define (kbd-remove forward?) > (:mode with-active-selection?) > - (clipboard-cut "primary")) > + (clipboard-cut "nowhere") > + (clipboard-clear "nowhere")) > > (tm-define (kbd-tab) > (if (not (complete-try?)) Wouldn't something like that have the same effect and be simpler? --- texmacs.orig/TeXmacs/progs/generic/generic-edit.scm 2006-12-12 17:50:25.000000000 +0100 +++ texmacs/TeXmacs/progs/generic/generic-edit.scm 2006-12-12 17:51:11.000000000 +0100 @@ -NN,N +NN,N @@ (tm-define (kbd-remove forward?) (remove-text forward?)) (tm-define (kbd-remove forward?) (:mode with-active-selection?) - (clipboard-cut "primary")) + (delete-tree (selection-tree))) (tm-define (kbd-tab) (if (not (complete-try?)) -- Lionel _______________________________________________ Texmacs-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/texmacs-dev
