Changing the prefix of many chords












2















It just occurred to me that the org-babel prefix C-c C-v must be what
it is because of the proximity of c and v in qwerty, and that it
would be better for me to use C-c C-f. Is there a simple way to
change the prefix for all chords using it?










share|improve this question



























    2















    It just occurred to me that the org-babel prefix C-c C-v must be what
    it is because of the proximity of c and v in qwerty, and that it
    would be better for me to use C-c C-f. Is there a simple way to
    change the prefix for all chords using it?










    share|improve this question

























      2












      2








      2








      It just occurred to me that the org-babel prefix C-c C-v must be what
      it is because of the proximity of c and v in qwerty, and that it
      would be better for me to use C-c C-f. Is there a simple way to
      change the prefix for all chords using it?










      share|improve this question














      It just occurred to me that the org-babel prefix C-c C-v must be what
      it is because of the proximity of c and v in qwerty, and that it
      would be better for me to use C-c C-f. Is there a simple way to
      change the prefix for all chords using it?







      key-bindings






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 3 hours ago









      ToothrotToothrot

      852412




      852412






















          1 Answer
          1






          active

          oldest

          votes


















          3














          If you really want to override the binding C-c C-f for org-forward-heading-same-level you can do that as follows.



          (defvar org-C-c-C-v (lookup-key org-mode-map (kbd "C-c C-v"))
          "Binding of C-c C-v in Orgmode.")
          (defvar org-C-c-C-f (lookup-key org-mode-map (kbd "C-c C-f"))
          "Binding of C-c C-f in Orgmode.")

          (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-v)
          (define-key org-mode-map (kbd "C-c C-v") nil)


          One could also avoid the variables org-C-c-C-v and org-C-c-C-f by substituting their values into the first define-key and by ignoring the value of the original binding for C-c C-f. The variables give you the possibility to easily switch back to the original state without reloading org.



          Note that the usage of defvar is kind of protection of the original binding value. When you have already the modified bindings through running the code once and reevaluate the code the values of org-C-c-C-v and org-C-c-C-f are not overwritten by the new bindings because of the special behavior of defvar (see its doc).



          You can switch back to the original bindings with:



          (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-f)
          (define-key org-mode-map (kbd "C-c C-v") org-C-c-C-v)





          share|improve this answer


























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "583"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f48956%2fchanging-the-prefix-of-many-chords%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            If you really want to override the binding C-c C-f for org-forward-heading-same-level you can do that as follows.



            (defvar org-C-c-C-v (lookup-key org-mode-map (kbd "C-c C-v"))
            "Binding of C-c C-v in Orgmode.")
            (defvar org-C-c-C-f (lookup-key org-mode-map (kbd "C-c C-f"))
            "Binding of C-c C-f in Orgmode.")

            (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-v)
            (define-key org-mode-map (kbd "C-c C-v") nil)


            One could also avoid the variables org-C-c-C-v and org-C-c-C-f by substituting their values into the first define-key and by ignoring the value of the original binding for C-c C-f. The variables give you the possibility to easily switch back to the original state without reloading org.



            Note that the usage of defvar is kind of protection of the original binding value. When you have already the modified bindings through running the code once and reevaluate the code the values of org-C-c-C-v and org-C-c-C-f are not overwritten by the new bindings because of the special behavior of defvar (see its doc).



            You can switch back to the original bindings with:



            (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-f)
            (define-key org-mode-map (kbd "C-c C-v") org-C-c-C-v)





            share|improve this answer






























              3














              If you really want to override the binding C-c C-f for org-forward-heading-same-level you can do that as follows.



              (defvar org-C-c-C-v (lookup-key org-mode-map (kbd "C-c C-v"))
              "Binding of C-c C-v in Orgmode.")
              (defvar org-C-c-C-f (lookup-key org-mode-map (kbd "C-c C-f"))
              "Binding of C-c C-f in Orgmode.")

              (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-v)
              (define-key org-mode-map (kbd "C-c C-v") nil)


              One could also avoid the variables org-C-c-C-v and org-C-c-C-f by substituting their values into the first define-key and by ignoring the value of the original binding for C-c C-f. The variables give you the possibility to easily switch back to the original state without reloading org.



              Note that the usage of defvar is kind of protection of the original binding value. When you have already the modified bindings through running the code once and reevaluate the code the values of org-C-c-C-v and org-C-c-C-f are not overwritten by the new bindings because of the special behavior of defvar (see its doc).



              You can switch back to the original bindings with:



              (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-f)
              (define-key org-mode-map (kbd "C-c C-v") org-C-c-C-v)





              share|improve this answer




























                3












                3








                3







                If you really want to override the binding C-c C-f for org-forward-heading-same-level you can do that as follows.



                (defvar org-C-c-C-v (lookup-key org-mode-map (kbd "C-c C-v"))
                "Binding of C-c C-v in Orgmode.")
                (defvar org-C-c-C-f (lookup-key org-mode-map (kbd "C-c C-f"))
                "Binding of C-c C-f in Orgmode.")

                (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-v)
                (define-key org-mode-map (kbd "C-c C-v") nil)


                One could also avoid the variables org-C-c-C-v and org-C-c-C-f by substituting their values into the first define-key and by ignoring the value of the original binding for C-c C-f. The variables give you the possibility to easily switch back to the original state without reloading org.



                Note that the usage of defvar is kind of protection of the original binding value. When you have already the modified bindings through running the code once and reevaluate the code the values of org-C-c-C-v and org-C-c-C-f are not overwritten by the new bindings because of the special behavior of defvar (see its doc).



                You can switch back to the original bindings with:



                (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-f)
                (define-key org-mode-map (kbd "C-c C-v") org-C-c-C-v)





                share|improve this answer















                If you really want to override the binding C-c C-f for org-forward-heading-same-level you can do that as follows.



                (defvar org-C-c-C-v (lookup-key org-mode-map (kbd "C-c C-v"))
                "Binding of C-c C-v in Orgmode.")
                (defvar org-C-c-C-f (lookup-key org-mode-map (kbd "C-c C-f"))
                "Binding of C-c C-f in Orgmode.")

                (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-v)
                (define-key org-mode-map (kbd "C-c C-v") nil)


                One could also avoid the variables org-C-c-C-v and org-C-c-C-f by substituting their values into the first define-key and by ignoring the value of the original binding for C-c C-f. The variables give you the possibility to easily switch back to the original state without reloading org.



                Note that the usage of defvar is kind of protection of the original binding value. When you have already the modified bindings through running the code once and reevaluate the code the values of org-C-c-C-v and org-C-c-C-f are not overwritten by the new bindings because of the special behavior of defvar (see its doc).



                You can switch back to the original bindings with:



                (define-key org-mode-map (kbd "C-c C-f") org-C-c-C-f)
                (define-key org-mode-map (kbd "C-c C-v") org-C-c-C-v)






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 hours ago

























                answered 2 hours ago









                TobiasTobias

                15.2k11035




                15.2k11035






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Emacs Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f48956%2fchanging-the-prefix-of-many-chords%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Сан-Квентин

                    Алькесар

                    Josef Freinademetz