iankelling.org
/
git
/
dot-emacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f8bf76f
)
write function ive wanted for a long time
author
Ian Kelling
<ian@iankelling.org>
Thu, 13 Apr 2017 09:57:58 +0000
(
02:57
-0700)
committer
Ian Kelling
<ian@iankelling.org>
Thu, 13 Apr 2017 09:57:58 +0000
(
02:57
-0700)
my-init.org
patch
|
blob
|
history
diff --git
a/my-init.org
b/my-init.org
index fa7c72f8eb9537681736a3cde2af659e60e44f6e..107249901db55d0d9498c08fcc7cd541fb943bd7 100644
(file)
--- a/
my-init.org
+++ b/
my-init.org
@@
-5293,8
+5293,9
@@
join lines
#+end_src
*** M-/
*** C-M-/]
#+end_src
*** M-/
*** C-M-/]
-copy-
variabl
e
+copy-
buffer-file-nam
e
#+begin_src emacs-lisp
#+begin_src emacs-lisp
+;; haven't bound this atm, todo, maybe someday?
(defun copy-variable (variable)
(interactive
(let ((v (variable-at-point))
(defun copy-variable (variable)
(interactive
(let ((v (variable-at-point))
@@
-5313,7
+5314,17
@@
copy-variable
(list (if (equal val "")
v (intern val)))))
(kill-new (symbol-value variable)))
(list (if (equal val "")
v (intern val)))))
(kill-new (symbol-value variable)))
-(global-set-key (kbd "C-M-/") 'copy-variable)
+
+(defun copy-buffer-file-name ()
+ (interactive)
+ (kill-new
+ (cond
+ ((derived-mode-p 'mu4e-view-mode) (mu4e-message-field-at-point :path))
+ (t buffer-file-name))
+ ))
+
+(global-set-key (kbd "C-M-/") 'copy-buffer-file-name)
+
#+end_src
*** C-S-/
#+end_src
*** C-S-/