help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Launch application with region as a parameter


From: Tak Kunihiro
Subject: Re: Launch application with region as a parameter
Date: Tue, 07 Oct 2014 08:35:26 +0900 (JST)

I suppose you want to have something like below.

(defun open-file-at-point ()
  "Open a file at point by Explorer."
  (interactive)
  (let ((file (thing-at-point 'filename)) w32file)
    (when (file-exists-p file)
        (setq w32file (subst-char-in-string ?/ ?\\ (expand-file-name file)))
        (w32-shell-execute "open" "explorer" w32file))))
(global-set-key (kbd "C-c o") 'open-thing-at-point)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]