unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Jason Rumney <jasonr@f2s.com>
Cc: 4951@emacsbugs.donarmstrong.com
Subject: bug#4951: 23.1.50; browse-url-default-windows-browser bug + patch
Date: Mon, 23 Nov 2009 02:34:29 +0100	[thread overview]
Message-ID: <e01d8a50911221734u709a7adfo87e8a4d48e13de60@mail.gmail.com> (raw)
In-Reply-To: <e01d8a50911182037n1bcd4fe2id740cd0ffdb4afd@mail.gmail.com>

I have tried to find the cause of the problem. Some people on
help-emacs-windows@gnu.org mailing list helped me, but I could not
find anything specific.

However I wrote this function and will include it in my patched
version of Emacs+EmacsW32 for those who needs it. (I am not the only
one having this trouble.)


;; (customize-option-other-window 'browse-url-browser-function)
(defun browse-url-no-open-windows-browser (url &optional new-window)
  "Same as `browse-url-default-windows-browser' nearly.
You may want to customize `browse-url-browser-function' to this
function if files do not open in your web browser. It is known
that some pc:s have this problem, reason is so far unknown.

The cure seem to be to call `w32-shell-execute' with a nil
argument here instead of \"open\" which the default function
function `browse-url-default-windows-browser' does.

This should be safe unless your computer is strangely configured,
since you are normaly opening .html files with this function."
  (interactive (browse-url-interactive-arg "URL: "))
  (if (eq system-type 'ms-dos)
      (if dos-windows-version
	  (shell-command (concat "start " (shell-quote-argument url)))
	(error "Browsing URLs is not supported on this system"))
    (w32-shell-execute nil url)))





  reply	other threads:[~2009-11-23  1:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18  1:46 bug#4951: 23.1.50; browse-url-default-windows-browser bug + patch Lennart Borgman
2009-11-18  3:35 ` Stefan Monnier
2009-11-18  3:41   ` Lennart Borgman
2009-11-18  5:54     ` Jason Rumney
2009-11-18 13:00       ` Lennart Borgman
2009-11-19  4:37         ` Lennart Borgman
2009-11-23  1:34           ` Lennart Borgman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-01-02 20:31 Chong Yidong
2011-09-11  5:18 ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e01d8a50911221734u709a7adfo87e8a4d48e13de60@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=4951@emacsbugs.donarmstrong.com \
    --cc=jasonr@f2s.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).