diff --git a/lisp/my/my.el b/lisp/my/my.el index 3435293c..343a92a7 100644 --- a/lisp/my/my.el +++ b/lisp/my/my.el @@ -282,6 +282,22 @@ Examples: (my-interpolate (nth 2 (car rgbsteps)) (nth 2 (cadr rgbsteps)) position (caar rgbsteps) (caadr rgbsteps)) (my-interpolate (nth 3 (car rgbsteps)) (nth 3 (cadr rgbsteps)) position (caar rgbsteps) (caadr rgbsteps)))))) +(defun my-filename () + "Copy the full path of the current buffer into the `kill-ring' and +print it in the message buffer." + (interactive) + (let ((fn (buffer-file-name (window-buffer (minibuffer-selected-window))))) + (kill-new fn) + (message fn))) + +(defun my-filename-basename () + "Copy the basename of the current buffer into the `kill-ring' and +print it in the message buffer." + (interactive) + (let ((fn (file-name-nondirectory (my-filename)))) + (kill-new fn) + (message fn))) + (defun my-gui-elements-toggle () "Function to toggle gui elements on/off." (interactive)