How open dired mode from any buffer by ONE hotkey?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












windows 10, emacs 26.1



Suppose I open some file:



enter image description here



And now I want fast open dired mode.
The result must be like this:



enter image description here



I want to do this by ONE hotkey direct from buffer. E.g. C-x j.
Is it possible?










share|improve this question

























    up vote
    1
    down vote

    favorite












    windows 10, emacs 26.1



    Suppose I open some file:



    enter image description here



    And now I want fast open dired mode.
    The result must be like this:



    enter image description here



    I want to do this by ONE hotkey direct from buffer. E.g. C-x j.
    Is it possible?










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      windows 10, emacs 26.1



      Suppose I open some file:



      enter image description here



      And now I want fast open dired mode.
      The result must be like this:



      enter image description here



      I want to do this by ONE hotkey direct from buffer. E.g. C-x j.
      Is it possible?










      share|improve this question













      windows 10, emacs 26.1



      Suppose I open some file:



      enter image description here



      And now I want fast open dired mode.
      The result must be like this:



      enter image description here



      I want to do this by ONE hotkey direct from buffer. E.g. C-x j.
      Is it possible?







      dired






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      Alexei

      37919




      37919




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          You can use dired-jump from the builtin dired-x.el. I have it bound to C-x C-j, you can setup your own key binding.




          C-x C-j runs the command dired-jump (found in global-map), which is an
          interactive autoloaded compiled Lisp function in dired-x.el.



          It is bound to C-x C-j.



          (dired-jump &optional OTHER-WINDOW FILE-NAME)



          Jump to Dired buffer corresponding to current buffer. If in a file,
          Dired the current directory and move to file's line.
          If in Dired
          already, pop up a level and goto old directory's line. In case the
          proper Dired file line cannot be found, refresh the dired buffer and
          try again.
          When OTHER-WINDOW is non-nil, jump to Dired buffer in other
          window. When FILE-NAME is non-nil, jump to its line in Dired.
          Interactively with prefix argument, read FILE-NAME.







          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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f44878%2fhow-open-dired-mode-from-any-buffer-by-one-hotkey%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote













            You can use dired-jump from the builtin dired-x.el. I have it bound to C-x C-j, you can setup your own key binding.




            C-x C-j runs the command dired-jump (found in global-map), which is an
            interactive autoloaded compiled Lisp function in dired-x.el.



            It is bound to C-x C-j.



            (dired-jump &optional OTHER-WINDOW FILE-NAME)



            Jump to Dired buffer corresponding to current buffer. If in a file,
            Dired the current directory and move to file's line.
            If in Dired
            already, pop up a level and goto old directory's line. In case the
            proper Dired file line cannot be found, refresh the dired buffer and
            try again.
            When OTHER-WINDOW is non-nil, jump to Dired buffer in other
            window. When FILE-NAME is non-nil, jump to its line in Dired.
            Interactively with prefix argument, read FILE-NAME.







            share|improve this answer
























              up vote
              3
              down vote













              You can use dired-jump from the builtin dired-x.el. I have it bound to C-x C-j, you can setup your own key binding.




              C-x C-j runs the command dired-jump (found in global-map), which is an
              interactive autoloaded compiled Lisp function in dired-x.el.



              It is bound to C-x C-j.



              (dired-jump &optional OTHER-WINDOW FILE-NAME)



              Jump to Dired buffer corresponding to current buffer. If in a file,
              Dired the current directory and move to file's line.
              If in Dired
              already, pop up a level and goto old directory's line. In case the
              proper Dired file line cannot be found, refresh the dired buffer and
              try again.
              When OTHER-WINDOW is non-nil, jump to Dired buffer in other
              window. When FILE-NAME is non-nil, jump to its line in Dired.
              Interactively with prefix argument, read FILE-NAME.







              share|improve this answer






















                up vote
                3
                down vote










                up vote
                3
                down vote









                You can use dired-jump from the builtin dired-x.el. I have it bound to C-x C-j, you can setup your own key binding.




                C-x C-j runs the command dired-jump (found in global-map), which is an
                interactive autoloaded compiled Lisp function in dired-x.el.



                It is bound to C-x C-j.



                (dired-jump &optional OTHER-WINDOW FILE-NAME)



                Jump to Dired buffer corresponding to current buffer. If in a file,
                Dired the current directory and move to file's line.
                If in Dired
                already, pop up a level and goto old directory's line. In case the
                proper Dired file line cannot be found, refresh the dired buffer and
                try again.
                When OTHER-WINDOW is non-nil, jump to Dired buffer in other
                window. When FILE-NAME is non-nil, jump to its line in Dired.
                Interactively with prefix argument, read FILE-NAME.







                share|improve this answer












                You can use dired-jump from the builtin dired-x.el. I have it bound to C-x C-j, you can setup your own key binding.




                C-x C-j runs the command dired-jump (found in global-map), which is an
                interactive autoloaded compiled Lisp function in dired-x.el.



                It is bound to C-x C-j.



                (dired-jump &optional OTHER-WINDOW FILE-NAME)



                Jump to Dired buffer corresponding to current buffer. If in a file,
                Dired the current directory and move to file's line.
                If in Dired
                already, pop up a level and goto old directory's line. In case the
                proper Dired file line cannot be found, refresh the dired buffer and
                try again.
                When OTHER-WINDOW is non-nil, jump to Dired buffer in other
                window. When FILE-NAME is non-nil, jump to its line in Dired.
                Interactively with prefix argument, read FILE-NAME.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 1 hour ago









                xuchunyang

                7,4091823




                7,4091823



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2femacs.stackexchange.com%2fquestions%2f44878%2fhow-open-dired-mode-from-any-buffer-by-one-hotkey%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    Installing NextGIS Connect into QGIS 3?

                    One-line joke