Function: embark--associated-directory

embark--associated-directory is a byte-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 ~/.emacs.d/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))))