Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Close pe's window when opening file #41

Open
maa-x opened this issue Jun 16, 2015 · 3 comments
Open

[Feature request] Close pe's window when opening file #41

maa-x opened this issue Jun 16, 2015 · 3 comments

Comments

@maa-x
Copy link

maa-x commented Jun 16, 2015

I saw there was a toggle option, but it doesn't quite fit into my workflow as much as I'd like it to.

I was hoping it would be possible that whenever I press enter on a file within project-explorer's window it would collapse.

@sabof
Copy link
Owner

sabof commented Jun 16, 2015

See if this helps.

(defadvice pe/return (after close-window activate)
  (let (( window (pe/get-project-explorer-window)))
    (when window
      (with-selected-window window
        (with-current-buffer (window-buffer window)
          (pe/quit))))))

@maa-x
Copy link
Author

maa-x commented Jun 17, 2015

I tried adding it at the top of the project-explorer.el file, but I can't seem to get it to work.

EDIT: however puting it at the bottom juste before the project-explorer toggle function worked.
Won't this get deleted each time I update though ?

@sabof
Copy link
Owner

sabof commented Jun 17, 2015

You can put it inside your .emacs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants