[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/backports-25.2 fbe5f7b 11/46: Completely ignore bu
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] scratch/backports-25.2 fbe5f7b 11/46: Completely ignore buffers with no name when copying file names |
Date: |
Sun, 2 Oct 2016 14:04:48 +0000 (UTC) |
branch: scratch/backports-25.2
commit fbe5f7bb909411eb25f6c80a6f1880f5e6ffac40
Author: Tino Calancha <address@hidden>
Commit: Noam Postavsky <address@hidden>
Completely ignore buffers with no name when copying file names
* lisp/ibuf-ext.el (ibuffer-copy-filename-as-kill): Completely
ignore buffers with no file name. (bug#21577).
(cherry picked from commit b8dfc7beeb49d3fe673966f630126a38397e8d78)
---
lisp/ibuf-ext.el | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index f537561..8c94cf7 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1412,20 +1412,23 @@ You can then feed the file name(s) to other commands
with \\[yank]."
(ibuffer-map-marked-lines
#'(lambda (buf _mark)
(setq ibuffer-copy-filename-as-kill-result
- (concat ibuffer-copy-filename-as-kill-result
- (let ((name (buffer-file-name buf)))
- (if name
- (pcase type
- (`full
- name)
- (`relative
- (file-relative-name
- name (or ibuffer-default-directory
- default-directory)))
- (_
- (file-name-nondirectory name)))
- ""))
- " "))))
+ (concat ibuffer-copy-filename-as-kill-result
+ (let ((name (buffer-file-name buf)))
+ (cond (name
+ (concat
+ (pcase type
+ (`full
+ name)
+ (`relative
+ (file-relative-name
+ name (or ibuffer-default-directory
+ default-directory)))
+ (_
+ (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))))
(defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark
group)
- [Emacs-diffs] branch scratch/backports-25.2 created (now eb5dd2c), Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 25895c4 02/46: Doc fix for url-http, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 2284444 08/46: Require that the buffer that we're trying to patch exist, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 7d89389 04/46: Make erc connect asynchronously, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 0d9709e 19/46: Meta + shift + Fn combos are recognized by xterm>=216., Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 5266c11 13/46: Allow more shell script defun forms, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 fbe5f7b 11/46: Completely ignore buffers with no name when copying file names,
Noam Postavsky <=
- [Emacs-diffs] scratch/backports-25.2 70244eb 15/46: Allow highlighting things like @math{2^{12}}, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 95d5520 12/46: Allow optional parameter to be nil, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 0780aa5 16/46: Replace XXX acronyms with draft standard ones, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 5f4c54b 18/46: Declare $ as an expression prefix in SCSS, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 344bc2b 17/46: Strip out some leading whitespace when looking at logs, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 69e0e89 23/46: Handle auth-source items with special characters on OS X, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 1cd6309 14/46: Allow ff-find-other-file (etc) to work with indirect clone buffers, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 5c084d9 10/46: Remove spurious newline in package list, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 80cf0b6 21/46: Restore the fix to bug#18527 from commit d6868025, Noam Postavsky, 2016/10/02
- [Emacs-diffs] scratch/backports-25.2 51656da 28/46: Fix number-at-point in lisp buffers, Noam Postavsky, 2016/10/02