masukomi,
@masukomi@connectified.com avatar

#DoomEmacs geeks. I need help. How do i configure it such that :edit always assumes the current working directory is the repo root not the directory of the file in the current buffer? I really miss that behavior from #Vim.

posted this to reddit with more details too:

https://www.reddit.com/r/DoomEmacs/comments/16iirrp/how_do_i_make_edit_use_the_repo_root_as_the/

#Emacs

howard,
@howard@emacs.ch avatar

@masukomi I usually call project- oriented variations of common functions, like find- file, etc. in #emacs. These are on my leader, under SPC p

This works for me, because I sometimes want a file next to another, instead of starting from the top of the repo. But if you know a little Lisp, You could write a function, that sets the default-directory variable, and then advise some functions to call yours before it runs.

Let me know if that is enough information to get you started, otherwise when I get to my computer, I can give you a prototype to work with.

masukomi,
@masukomi@connectified.com avatar

@howard I think i do the same. I usually use project-file-find (Space p f for me) BUT hidden directories are ignored so .github/workflow/ci.yml (for example) won't show up so i need to use :edit (or whatever emac's default equivalent is)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • vim
  • DreamBathrooms
  • ngwrru68w68
  • cubers
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • tacticalgear
  • JUstTest
  • osvaldo12
  • normalnudes
  • tester
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • anitta
  • Leos
  • provamag3
  • modclub
  • megavids
  • lostlight
  • All magazines