Re: easy-kill: drop-in replacement for kill-ring-save
On 2014-01-19 12:05 +0800, Darren Hoo wrote: some suggestions: Thanks. 1. when unbound keys being pressed, doing a quit(maybe shown on the echo area) instead of doing a self-insert? For example, when M-w a is pressed, just quit easy-kill and not insert 'a'. You can get close to what you want by: (define-key easy-kill-base-map [remap self-insert-command] 'easy-kill-exit) (put 'easy-kill-exit 'easy-kill-exit t) (defun easy-kill-exit () (interactive) 'ignore)) One common use pattern is M-w and then move around to place the copied text, which should silently exit easy-kill. Most keys should not be intercept by easy-kill. 2. About extend/shrink, can up down left right be bounded too, these are more intuitive to me than +/-. You could add these keys to easy-kill-base-map. Leo ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
Leo Liu sdl@gmail.com writes: Hi there, Package easy-kill.el provides a more powerful command `easy-kill' for key M-w. easy-kill tries in order: 1. current region if active 2. url at point 3. email at point 4. current line Keys (customisable) immediately following M-w: 1. w - word at point 2. s - sexp at point 3. f - file at point 4. l - list at point 5. d - defun at point 6. b - buffer-file-name 7. + - extend current selection 8. - - shrink current selection some suggestions: 1. when unbound keys being pressed, doing a quit(maybe shown on the echo area) instead of doing a self-insert? For example, when M-w a is pressed, just quit easy-kill and not insert 'a'. 2. About extend/shrink, can up down left right be bounded too, these are more intuitive to me than +/-. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
[ To any NSA and FBI agents reading my email: please consider [ whether defending the US Constitution against all enemies, [ foreign or domestic, requires you to follow Snowden's example. Just tried. Yes, it is possible to create a new account on github.com with Javascript disabled. Thanks for verifying this. It will be relevant when we write up a policy concerning Github. -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use Ekiga or an ordinary phone call. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
Richard Stallman r...@gnu.org writes: I don't know if it is required for creating a new account, though. Could someone try that? Just tried. Yes, it is possible to create a new account on github.com with Javascript disabled. P.S.: thanks for the correction. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
On 08.10.2013 10:25, Leo Liu wrote: On the other hand, extending it with new things will be more difficult, since each one of them will require a dedicated key and some headspace estate to remember it. And there's no mechanism to expand the region from smaller to bigger things. Maybe I don't really need that, though. The extensions are provided both for development and for experienced users. I have made +/- expand/shrink on list or sexp more lispy could you try it out? Yes, thank you, looks good. Especially since you can still press `s' or `l' to get the previous behavior (I haven't noticed that initially). But the point I was trying to make is that expand-region just expands to the next largest thing (of any kind), so the user doesn't need to remember all available kinds, or their keys. The one problem I encountered has to do with the next command expecting an active region: mc/mark-all-like-this-dwim, from the multiple-cursors package, uses the active region, if it's present. With expand-region, the region becomes active as a result, and mc/mark-all-like-this-dwim marks all occurences of the text in the region. Not so with easy-kill: the text gets copied to the kill ring, but the region is inactive, so mc/mark-all-like-this-dwim just uses the symbol at point. Sorry I use neither of these packages. Is the intention to have region active after exit easy-kill? Or is it better to have, for example, C-SPC exit easy-kill and activate region? I'll experiment with these ideas later today. I'd say neither, ideally. Having region always active after pressing M-w would be weird. C-SPC is a better option, but honestly, it's way too many keystrokes compared to expand-region when you just want to select the current symbol. With expand-region, it's just one keystroke (it defaults to symbols), and with easy-kill it is `M-w s C-SPC'. I think, ideally, easy-kill would activate the region only as far as the next command is concerned (so that command can use it). Not sure how to implement it best. Maybe via a one-time pre/post-command-hook that would remove itself? ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
[ To any NSA and FBI agents reading my email: please consider [ whether defending the US Constitution against all enemies, [ foreign or domestic, requires you to follow Snowden's example. This mailing list is too slow for discussion. Could you comment on this github issue instead? https://github.com/leoliu/easy-kill/issues/3 Wait a minute! There is an ethical issue we need to check! Is it possible to participate in that discussion with Javascript disabled? -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use Ekiga or an ordinary phone call. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
Richard Stallman r...@gnu.org writes: This mailing list is too slow for discussion. Could you comment on this github issue instead? https://github.com/leoliu/easy-kill/issues/3 Wait a minute! There is an ethical issue we need to check! Is it possible to participate in that discussion with Javascript disabled? You picked my curiosity and tried it (not on that thread but elsewhere with the same interface.) The answer is yes, you can login on the site, comment and even open new threads with Javascript disabled. I don't know if it is required for creating a new account, though. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
Hello, Richard, On 10.10.2013 02:05, Richard Stallman wrote: https://github.com/leoliu/easy-kill/issues/3 Wait a minute! There is an ethical issue we need to check! Is it possible to participate in that discussion with Javascript disabled? Yes, it is, I just checked. They also send notifications for each new comment (or issue) to the user's and maintainers' emails, and the user can reply to these comments using email as well as the web interface. There are some things you can't do with JS disabled: edit your comments, edit the issue description (which is otherwise possible if you are the reporter or the project owner), assign labels or milestone to the issue. The first two actions are impossible with Debbugs anyway. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
Hi Dmitry ;) On 2013-10-08 09:37 +0800, Dmitry Gutov wrote: I've played around with it a bit, and it feels quite comfortable. There is certain amount of overlap with Magnar Sveen's expand-region, but easy-kill provides finer controls. Thank you. On the other hand, extending it with new things will be more difficult, since each one of them will require a dedicated key and some headspace estate to remember it. And there's no mechanism to expand the region from smaller to bigger things. Maybe I don't really need that, though. The extensions are provided both for development and for experienced users. I have made +/- expand/shrink on list or sexp more lispy could you try it out? The one problem I encountered has to do with the next command expecting an active region: mc/mark-all-like-this-dwim, from the multiple-cursors package, uses the active region, if it's present. With expand-region, the region becomes active as a result, and mc/mark-all-like-this-dwim marks all occurences of the text in the region. Not so with easy-kill: the text gets copied to the kill ring, but the region is inactive, so mc/mark-all-like-this-dwim just uses the symbol at point. Sorry I use neither of these packages. Is the intention to have region active after exit easy-kill? Or is it better to have, for example, C-SPC exit easy-kill and activate region? I'll experiment with these ideas later today. Thank you for the excellent comments. Leo ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources
Re: easy-kill: drop-in replacement for kill-ring-save
Hi Leo, Leo Liu sdl@gmail.com writes: Package easy-kill.el provides a more powerful command `easy-kill' for key M-w. I've played around with it a bit, and it feels quite comfortable. There is certain amount of overlap with Magnar Sveen's expand-region, but easy-kill provides finer controls. On the other hand, extending it with new things will be more difficult, since each one of them will require a dedicated key and some headspace estate to remember it. And there's no mechanism to expand the region from smaller to bigger things. Maybe I don't really need that, though. The one problem I encountered has to do with the next command expecting an active region: mc/mark-all-like-this-dwim, from the multiple-cursors package, uses the active region, if it's present. With expand-region, the region becomes active as a result, and mc/mark-all-like-this-dwim marks all occurences of the text in the region. Not so with easy-kill: the text gets copied to the kill ring, but the region is inactive, so mc/mark-all-like-this-dwim just uses the symbol at point. ___ gnu-emacs-sources mailing list gnu-emacs-sources@gnu.org https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources