1. Yaron Minsky
  2. js-elisp


Peter Szilagyi  committed 8511617

sweeks and dhouse suggested using the "makeroot" name in omake buffer names,
because it's generally shorter and more readable than the canonical path.

  • Participants
  • Parent commits 66d1a2c
  • Branches default

Comments (0)

Files changed (1)

File elisp/omake/omake-buffer.el

View file
  • Ignore whitespace
 (defun Omake.Buffer.name (kind &optional id)
   (assert (Omake.Buffer.kind-p kind) nil "kind: %s" kind)
   (if (Omake.Buffer.project-p kind) (assert (Omake.Id.is id)) (assert (null id)))
-  (let ((ids (when id (Omake.Id.to-string id))))
+  (let* ((ids (when id (Omake.Id.to-string id)))
+	 ;; Work to use the user-originated path in the buffer name,
+	 ;; often shorter than the canonical path via pleasingly named
+	 ;; symlinks and tilde-substitution.  These are still unique,
+	 ;; because they are absolute pathnames, but more readable.
+	 (proj (when id (Omake.Project.find id)))
+	 (root (when proj (Omake.Project.omakeroot-dir proj)))
+	 (ids (or root ids)))
     (case kind
       (raw (format "[omake raw for %s]" ids))
       (status (format "[omake status for %s]" ids))