unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
Cc: Emacs Bugs <bug-gnu-emacs@gnu.org>,
	Richard Stallman <rms@gnu.org>,
	d.love@dl.ac.uk
Subject: Re: [Reuben Thomas] browse-url.el Opera support
Date: Sun, 18 Jan 2004 23:27:13 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.58.0401182322140.4049@mnemosyne> (raw)
In-Reply-To: <ilud69hwyuz.fsf@latte.josefsson.org>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1788 bytes --]

> Let me add another more down-to-earth argument: if free software
> support non-free tools, like Opera in browse-url.el in this example,
> it becomes the free software people's work to make it work.  The emacs
> maintainers have to apply the patches, document it, change the code
> whenever the tool changes its API, etc.  This takes time, aka money.
> It is not clear why Emacs maintainers should donate time to people
> that don't give anything back.

But it's becoming clear to me that here too, it depends. After all, Emacs
supports Windows and Netscape. It's a bit ironic that if you're a non-free
system with a near-monopoly (as Windows is and Netscape was) you can get
support. Opera, as a non-free product, is much less offensive (in
particular, it tries to be standards-compliant, and Opera Software don't
go around foisting new "standards" on the world) but it's too small to be
worth supporting...

> Unless the corporation's is mainly interested in pursuing non-free
> software for its own sake, it may make economical sense for them to
> re-license their software,

Sadly, Opera seem to make most of their money from licensing their
browser.

> Regarding your modified browse-url.el:
>
> It is very difficult to evaluate your work when you send the entire
> file, instead of a patch (use 'diff -u').

Attached. The diff is against browse-url.el as shipped with Emacs 21.3.1;
if you'd like it against CVS or something else, please ask.

> In any case, I don't think
> anyone has requested removing support for already supported non-free
> tools, like Netscape.

I've removed the other changes...

> Also, changing the type of existing variables,
> like browse-url-generic-args,

...including this.

-- 
http://www.mupsych.org/~rrt/ | The only person worth beating is yourself

[-- Attachment #2: Type: TEXT/PLAIN, Size: 3591 bytes --]

--- /usr/share/emacs/21.3/lisp/net/browse-url.el	2003-10-27 14:35:16.000000000 +0100
+++ /home/rrt/elisp/browse-url.el	2004-01-18 23:18:36.000000000 +0100
@@ -215,7 +215,7 @@
 
 ;; To invoke different browsers for different URLs:
 ;;      (setq browse-url-browser-function '(("^mailto:" . browse-url-mail)
-;;      				    ("." . browse-url-netscape)))
+;;				    ("." . browse-url-netscape)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Code:
@@ -226,6 +226,7 @@
 (eval-when-compile (require 'thingatpt)
                    (require 'term)
 		   (require 'dired)
+                   (require 'cl)
 		   (require 'w3-auto nil t))
 
 (defgroup browse-url nil
@@ -788,7 +789,7 @@
 
 When called non-interactively, optional second argument NEW-WINDOW is
 used instead of `browse-url-new-window-flag'."
-  (interactive (browse-url-interactive-arg "URL: "))  
+  (interactive (browse-url-interactive-arg "URL: "))
   (apply 'start-process (concat "gnome-moz-remote " url)
 	 nil
 	 "gnome-moz-remote"
@@ -1079,10 +1080,44 @@
 (defun browse-url-generic (url &optional new-window)
   ;; new-window ignored
   "Ask the WWW browser defined by `browse-url-generic-program' to load URL.
-Default to the URL around or before point.  A fresh copy of the
-browser is started up in a new process with possible additional arguments
-`browse-url-generic-args'.  This is appropriate for browsers which
-don't offer a form of remote control."
+Default to the URL around or before point.  A fresh copy of the browser
+is started up in a new process with possible additional arguments
+`browse-url-generic-args', in which the URL is substituted for
+`__URL__' if it exists, or added as a final argument if not."
+  (interactive (browse-url-interactive-arg "URL: "))
+  (unless browse-url-generic-program
+    (error "No browser defined (`browse-url-generic-program')"))
+  (let (found-tok)
+    (let ((args
+           (mapcar
+            (lambda (s)
+              (if (string-match "__URL__" s)
+                  (progn
+                    (setq found-tok t)
+                    (replace-match url t t s))
+                s))
+            browse-url-generic-args)))
+      (unless found-tok
+        (setq args (append args (list url))))
+      (apply 'start-process (concat browse-url-generic-program " " url) nil
+             browse-url-generic-program
+             args))))
+
+; Values for browse-url-generic-args
+;
+; These could be put in a list indexed by browser name to allow common
+; browsers to be chosen from a list and the method of starting the URL
+; (same window, new window, new tab) to be an option.
+;
+; Browser            Same window                   New window                               New tab
+;
+; Opera              ""                            -remote openURL(__URL__,new-window)      -remote openURL(__URL__,new-page)
+; Konqueror          ??                            ""                                       ??
+; Mozilla            -remote openURL(__URL__)      -remote openURL(__URL__,new-window)      -remote openURL(__URL__,new-tab)
+; gnome-moz-remote   --raise __URL__               --raise --newwin __URL__                 --raise --remote=openURL(__URL__,new-tab)
+; lynx-xterm         n/a                            xterm -e lynx __URL__                    n/a
+
+  ;; new-window ignored
   (interactive (browse-url-interactive-arg "URL: "))
   (if (not browse-url-generic-program)
     (error "No browser defined (`browse-url-generic-program')"))

[-- Attachment #3: Type: text/plain, Size: 148 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gnu-emacs

  parent reply	other threads:[~2004-01-18 22:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.693.1074172442.928.bug-gnu-emacs@gnu.org>
2004-01-15 13:48 ` [Reuben Thomas] browse-url.el Opera support Simon Josefsson
2004-01-15 14:12   ` Reuben Thomas
2004-01-15 14:28     ` Simon Josefsson
2004-01-16 19:54     ` Richard Stallman
2004-01-17 15:15       ` Reuben Thomas
2004-01-18  6:32         ` Simon Josefsson
2004-01-18  7:15           ` Reuben Thomas
2004-01-18 22:27           ` Reuben Thomas [this message]
2004-01-19 20:12             ` Richard Stallman
2004-01-19 18:35           ` Reuben Thomas
2004-01-19 18:38           ` Reuben Thomas
2004-02-05 15:44           ` Dave Love
2004-02-05 16:09             ` Reuben Thomas
2004-01-18 19:14         ` Richard Stallman
     [not found]       ` <mailman.829.1074355733.928.bug-gnu-emacs@gnu.org>
2004-01-17 20:43         ` David Kastrup
     [not found]     ` <mailman.789.1074285000.928.bug-gnu-emacs@gnu.org>
2004-01-16 21:43       ` David Kastrup
2004-01-17 12:53         ` Richard Stallman
2004-01-17  0:16     ` Dave Love
2004-01-17 15:27       ` Reuben Thomas
     [not found]   ` <mailman.716.1074194876.928.bug-gnu-emacs@gnu.org>
2004-01-15 22:32     ` Kevin Rodgers
2004-01-15 12:12 Dave Love

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=Pine.LNX.4.58.0401182322140.4049@mnemosyne \
    --to=rrt@sc3d.org \
    --cc=bug-gnu-emacs@gnu.org \
    --cc=d.love@dl.ac.uk \
    --cc=rms@gnu.org \
    --cc=rrt@mupsych.org \
    /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).