|
From: | M Jared Finder |
Subject: | Re: Shift selection using interactive spec |
Date: | Tue, 18 Mar 2008 21:40:55 -0700 |
User-agent: | Mozilla-Thunderbird 2.0.0.9 (X11/20080109) |
Kim F. Storm wrote:
Stefan Monnier <address@hidden> writes:To fix this bug, we would have to change the external package.Yup. We have to fix it anyway in order for the shift to start the selection.That's the beauty of CUA's command property approach - you can fix it simply by setting a property on the problematic commands in your own .emacs -- no need to mess inside the source code. And it is the same for the delete-selection feature -- you can make external packages delete-selection aware simply by setting a suitable property. I.e. if someone complaints that package xxx doesn't work, it is much easier to tell them to "add these two lines to your .emacs" rather than "you need to find file xxx.el and edit the interactive spec of commands xxx-forward and xxx-backward, and then byte-compile the file". But I've given up already - it seems that most people making decisions on this issue don't use shift-select or delete-selection themselves, and they are not interested in listening to those who use it and have proven experience in implementing it (and having spent a lot of time making it work very well).
As an honest-to-god USER of Emacs, I want to say I completely agree with Kim, here. Since I discovered cua-mode, I've had the following code in my .emacs:
(let ((move-fns '(c-forward-conditional c-backward-conditional c-down-conditional c-up-conditional c-down-conditional-with-else c-up-conditional-with-else c-beginning-of-statement c-end-of-statement))) (require 'cua-base) (dolist (symbol move-fns) (unless (eq 'move (get symbol 'CUA)) (display-warning 'emacs (format "Adding CUA property to `%s'." symbol)) (setf (get symbol 'CUA) 'move))))
All I have to do to make an existing command support shift-select is add its name to the list. (The move-fns list used to be a lot longer when I was using Emacs 21.)
If adding shift-select support to existing functions is much harder than adding a function name to a list, and can not be done WITHOUT MODIFYING THE PACKAGE, I will consider that a huge loss of functionality.
I can not grok why you want to remove this very elegant way of supporting shift-select. If you guys end up removing it, I'll justkeep using the old CUA mode, as it seems much more elegant to me, and more importantly, JUST WORKS.
-- MJF
[Prev in Thread] | Current Thread | [Next in Thread] |