diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 553d0801f..f81300180 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -1006,6 +1006,8 @@ Other: - ~SPC-,~ to =goto-last-change= - Excluded =fundamental-mode= from =spacemacs/check-large-file= (thanks to Alexander Miller) + - Fixed copied dir/path not shown in minibuffer when =select-enable-clipboard= + is =nil= (thanks to duianto) *** Layer changes and fixes **** Alda - Key bindings: diff --git a/layers/+spacemacs/spacemacs-defaults/funcs.el b/layers/+spacemacs/spacemacs-defaults/funcs.el index 3d01efae6..b2e4f64c9 100644 --- a/layers/+spacemacs/spacemacs-defaults/funcs.el +++ b/layers/+spacemacs/spacemacs-defaults/funcs.el @@ -583,21 +583,27 @@ variable as a fallback to display the directory, useful in buffers like the ones created by `magit' and `dired'." (interactive) (if-let (directory-path (spacemacs--directory-path)) - (message "%s" (kill-new directory-path)) + (progn + (kill-new directory-path) + (message "%s" directory-path)) (message "WARNING: Current buffer does not have a directory!"))) (defun spacemacs/copy-file-path () "Copy and show the file path of the current buffer." (interactive) (if-let (file-path (spacemacs--file-path)) - (message "%s" (kill-new file-path)) + (progn + (kill-new file-path) + (message "%s" file-path)) (message "WARNING: Current buffer is not attached to a file!"))) (defun spacemacs/copy-file-name () "Copy and show the file name of the current buffer." (interactive) (if-let (file-name (file-name-nondirectory (spacemacs--file-path))) - (message "%s" (kill-new file-name)) + (progn + (kill-new file-name) + (message "%s" file-name)) (message "WARNING: Current buffer is not attached to a file!"))) (defun spacemacs/copy-file-name-base () @@ -605,14 +611,18 @@ ones created by `magit' and `dired'." buffer." (interactive) (if-let (file-name (file-name-base (spacemacs--file-path))) - (message "%s" (kill-new file-name)) + (progn + (kill-new file-name) + (message "%s" file-name)) (message "WARNING: Current buffer is not attached to a file!"))) (defun spacemacs/copy-file-path-with-line () "Copy and show the file path of the current buffer, including line number." (interactive) (if-let (file-path (spacemacs--file-path-with-line)) - (message "%s" (kill-new file-path)) + (progn + (kill-new file-path) + (message "%s" file-path)) (message "WARNING: Current buffer is not attached to a file!"))) (defun spacemacs/copy-file-path-with-line-column () @@ -622,7 +632,9 @@ This function respects the value of the `column-number-indicator-zero-based' variable." (interactive) (if-let (file-path (spacemacs--file-path-with-line-column)) - (message "%s" (kill-new file-path)) + (progn + (kill-new file-path) + (message "%s" file-path)) (message "WARNING: Current buffer is not attached to a file!"))) diff --git a/layers/+spacemacs/spacemacs-project/funcs.el b/layers/+spacemacs/spacemacs-project/funcs.el index e36074142..a1a1cfeb3 100644 --- a/layers/+spacemacs/spacemacs-project/funcs.el +++ b/layers/+spacemacs/spacemacs-project/funcs.el @@ -74,21 +74,27 @@ variable as a fallback to display the directory, useful in buffers like the ones created by `magit' and `dired'." (interactive) (if-let (directory-path (spacemacs--projectile-directory-path)) - (message "%s" (kill-new directory-path)) + (progn + (kill-new directory-path) + (message "%s" directory-path)) (message "WARNING: Current buffer does not have a directory!"))) (defun spacemacs/projectile-copy-file-path () "Copy and show the file path relative to project root." (interactive) (if-let (file-path (spacemacs--projectile-file-path)) - (message "%s" (kill-new file-path)) + (progn + (kill-new file-path) + (message "%s" file-path)) (message "WARNING: Current buffer is not visiting a file!"))) (defun spacemacs/projectile-copy-file-path-with-line () "Copy and show the file path relative to project root, including line number." (interactive) (if-let (file-path (spacemacs--projectile-file-path-with-line)) - (message "%s" (kill-new file-path)) + (progn + (kill-new file-path) + (message "%s" file-path)) (message "WARNING: Current buffer is not visiting a file!"))) (defun spacemacs/projectile-copy-file-path-with-line-column () @@ -98,5 +104,7 @@ This function respects the value of the `column-number-indicator-zero-based' variable." (interactive) (if-let (file-path (spacemacs--projectile-file-path-with-line-column)) - (message "%s" (kill-new file-path)) + (progn + (kill-new file-path) + (message "%s" file-path)) (message "WARNING: Current buffer is not visiting a file!")))