Function: www-url-find-file-noselect

www-url-find-file-noselect is an autoloaded and byte-compiled function defined in hsys-www.el.

Signature

(www-url-find-file-noselect PATH &rest ARGS)

Documentation

Find PATH without selecting its buffer.

Handle http urls. ARGS is the optional arguments to find-file-noselect. If PATH is a list ARGS is set to remainder after that the first element is extracted as the PATH.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hsys-www.el
;;;###autoload
(defun www-url-find-file-noselect (path &rest args)
  "Find PATH without selecting its buffer.
Handle http urls.  ARGS is the optional arguments to
`find-file-noselect'.  If PATH is a list ARGS is set to remainder
after that the first element is extracted as the PATH."
  (if (listp path)
      (setq args (cdr path)
	    path (car path)))
  (let* ((remote-sym (hpath:remote-available-p))
	 (inhibit-file-name-handlers
	  (if remote-sym
	      (append (list 'dired-handler-fn
		       (intern-soft (concat (symbol-name remote-sym)
					    "-file-handler-function")))
		      (and (eq inhibit-file-name-operation 'find-file-noselect)
			   inhibit-file-name-handlers))
	    inhibit-file-name-handlers))
	 (inhibit-file-name-operation 'find-file-noselect))
    (if (string-match "\\`www\\.\\|\\`https?:" path)
	(progn (require 'hyperbole)
	       ;; Display url.
	       (hact 'www-url path)
	       ;; return same buffer
	       (current-buffer))
      (apply #'find-file-noselect path args))))