How to interact with browse-url?

How to interact with browse-url?

Post by Berni » Wed, 28 May 2003 03:48:44



In the mybrowse-url function listed below, I need to set the
browser to kde, so I can't use M-x browse-url RET, since
the browser is changed in other functions I've defined.
So, I'm trying to write a lisp function which will set the
browser to kde, then place the URL at point into the
mini buffer, then call browse-url, after modifying if
desired.  The problem is that when you pass an
argument to browse-url, it doesn't allowing modifying
the URL in the mini buffer, but loads it directly in the
browser.  How can I basically achieve the same functionality
as browse-url, except set the browser to browse-url-kde
first?

-Thanks

;;This sets browser, since dictionary & thesaurus above set it to Lynx,
;;then loads the URL at point into the browser.
(defun mybrowse-url ()
  "Use KDE browser to view URL at point"
  (interactive)
  (defvar myURL "")
  (setq browse-url-browser-function 'browse-url-kde)
  (setq myURL (url-get-url-at-point))
  (browse-url myURL)
  ;(browse-url-interactive-arg myURL)
)