はじめに# Emacs で現在のパスを取得する方法を調べてみました. 以下の記事を参考にしました. Emacs Lisp: Copy File Path of Current Buffer Emacs - 開いているファイル/ フォルダのパスをクリップボードに保存する - Qiita 現在のファイルのパスを取得してクリップボードに保存# 現在開いているファイルのパスを保存. dired を開いているときはディレクトリパスを保存. (defun my/get-curernt-path () (if (equal major-mode 'dired-mode) default-directory (buffer-file-name))) (defun my/copy-current-path () (interactive) (let ((fPath (my/get-curernt-path)
![Emacs で現在のファイルのパスを取得してクリップボードに保存 (org-link も)](https://cdn-ak-scissors.b.st-hatena.com/image/square/3c0910ee3a5035bb91a302e843c000ed3c44e353/height=288;version=1;width=512/https%3A%2F%2Ffuturismo.biz%2Ffuturismo.jpg)