Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hello Bastien and Thomas, Bastien wrote: thanks for starting this list. t...@tsdye.com (Thomas S. Dye) writes: C-c ! Creating timestamps C-c . Creating timestamps C-c # Checkboxes C-c ' Editing and debugging formulas, literal examples, include files, editing source code, cooperation C-c , Priorities C-c ; Comment lines C-c ? Editing and debugging formulas C-c @ Structure editing C-c ^ Structure editing, plain lists, built-in table editor C-c ` Built-in table editor C-c ~ Cooperation (There is also C-c : (to add QUOTE) but doomed to disappear anyway.) What about `C-c {' and such in the tables? I think most of these keybindings could migrate to a C-c C- version. For example: C-c # Checkboxes would be C-c C-# Checkboxes this would work for all of them except C-c ^ beause C-c C-^ is already bound to org-up-element. Maybe it can move to C-c M-^ instead (but that's one of the keybindings that is deeply into my memory.) So is it for me. As half of the above mentioned key bindings -- the other half, I don't know/use it. How would everyone feel about moving those keybindings to comply more closely with Emacs coding recommendations? I guess it's better to comply to the Emacs guidelines. That change will allow us to wake up our neurons and fight against Alzheimer. So, let's do it. Best regards, Seb -- Sebastien Vauban
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org writes: What about `C-c {' and such in the tables? (FWIW, that's one of the few keybindings I would not like to change.) I guess it's better to comply to the Emacs guidelines. That change will allow us to wake up our neurons and fight against Alzheimer. So, let's do it. Thanks for your feedback -- that said, maybe the move is to big compared to the real issue at stake. I'd rather make this move minimalist by just rebinding those keybindings that are not *that* into our memories (e.g. C-c # ... ) -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Bastien, Bastien wrote: Sebastien Vauban writes: What about `C-c {' and such in the tables? (FWIW, that's one of the few keybindings I would not like to change.) I guess it's better to comply to the Emacs guidelines. That change will allow us to wake up our neurons and fight against Alzheimer. So, let's do it. Thanks for your feedback -- that said, maybe the move is to big compared to the real issue at stake. I'd rather make this move minimalist by just rebinding those keybindings that are not *that* into our memories (e.g. C-c # ... ) Personally, I'd opt for a all-or-none switch. If you only do some, we can't rely on just add another C- to get the right key binding. I have the impression we'll never know which ones were migrated, and which ones weren't. In the case you don't intend to move 'em all, I'd stay with the current config, then. Is it really important to have a couple less of not standard key bindings, if we still have others which don't comply? Best regards, Seb -- Sebastien Vauban
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hi Sébastien, Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org writes: Is it really important to have a couple less of not standard key bindings, if we still have others which don't comply? I think so, as it reduces the chances of conflicting keybindings from other minor modes. -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Bastien, Bastien wrote: Sebastien Vauban writes: Is it really important to have a couple less of not standard key bindings, if we still have others which don't comply? I think so, as it reduces the chances of conflicting keybindings from other minor modes. OK. I (can) agree. But not changing them all will make it even more complex for our little heads... Best regards, Seb -- Sebastien Vauban
Re: [O] org-mode + icicles, avoid key binding redefinitions?
On 28.01.2014 10:08, Bastien wrote: I think most of these keybindings could migrate to a C-c C- version. There is no need for migrating them IMO. The recommendation is: Sequences consisting of `C-c' followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. This means important commands should have a binding reserved for major modes. But there is absolutely no need to remove bindings which (for many org users) have worked just fine for a long time. -- Florian Beck
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Florian Beck f...@miszellen.de writes: On 28.01.2014 10:08, Bastien wrote: I think most of these keybindings could migrate to a C-c C- version. There is no need for migrating them IMO. The recommendation is: Sequences consisting of `C-c' followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. This means important commands should have a binding reserved for major modes. But there is absolutely no need to remove bindings which (for many org users) have worked just fine for a long time. But it's not just a matter of satisfying rules: it's a matter of making it easy on users. Having a bad binding as well as a good binding for something would mean that if I load a minor mode that takes over the bad binding, I would then lose it in the major mode and have to remember the good binding. That's more confusing IMO than having a single good binding: if we need to retrain fingers, we need to retrain them once, not every time we load a minor mode that steps on some binding. I find myself more in agreement with Seb than with Bastien here. The argument that reducing the number of bad bindings reduces the chance of conflicts does not hold water IMO: we will always have to be looking in the rear-view mirror for some minor mode that will step on us. If it's an important enough problem to solve, we should just follow the emacs guidelines in their entirety. -- Nick
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hi Nick, Nick Dokos ndo...@gmail.com writes: I find myself more in agreement with Seb than with Bastien here. The argument that reducing the number of bad bindings reduces the chance of conflicts does not hold water IMO: we will always have to be looking in the rear-view mirror for some minor mode that will step on us. In the last ten years, we had only *one* such problem while having a dozen of faulty keybindings --- my hope is that, with only a fistful of faulty keybindings, we won't have to look in the rear-view mirror for the next twenty years :) [IOW: I don't buy the all-or-nothing reasoning.] More precisely, I suggest these rebindings: C-c # Checkboxes = C-c C-# C-c , Priorities = C-c C-, C-c ; Comment lines = C-c C-; C-c @ Mark subtree = C-c C-@ (Note they are also accessible through speedy keys.) C-c ~ Cooperation= C-c C-~ (This one I just discovered.) Let's not get trapped in a buridanesque decision. :) -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
On 29.01.2014 14:16, Nick Dokos wrote: But it's not just a matter of satisfying rules: it's a matter of making it easy on users. That is why I don't recommend satisfying them here. Having a bad binding as well as a good binding for something would mean that if I load a minor mode that takes over the bad binding, I would then lose it in the major mode and have to remember the good binding. That's more confusing IMO than having a single good binding: if we need to retrain fingers, we need to retrain them once, not every time we load a minor mode that steps on some binding. On the other hand, it doesn't happen every time. The bindings had been working for years before one user reported a problem with some of them. The conflict is rare and doesn't require resolution. But it is polite to provide alternatives for bindings that might be shadowed. -- Florian Beck
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Florian Beck f...@miszellen.de writes: But it is polite to provide alternatives for bindings that might be shadowed. Indeed. The only problem is C-c ^ since C-c C-^ is already taken. Btw, we could use C-c C-u (currently bound to `outline-up-heading') instead of C-c C-^ (currently bound to `org-up-element') : in most cases, `org-up-element' will achieve either the same or a better job. -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hello, Bastien b...@gnu.org writes: Florian Beck f...@miszellen.de writes: But it is polite to provide alternatives for bindings that might be shadowed. Indeed. The only problem is C-c ^ since C-c C-^ is already taken. Btw, we could use C-c C-u (currently bound to `outline-up-heading') instead of C-c C-^ (currently bound to `org-up-element') : in most cases, `org-up-element' will achieve either the same or a better job. I think that C-M-u is also a good candidate for `org-up-element'. Regards, -- Nicolas Goaziou
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Aloha Seb, Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org writes: What about `C-c {' and such in the tables? The syntax table I see in my org file calls `{' an open delimiter character, not punctuation. Of course, I'm assuming that what the syntax table calls punctuation is what the emacs guideline means when it says punctuation. Also, this is my first time trying to decode a syntax table, so caveat emptor. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: Also, this is my first time trying to decode a syntax table, so caveat emptor. Yes -- when doing C-u C-x on { in fundamental-mode I read Character code properties: customize what to show name: LEFT CURLY BRACKET old-name: OPENING CURLY BRACKET general-category: Ps (Punctuation, Open) ^^^ and this is the same in org-mode, as org-mode does not modify the syntax of this character. So I think `{' is generally a considered a punctuation character (compare it to the `*' char, which also falls into two categories, punctuation and other.) -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Bastien writes: More precisely, I suggest these rebindings: C-c # Checkboxes = C-c C-# C-c , Priorities = C-c C-, C-, can not be input using an ASCII terminal as it would produce a line control character. C-c ; Comment lines = C-c C-; C-c @ Mark subtree = C-c C-@ C-@ may get lost in some terminals also (it's the NUL character). Any combinations with Shift were originally ignored and silently mapped to their non-shifted counterparts. Regards, Achim. -- +[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+ Factory and User Sound Singles for Waldorf Q+, Q and microQ: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Aloha Bastien, Bastien b...@gnu.org writes: Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: Also, this is my first time trying to decode a syntax table, so caveat emptor. Yes -- when doing C-u C-x on { in fundamental-mode I read Character code properties: customize what to show name: LEFT CURLY BRACKET old-name: OPENING CURLY BRACKET general-category: Ps (Punctuation, Open) ^^^ and this is the same in org-mode, as org-mode does not modify the syntax of this character. So I think `{' is generally a considered a punctuation character (compare it to the `*' char, which also falls into two categories, punctuation and other.) Then punctuation has two senses, one generic and another specific. To my mind, the emacs guideline is ambiguous unless there is some convention about which sense is meant in this case. I guess it would be possible to look at the code to figure this out, but I'm not well equipped to do that. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Bastien b...@gnu.org writes: Hi Nick, Nick Dokos ndo...@gmail.com writes: I find myself more in agreement with Seb than with Bastien here. The argument that reducing the number of bad bindings reduces the chance of conflicts does not hold water IMO: we will always have to be looking in the rear-view mirror for some minor mode that will step on us. In the last ten years, we had only *one* such problem while having a dozen of faulty keybindings --- my hope is that, with only a fistful of faulty keybindings, we won't have to look in the rear-view mirror for the next twenty years :) [IOW: I don't buy the all-or-nothing reasoning.] I might be missing something here. But I think it would not be a problem for Bastien (and others with similar preferences) to rebind the keys to the shorter and potentially problematic version. So to me it seems, that the only problem with making the default keybindings less 'offensive' is finding non-taken and non-offensive keybindings. The question is whether Org could do something to make rebinding keys easier? Like a worg page / FAQ about 'getting the old keybindings back', maybe? Just my 2ct, of course. - Andreas More precisely, I suggest these rebindings: C-c # Checkboxes = C-c C-# C-c , Priorities = C-c C-, C-c ; Comment lines = C-c C-; C-c @ Mark subtree = C-c C-@ (Note they are also accessible through speedy keys.) C-c ~ Cooperation= C-c C-~ (This one I just discovered.) Let's not get trapped in a buridanesque decision. :)
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Yep, I am also using org-mode with icicles. Made several mods to help with that. I use icicles for searching headers or text content all the time. Interesting is the possibility to open a section (subtree) in an independent buffer after finding it, with one command. I enclose the code here, plus the link to a gist containing the code. Gist link: https://gist.github.com/iani/8695954 Gist name: org-icicles Iannis Zannos (add-hook 'org-mode-hook (lambda () (imenu-add-to-menubar Imenu))) (setq org-imenu-depth 3) (defun org-icicle-occur () In org-mode, show entire buffer contents before running icicle-occur. Otherwise icicle-occur will not place cursor at found location, if the location is hidden. (interactive) (show-all) (icicle-occur (point-min) (point-max)) (recenter 3)) (eval-after-load 'org '(define-key org-mode-map (kbd C-c C-') 'org-icicle-occur)) (eval-after-load 'org '(define-key org-mode-map (kbd C-c i o) 'org-icicle-occur)) (defun org-icicle-imenu (separate-buffer) In org-mode, show entire buffer contents before running icicle-imenu. Otherwise icicle-occur will not place cursor at found location, if the location is hidden. If called with prefix argument (C-u), then: - open the found section in an indirect buffer. - go back to the position where the point was before the command, in the original buffer. (interactive P) (show-all) (let ((mark (point))) (icicle-imenu (point-min) (point-max) t) (cond (separate-buffer (org-tree-to-indirect-buffer) (goto-char mark)) (t (recenter 4) (eval-after-load 'org '(define-key org-mode-map (kbd C-c C-=) 'org-icicle-imenu)) (eval-after-load 'org '(define-key org-mode-map (kbd C-c i m) 'org-icicle-imenu)) ;; install alternative for org-mode C-c = org-table-eval-formula ;; which is stubbornly overwritten by icy-mode. (eval-after-load 'org '(define-key org-mode-map (kbd C-c C-x =) 'org-table-eval-formula)) ;; this is a redundant second try for the above, to be removed after testing: (add-hook 'org-mode-hook (lambda () (local-set-key (kbd C-c M-=) 'org-table-eval-formula))) ;;; Adapt org-mode to icicle menus when refiling (C-c C-w) ;;; Still problems. Cannot use standard org refiling with icicles activated! (setq org-outline-path-complete-in-steps nil) (add-hook 'org-mode-hook (lambda () (prelude-mode -1))) (defun org-refile-icy (as-subtree optional do-copy-p) Alternative to org-refile using icicles. Refile or copy current section, to a location in the file selected with icicles. Without prefix argument: Place the copied/cut section it *after* the selected section. With prefix argument: Make the copied/cut section *a subtree* of the selected section. Note 1: If quit with C-g, this function will have removed the section that is to be refiled. To get it back, one has to undo, or paste. Note 2: Reason for this function is that icicles seems to break org-modes headline buffer display, so onehas to use icicles for all headline navigation if it is loaded. (interactive P) (outline-back-to-heading) (if do-copy-p (org-copy-subtree) (org-cut-subtree)) (show-all) (icicle-imenu (point-min) (point-max) t) (outline-next-heading) (unless (eq (current-column) 0) (insert \n)) (org-paste-subtree) (if as-subtree (org-demote-subtree))) (defun org-copy-icy (as-subtree) Copy section to another location in file, selecting the location with icicles. See org-refile-icy. (interactive P) (org-refile-icy as-subtree t)) (eval-after-load 'org '(define-key org-mode-map (kbd C-c i r) 'org-refile-icy)) (eval-after-load 'org '(define-key org-mode-map (kbd C-c i c) 'org-copy-icy)) On Wed, Jan 29, 2014 at 9:48 PM, Thomas S. Dye t...@tsdye.com wrote: Aloha Bastien, Bastien b...@gnu.org writes: Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: Also, this is my first time trying to decode a syntax table, so caveat emptor. Yes -- when doing C-u C-x on { in fundamental-mode I read Character code properties: customize what to show name: LEFT CURLY BRACKET old-name: OPENING CURLY BRACKET general-category: Ps (Punctuation, Open) ^^^ and this is the same in org-mode, as org-mode does not modify the syntax of this character. So I think `{' is generally a considered a punctuation character (compare it to the `*' char, which also falls into two categories, punctuation and other.) Then punctuation has two senses, one generic and another specific. To my mind, the emacs guideline is ambiguous unless there is some convention about which sense is meant in this case. I guess it would be possible to look at the code to figure this out, but I'm not well equipped to do that. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Agree. To do my own rebindings i use this kind of code: (eval-after-load 'org '(define-key org-mode-map (kbd C-c C-=) 'org-icicle-imenu)) But when re-opening a buffer with desktop after rebooting emacs, the new bindings are not added IZ On Wed, Jan 29, 2014 at 10:06 PM, Andreas Leha andreas.l...@med.uni-goettingen.de wrote: Bastien b...@gnu.org writes: Hi Nick, Nick Dokos ndo...@gmail.com writes: I find myself more in agreement with Seb than with Bastien here. The argument that reducing the number of bad bindings reduces the chance of conflicts does not hold water IMO: we will always have to be looking in the rear-view mirror for some minor mode that will step on us. In the last ten years, we had only *one* such problem while having a dozen of faulty keybindings --- my hope is that, with only a fistful of faulty keybindings, we won't have to look in the rear-view mirror for the next twenty years :) [IOW: I don't buy the all-or-nothing reasoning.] I might be missing something here. But I think it would not be a problem for Bastien (and others with similar preferences) to rebind the keys to the shorter and potentially problematic version. So to me it seems, that the only problem with making the default keybindings less 'offensive' is finding non-taken and non-offensive keybindings. The question is whether Org could do something to make rebinding keys easier? Like a worg page / FAQ about 'getting the old keybindings back', maybe? Just my 2ct, of course. - Andreas More precisely, I suggest these rebindings: C-c # Checkboxes = C-c C-# C-c , Priorities = C-c C-, C-c ; Comment lines = C-c C-; C-c @ Mark subtree = C-c C-@ (Note they are also accessible through speedy keys.) C-c ~ Cooperation= C-c C-~ (This one I just discovered.) Let's not get trapped in a buridanesque decision. :)
Re: [O] org-mode + icicles, avoid key binding redefinitions?
t...@tsdye.com (Thomas S. Dye) writes: Then punctuation has two senses, one generic and another specific. To my mind, the emacs guideline is ambiguous unless there is some convention about which sense is meant in this case. I guess it would be possible to look at the code to figure this out, but I'm not well equipped to do that. Re-reading the Elisp conventions about keybindings says this: • Sequences consisting of ‘C-c’ followed by ‘{’, ‘}’, ‘’, ‘’, ‘:’ or ‘;’ are also reserved for major modes. • Sequences consisting of ‘C-c’ followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. So C-c { and C-c } are fine in a major mode. (And now that C-c : is not used anymore, this gives us one more free keybinding to reuse.) -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hi Thomas, thanks for starting this list. t...@tsdye.com (Thomas S. Dye) writes: C-c ! Creating timestamps C-c . Creating timestamps C-c # Checkboxes C-c ' Editing and debugging formulas, literal examples, include files, editing source code, cooperation C-c , Priorities C-c ; Comment lines C-c ? Editing and debugging formulas C-c @ Structure editing C-c ^ Structure editing, plain lists, built-in table editor C-c ` Built-in table editor C-c ~ Cooperation (There is also C-c : (to add QUOTE) but doomed to disappear anyway.) I think most of these keybindings could migrate to a C-c C- version. For example: C-c # Checkboxes would be C-c C-# Checkboxes this would work for all of them except C-c ^ beause C-c C-^ is already bound to org-up-element. Maybe it can move to C-c M-^ instead (but that's one of the keybindings that is deeply into my memory.) How would everyone feel about moving those keybindings to comply more closely with Emacs coding recommendations? PS: This is a big change so let's move slowly here, with as much feedback as possible. -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: I just checked the Org mode manual and found that it has several entries that consist of `C-c' followed by a punctuation character. Can we list them in this thread to discuss how bad the situation is for each of these keybindings? In my quick check (at the boarding gate for an airline flight) I didn't find a note that these sequences might properly be shadowed by a minor mode. Perhaps a note in the manual would be useful? Indeed. But first let's make a list and see which one of these keybindings could be a candidate for an update. -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Aloha Bastien, Bastien b...@gnu.org writes: Hi Thomas, t...@tsdye.com (Thomas S. Dye) writes: I just checked the Org mode manual and found that it has several entries that consist of `C-c' followed by a punctuation character. Can we list them in this thread to discuss how bad the situation is for each of these keybindings? In my quick check (at the boarding gate for an airline flight) I didn't find a note that these sequences might properly be shadowed by a minor mode. Perhaps a note in the manual would be useful? Indeed. But first let's make a list and see which one of these keybindings could be a candidate for an update. Using the syntax table for Org I found the following C-c punctuation combinations in the Org Key Index: * C-c punctuation C-c ! Creating timestamps C-c # Checkboxes C-c ' Editing and debugging formulas, literal examples, include files, editing source code, cooperation C-c , Priorities C-c . Creating timestamps C-c ; Comment lines C-c ? Editing and debugging formulas C-c @ Structure editing C-c ^ Structure editing, plain lists, built-in table editor C-c ` Built-in table editor C-c ~ Cooperation I think I've interpreted the syntax table correctly, but I don't have any experience with this, so I might have made mistakes. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hello Drew, Drew Adams drew.ad...@oracle.com writes: 1d. By default only. It is trivial to customize user option `icicle-top-level-keybindings', to bind `icicle-occur' to a different key or to give it no key binding at all. (And no, you do not need to fiddle with Lisp to do that - not even `define-key'. `M-x customize-option' is your friend - just get yourself a separate `custom-file', for sanity.) 1e. The same holds for `C-`', which Icicles binds by default to `icicle-search'. And it holds for any other top-level keys. If you think that Icicles is clobbering any key bindings that you prefer from another package (such as Org), it is simple to change keys (in Icicles anyway; dunno about Org). Icicles does not clobber any keys without your permission - just customize `icicle-top-level-keybindings'. Thanks a lot for this suggestion. I'm just not used to the customize system so I did not think of looking there. I have an additional question: where does one ask for help about icicle? I don't know how to make it work with bbdb, and searching online didn't clarify things. Thanks again, Alan
Re: [O] org-mode + icicles, avoid key binding redefinitions?
I have an additional question: where does one ask for help about icicle? 1. `M-x icicle-send-bug-report' or menu Icicles Send Icicles Bug Report or `M-x customize-group Icicles' click Send Bug Report 2. Emacs Wiki: Bugs: http://www.emacswiki.org/emacs/IciclesIssues Suggestions: http://www.emacswiki.org/emacs/IciclesDiscussion 3. Email (see file headers). I don't know how to make it work with bbdb, and searching online didn't clarify things. I don't use BBDB. I've heard that they changed it a lot recently, so the Icicles code for it (command `icicle-bbdb-complete-mail') might need to be updated. For that, it would be good to get some info and perhaps some testing from a BBDB user. If you would like to volunteer in that regard, drop me a line. Icicles works with older BBDB versions, at least. The last change I made to the Icicles BBDB command was a year ago, for BBDB version 3.02. If you have a newer BBDB version than 3.02 and it is problematic with Icicles, you can just remove `bbdb-complete-mail' or `bbdb-complete-name' from the value of user option `icicle-functions-to-redefine' (`M-x customize-option'). That will give you back the vanilla BBDB command, instead of an Icicles version. But if you have BBDB 3.02 or 2.35 then you should not have a problem. The doc for Icicles + BBDB is here: http://www.emacswiki.org/Icicles_-_Completion_in_Other_Buffers#BbdbCompletion An extract: If user option `icicle-functions-to-redefine' contains an entry for 'bbdb-complete-mail' (for BBDB version 3.02) or 'bbdb-complete-name' (for BBDB version 2.35), then Icicles redefines that command so that it uses Icicles completion when there are multiple completions. You can use any Icicles features, such as apropos completion and candidate cycling. For this feature to take effect, you must load BBDB before you load Icicles. Option 'icicle-functions-to-redefine' includes entries for both 'bbdb-complete-mail' and 'bbdb-complete-name' by default. HTH.
Re: [O] org-mode + icicles, avoid key binding redefinitions?
* Sequences consisting of `C-c' followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. IOW, no major mode should bind any of the latter group of keys, including `C-'' and `C-`', and any minor mode may do so - whether that mode is official or not. We are talking about C-c ' but I think that's a typo in the paragraph above, since the manual you quote is about C-c '. Yes, sorry, I meant C-c ' and C-c `. 1b. There is no global default binding for `C-'' in `emacs -Q'. And there should not be, since it is reserved for minor modes. I don't know whether Org binds `C-'' for a minor mode or for a major mode, but if it is the latter then it is in violation of the convention. As the manual says, this is not prohibited, just discouraged. Binding C-c ' by a major mode defies the convention. Whether you want to interpret the convention as a prohibition (without any real teeth) or just a mild discouragement is up to you. What we can say is that any major mode that binds such keys does not respect the GNU Emacs key-binding conventions, which were defined to allow help modes and libraries cooperate. There can be no disagreement about that. We can disagree about how important it is to respect those conventions. Icicles, at any rate, does respect them. You're of course allowed to shadow C-c ' in your code. It's not about me or my code or being allowed. C-c ' is reserved for minor modes. Any minor mode can bind such keys. No major mode should do so.
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Drew Adams drew.ad...@oracle.com writes: No major mode should do so. One problem is that Org uses C-c . too ... and some more. Perhaps it's better to report this as an Emacs bug so that we can discuss the issue with Emacs maintainers and see what's really at stake here. For me, the keybindings are already too deeply in my memory to consider removing them -- but perhaps that's me. -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
No major mode should do so. One problem is that Org uses C-c . too ... and some more. Perhaps it's better to report this as an Emacs bug so that we can discuss the issue with Emacs maintainers and see what's really at stake here. I'm not familiar with Org mode. As I said, I don't even know whether it binds such keys in a minor mode (which is fine) or in a major mode (which is not). Since you are familiar with whatever bindings Org sets, and you have read the key-binding conventions section of the manual, please file a bug if you think it is appropriate. You are well placed to give the details. (FWIW, I seem to recall that I pointed this out to you a few years back.) There is a specific list of keys reserved for users, and another list of keys reserved for minor modes. If a major mode is using keys from either of these lists then that should be fixed. For me, the keybindings are already too deeply in my memory to consider removing them -- but perhaps that's me. Consideration of whether to fix bugs should not be based on your habits or memory. (I am not claiming there is an Org bug here - I don't know. That's for you to judge.)
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hi Drew, Drew Adams drew.ad...@oracle.com writes: Since you are familiar with whatever bindings Org sets, and you have read the key-binding conventions section of the manual, please file a bug if you think it is appropriate. You are well placed to give the details. [...] Consideration of whether to fix bugs should not be based on your habits or memory. (I am not claiming there is an Org bug here - I don't know. That's for you to judge.) It is only discouraged, so it's not a bug IMO. And I don't want to push for this change, so I won't fill a bug report. -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Perhaps it's better to report this as an Emacs bug so that we can discuss the issue with Emacs maintainers and see what's really at stake here. Since you are familiar with whatever bindings Org sets, and you have read the key-binding conventions section of the manual, please file a bug if you think it is appropriate. You are well placed to give the details. For me, the keybindings are already too deeply in my memory to consider removing them -- but perhaps that's me. Consideration of whether to fix bugs should not be based on your habits or memory. (I am not claiming there is an Org bug here - I don't know. That's for you to judge.) It is only discouraged, Dunno what that means. It's not a criminal offense, no. But the rules as written do not say anything about only discouraging breaking them. You can take the rules as only guidelines/etiquette or as rules you really do not want to break. No one will arrest you for disrespecting any of them. so it's not a bug IMO. And I don't want to push for this change, so I won't fill a bug report. That was probably also the outcome from the last time this came up, a few years back. ;-) _You_ suggested (above) that this should be reported as an Emacs bug. But you also don't want to push for it to be fixed or report it, yourself. So be it. I would encourage someone else familiar with whatever Org actually does in this regard (which is not me) to consider filing an Emacs bug report, _if_ Org does in fact violate the keybinding conventions. Perhaps such Org bindings existed before Org was added to Emacs, and perhaps when it was added no one noticed any disrespect of the rules (it was a big chunk to add). Dunno. In any case, old habits are not a good reason not to fix incompatibilities with other packages. At any rate, let us not hear any more about this or that 3rd-party minor-mode code clobbering such bindings, if those bindings were created improperly by a major mode. These are bindings reserved for _minor_ modes. A major mode that messes with such bindings is the one doing any clobbering. That is the case no matter how popular the major mode is or how much the unfortunate bindings might be ingrained in someone's memory.
Re: [O] org-mode + icicles, avoid key binding redefinitions?
* Sequences consisting of `C-c' followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. That's pretty clear to me. To me too. It's not absolutely prohibited. If a major mode does not mind having its binding shadowed, it can use a key allocated for minor modes. So yes, it's not a bug. It might not be a great choice, but it doesn't break anything. Minor-mode bindings take precedence, so it is the major-mode binding that gets shadowed. If that's not a problem for the major mode, no problem.
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Drew Adams drew.ad...@oracle.com writes: Dunno what that means. It's not a criminal offense, no. Let me quote the manual again: * Sequences consisting of `C-c' followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. That's pretty clear to me. _You_ suggested (above) that this should be reported as an Emacs bug. But you also don't want to push for it to be fixed or report it, yourself. So be it. I suggested that *you* report it as a bug if you think it's a bug. I don't think it is, it's that simple. -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Aloha all, Bastien b...@altern.org writes: Drew Adams drew.ad...@oracle.com writes: Dunno what that means. It's not a criminal offense, no. Let me quote the manual again: * Sequences consisting of `C-c' followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. That's pretty clear to me. _You_ suggested (above) that this should be reported as an Emacs bug. But you also don't want to push for it to be fixed or report it, yourself. So be it. I suggested that *you* report it as a bug if you think it's a bug. I don't think it is, it's that simple. I just checked the Org mode manual and found that it has several entries that consist of `C-c' followed by a punctuation character. In my quick check (at the boarding gate for an airline flight) I didn't find a note that these sequences might properly be shadowed by a minor mode. Perhaps a note in the manual would be useful? All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Someone pointed me to this thread. I am not subscribed to this list, so cc me if you want me to see a reply you write. Wrt some of what I read in the thread: 1. It is not true, (or else it is meaningless, depending on what you mean by that phrase) that C-c ' is officially an Emacs keybinding. Just because Org is part of Emacs does not mean that any key bindings enabled for Org mode are somehow the official Emacs bindings for those keys, and so take precedence over bindings from unofficial packages. That would be absurd. Think about it. Is key `b' taken once and for all, just because official Emacs `compilation-minor-mode-map' binds it to `compile-mode-summary'? Is `C-x C-s' taken, just because official `rcirc-multiline-minor-mode-map' binds it to `rcirc-multiline-minor-submit'? Is `C-c C-SPC' taken, because `erc-track-minor-mode-map' binds it to `erc-track-switch-buffer'? 1a. From the Elisp manual, node `Key Binding Conventions': * Sequences consisting of `C-c' followed by `{', `}', `', `', `:' or `;' are also reserved for major modes. * Sequences consisting of `C-c' followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. IOW, no major mode should bind any of the latter group of keys, including `C-'' and `C-`', and any minor mode may do so - whether that mode is official or not. 1b. There is no global default binding for `C-'' in `emacs -Q'. And there should not be, since it is reserved for minor modes. I don't know whether Org binds `C-'' for a minor mode or for a major mode, but if it is the latter then it is in violation of the convention. If it is the former, then that is fine. 1c. Just as it is fine for any other minor mode to bind the same key. Icicle mode is a (global) minor mode. By default, Icicles binds `C-'' in `icicle-mode-map' (to command `icicle-occur'). 1d. By default only. It is trivial to customize user option `icicle-top-level-keybindings', to bind `icicle-occur' to a different key or to give it no key binding at all. (And no, you do not need to fiddle with Lisp to do that - not even `define-key'. `M-x customize-option' is your friend - just get yourself a separate `custom-file', for sanity.) 1e. The same holds for `C-`', which Icicles binds by default to `icicle-search'. And it holds for any other top-level keys. If you think that Icicles is clobbering any key bindings that you prefer from another package (such as Org), it is simple to change keys (in Icicles anyway; dunno about Org). Icicles does not clobber any keys without your permission - just customize `icicle-top-level-keybindings'. 1f. There are similar Icicles user options for key bindings in minibuffer keymaps. Minibuffer keymaps are major-mode maps. But any bindings Icicles makes in those maps are in effect only while you are in Icicle (minor) mode. 2. If you have a recent Emacs version, it is simple to download and install Icicles from MELPA. Likewise, to update it. There are also other easy ways to download it, listed here: http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Libraries#toc5. Icicles is 10 files of Lisp code and 3 files of non-code (doc and change history). If you download the files without using the package system, then just put the files in your `load-path' to install Icicles. All of this is clearly documented, both on Emacs Wiki and in the doc files that are part of your Icicles download. If you do not want to read the doc in general, then you can read just this about Icicles key bindings: http://www.emacswiki.org/emacs/Icicles_-_Key_Bindings HTH. Sorry for your trouble.
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Drew Adams drew.ad...@oracle.com writes: * Sequences consisting of `C-c' followed by any other punctuation character are allocated for minor modes. Using them in a major mode is not absolutely prohibited, but if you do that, the major mode binding may be shadowed from time to time by minor modes. IOW, no major mode should bind any of the latter group of keys, including `C-'' and `C-`', and any minor mode may do so - whether that mode is official or not. We are talking about C-c ' but I think that's a typo in the paragraph above, since the manual you quote is about C-c '. 1b. There is no global default binding for `C-'' in `emacs -Q'. And there should not be, since it is reserved for minor modes. I don't know whether Org binds `C-'' for a minor mode or for a major mode, but if it is the latter then it is in violation of the convention. As the manual says, this is not prohibited, just discouraged. You're of course allowed to shadow C-c ' in your code. -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Memnon Anon memnon+use...@freeshell.org writes: Okay. As I said, I found this the only one conflicting with org (or other packages). Just remember to require icicles at the very end of your config, and everything should work. I found that C-` (which I use to jump to errors when compiling in latex) also conflicts. Best, Alan
Re: [O] org-mode + icicles, avoid key binding redefinitions?
Hi John, John Kitchin jkitc...@andrew.cmu.edu writes: I am trying it out, and icicles seems to have clobbered a few key bindings like C-c ' to open source blocks. It doesn't seem to matter which order I load these packages. Does anyone do this without clobbering org bindings? Thanks, I suggest to ask Drew directly, the author of icicle. Since C-c ' is officially an Emacs keybinding, he may consider using another keybinding for icicle (or not.) -- Bastien
Re: [O] org-mode + icicles, avoid key binding redefinitions?
John Kitchin jkitc...@andrew.cmu.edu writes: I am trying it out, and icicles seems to have clobbered a few key bindings like C-c ' to open source blocks. I used to have the same problem with C-c ' at one point in time, but not anymore. This was the only binding which got in the way. Using customize-option on icicle-top-level-key-bindings, I see that C-c ' is no longer bound to icicle-occur, not sure if Drew changed that binding at one point, or I disabled it. Be sure to require icicles as late as possible; do you see this problem when you load icicles not from your init.el but by hand with - M-x load library RET icicles RET - M-x icy-mode RET ? Current Version of icicles from emacswiki, or some prepackaged (debian) version? Mem -- /---\ | SDF and SDF-EU Public Access UNIX System | | http://sdf.org || http://sdf-eu.org | =
Re: [O] org-mode + icicles, avoid key binding redefinitions?
I got icicles via ELPA. The version from describe-package is Version: 20140118.1856. although in icicles.el it says ;; Version: 2013.07.23. Thanks for the tip about the binding variable. I am content with this in my init file: (require 'icicles) ;; reclaim C-c ' for org-mode (setq icicle-top-level-key-bindings (remove '(' icicle-occur t) icicle-top-level-key-bindings)) (icy-mode 1) which seems to get me back the org-binding. (Note, in the pair of double quotes there is a ^C control character that did not appear in the email window I am using). Is there a convenient way to update icicles from emacs? John --- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Sun, Jan 19, 2014 at 12:31 PM, Memnon Anon memnon+use...@freeshell.orgwrote: John Kitchin jkitc...@andrew.cmu.edu writes: I am trying it out, and icicles seems to have clobbered a few key bindings like C-c ' to open source blocks. I used to have the same problem with C-c ' at one point in time, but not anymore. This was the only binding which got in the way. Using customize-option on icicle-top-level-key-bindings, I see that C-c ' is no longer bound to icicle-occur, not sure if Drew changed that binding at one point, or I disabled it. Be sure to require icicles as late as possible; do you see this problem when you load icicles not from your init.el but by hand with - M-x load library RET icicles RET - M-x icy-mode RET ? Current Version of icicles from emacswiki, or some prepackaged (debian) version? Mem -- /---\ | SDF and SDF-EU Public Access UNIX System | | http://sdf.org || http://sdf-eu.org | =
Re: [O] org-mode + icicles, avoid key binding redefinitions?
John Kitchin jkitc...@andrew.cmu.edu writes: I got icicles via ELPA. The version from describe-package is Version: 20140118.1856. although in icicles.el it says ;; Version: 2013.07.23. That is the current version. Icicles isn't only icicle.el, Drew has actually a whole bunch of elisp addon packages. Some I use, some I don't. Thanks for the tip about the binding variable. I am content with this in my init file: (require 'icicles) ;; reclaim C-c ' for org-mode (setq icicle-top-level-key-bindings (remove '(^C' icicle-occur t) icicle-top-level-key-bindings)) (icy-mode 1) which seems to get me back the org-binding. Okay. As I said, I found this the only one conflicting with org (or other packages). Just remember to require icicles at the very end of your config, and everything should work. Is there a convenient way to update icicles from emacs? I use icicles-install.el, which simply downloads files from emacswiki and optionally byte compiles them. AFAIK, that is still the main repo, I wasn't aware of the elpa package, good to know. If you are interested, I changed some keybindings, see: http://memnon.sdf-eu.org/emacs.org in Section Icicles. Essential for me are these changes to the icicle completion keymap: ;; C-o is next to C-i. S-Tab doesn't work on tty. (define-key map \C-o 'icicle-apropos-complete) ; S-Tab ;; Narrowing is isearch in a sense. C-s in minibuffer is rarely ;; used. M-* is a horror to type for something I use so often. (define-key map \C-s 'icicle-narrow-candidates) ; M-* ;; History search is isearch-backward chronologically:-) (define-key map \C-r 'icicle-history) ; M-h ; again, tty friendly version. (define-key map \C-t 'icicle-help-on-candidate) ; C-M-RET With that 4 bindings adjusted, icicles is really fun to use. Takes some time getting used to, but I think it is worth it. Memnon -- /---\ | SDF and SDF-EU Public Access UNIX System | | http://sdf.org || http://sdf-eu.org | =
Re: [O] org-mode + icicles, avoid key binding redefinitions?
John Kitchin jkitc...@andrew.cmu.edu writes: Is anyone using org-mode and icicles? How interesting. I also started trying icicle out today. I am trying it out, and icicles seems to have clobbered a few key bindings like C-c ' to open source blocks. I'm having the same problem. I think one way to do it is to unbind the key in the icicle-mode-map: --8---cut here---start-8--- (eval-after-load icicle-mode '(define-key icicle-mode-map (kbd C-c ') nil)) --8---cut here---end---8--- The function will still be bound to 'M-s M-s o' so I guess this is fine. I'm having other problem with icicle (I cannot get it to play nice with bbdb). I couldn't find a mailing list to ask questions about it. If someone has a suggestion, I'll gladly hear it. Best, Alan