From b350812edb9f8251bb22218413920f966341c74f Mon Sep 17 00:00:00 2001 From: Willem van den Ende Date: Sun, 4 May 2025 18:18:45 +0100 Subject: [PATCH] Move copy path (to wrong file) --- config.el | 13 ++++--------- qwan/qwan-blog.el | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 qwan/qwan-blog.el diff --git a/config.el b/config.el index aec2283..0577962 100644 --- a/config.el +++ b/config.el @@ -357,15 +357,6 @@ only the description" (kill-new markdown-link) (message "Copied %s" markdown-link))) -(defun qwan/copy-filename () - "Push the file name of the currently visited buffer to the kill ring." - (interactive) - (unless buffer-file-name - (error "The current buffer doesn't visit a file")) - - (kill-new buffer-file-name) - (message "Copied %s" buffer-file-name)) - (defun qwan/relative-path-to-attachments (full-path) (substring full-path (string-search "/attachments" full-path 0))) (require 'ert) @@ -454,6 +445,10 @@ only the description" (add-load-path! "~/.doom.d/mostalive") (require 'my-org-roam) +(add-load-path! "~/.doom.d/qwan") +(require 'qwan-blog) + + ;; org-roam v1 port to v2, insert node without opening buffer (map! :leader diff --git a/qwan/qwan-blog.el b/qwan/qwan-blog.el new file mode 100644 index 0000000..5f94e06 --- /dev/null +++ b/qwan/qwan-blog.el @@ -0,0 +1,15 @@ +;;; qwan/qwan-blog.el -*- lexical-binding: t; -*- +;;; + +(provide 'qwan-blog) + + +(defun qwan/copy-filename () + "Push the file name of the currently visited buffer to the kill ring." + (interactive) + (unless buffer-file-name + (error "The current buffer doesn't visit a file")) + + (kill-new buffer-file-name) + (message "Copied %s" buffer-file-name)) +