emacs.d

My Emacs configuration
git clone https://git.jamzattack.xyz/emacs.d
Log | Files | Refs | LICENSE

commit b04dc819bd804508668847c4b3710693925101f6
parent 36ebf2a5d671494053237a8f72c314945d29fa60
Author: Jamie Beardslee <beardsleejamie@gmail.com>
Date:   Sat, 13 Jun 2020 03:45:07 +1200

Added prefix arg to `transmission-add-url-at-point'

Diffstat:
Mconfig.org | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/config.org b/config.org @@ -2157,10 +2157,13 @@ eww-mode. :defer t :commands transmission-mode :init - (defun transmission-add-url-at-point (url) - "Adds torrent if point is on a magnet link" - (interactive (list (shr-url-at-point nil))) - (transmission-add url)) + (defun transmission-add-url-at-point (url &optional directory) + "Adds torrent if point is on a magnet or torrent link. + With prefix arg, prompt for DIRECTORY in which to download." + (interactive (list (shr-url-at-point nil) + (when current-prefix-arg + (read-directory-name "Download in: " "~/Downloads/")))) + (transmission-add url directory)) (defun open-transmission-in-this-window () (interactive) (let ((buffer (get-buffer-create "*transmission*")))