From 0d06e94309fc2f296741a06394413209b45433cd Mon Sep 17 00:00:00 2001 From: Tino Calancha Date: Sun, 3 Jul 2016 14:11:49 +0900 Subject: [PATCH] ibuffer-copy-filename-as-kill verbosity increase * lisp/ibuf-ext.el (ibuffer-copy-filename-as-kill): Use shorter name, result, for a local bound var. Show the string result in the echo area. --- lisp/ibuf-ext.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 0baab6b2f25..d4fd09f2cce 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1406,7 +1406,7 @@ You can then feed the file name(s) to other commands with \\[yank]." (interactive "p") (if (zerop (ibuffer-count-marked-lines)) (message "No buffers marked; use 'm' to mark a buffer") - (let ((ibuffer-copy-filename-as-kill-result "") + (let ((result "") (type (cond ((or (null arg) (zerop arg)) 'full) ((= arg 4) @@ -1415,8 +1415,8 @@ You can then feed the file name(s) to other commands with \\[yank]." 'name)))) (ibuffer-map-marked-lines #'(lambda (buf _mark) - (setq ibuffer-copy-filename-as-kill-result - (concat ibuffer-copy-filename-as-kill-result + (setq result + (concat result (let ((name (buffer-file-name buf))) (cond (name (concat @@ -1430,10 +1430,11 @@ You can then feed the file name(s) to other commands with \\[yank]." (_ (file-name-nondirectory name))) " ")) (t ""))))))) - (when (not (zerop (length ibuffer-copy-filename-as-kill-result))) - (setq ibuffer-copy-filename-as-kill-result - (substring ibuffer-copy-filename-as-kill-result 0 -1))) - (kill-new ibuffer-copy-filename-as-kill-result)))) + (when (not (zerop (length result))) + (setq result + (substring result 0 -1))) + (kill-new result) + (message "%s" result)))) (defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark group) (let ((count -- 2.39.5