Function: embark--associated-directory
embark--associated-directory is a natively compiled function defined
in embark.el.
Signature
(embark--associated-directory TARGET TYPE)
Documentation
Return directory associated to TARGET of given TYPE.
The supported values of TYPE are file, buffer, bookmark and library, which have an obvious notion of associated directory.
Source Code
;; Defined in /nix/store/lls066p88vbzffl5j0d16jbhwpn2zfz2-emacs-packages-deps/share/emacs/site-lisp/elpa/embark-20260610.302/embark.el
(defun embark--associated-directory (target type)
"Return directory associated to TARGET of given TYPE.
The supported values of TYPE are file, buffer, bookmark and
library, which have an obvious notion of associated directory."
(when-let* ((file (embark--associated-file target type)))
(if (file-directory-p file)
(file-name-as-directory file)
(file-name-directory file))))