branch: elpa/aidermacs commit a252760d74a06c4287244ac9d5f4fb19ef2e33fb Author: Mingde (Matthew) Zeng <matthew...@posteo.net> Commit: Mingde (Matthew) Zeng <matthew...@posteo.net>
Fix aidermacs-get-buffer-name nested project ordering Signed-off-by: Mingde (Matthew) Zeng <matthew...@posteo.net> --- aidermacs.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aidermacs.el b/aidermacs.el index 851625280e..1451b55615 100644 --- a/aidermacs.el +++ b/aidermacs.el @@ -252,7 +252,11 @@ If supplied, SUFFIX is appended to the buffer name within the earmuffs." ;; Use current directory for new subtree session (aidermacs-subtree-only default-directory) ;; Use closest parent if it exists - (closest-parent closest-parent) + (closest-parent + (if (<= (length (expand-file-name closest-parent)) + (length (expand-file-name root))) + root + closest-parent)) ;; Fall back to project root for new non-subtree session (t root)))) (format "*aidermacs:%s%s*"