project-explorer icon indicating copy to clipboard operation
project-explorer copied to clipboard

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

Open maa-x opened this issue 10 years ago • 3 comments

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.

maa-x avatar Jun 16 '15 16:06 maa-x

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))))))

sabof avatar Jun 16 '15 20:06 sabof

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 ?

maa-x avatar Jun 17 '15 09:06 maa-x

You can put it inside your .emacs.

sabof avatar Jun 17 '15 11:06 sabof