# Having edit(m::Module) open package directory instead of file where module is defined

**URL:** https://discourse.julialang.org/t/having-edit-m-module-open-package-directory-instead-of-file-where-module-is-defined/58124
**Category:** Package Management
**Tags:** pkg
**Created:** [March 28, 2021, 5:19pm UTC](https://discourse.julialang.org/t/having-edit-m-module-open-package-directory-instead-of-file-where-module-is-defined/58124 "2021-03-28T17:19:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![airpmb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/airpmb/32/7826_2.png) [@airpmb](https://discourse.julialang.org/u/airpmb)
#### Post date: [March 28, 2021, 5:19pm UTC](https://discourse.julialang.org/t/having-edit-m-module-open-package-directory-instead-of-file-where-module-is-defined/58124/1 "2021-03-28T17:19:37Z")

</div>

This line seems to do the trick:

```julia
edit(m::Module) = edit(abspath(joinpath(pathof(m), "..", "..")))

# opens /Users/patrick/.julia/packages/AbstractPlotting/gE7AT/:
edit(AbstractPlotting) 

```

… but I have a suspicion that what I want is already implemented somewhere and/or there’s a better way to do this. Thoughts?

---

<div class="post-metadata">

### Author: ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)
#### Post date: [March 28, 2021, 10:48pm UTC](https://discourse.julialang.org/t/having-edit-m-module-open-package-directory-instead-of-file-where-module-is-defined/58124/2 "2021-03-28T22:48:07Z")

</div>

You might be able to just fix [Make @edit work with packages · Issue #32333 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/32333) with your as a PR 🙂
