From David.Kettler at dsto.defence.gov.au Wed Oct 1 00:02:20 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 01 Oct 2008 16:32:20 +0930 Subject: [Conkeror] [RFC] Show more links on mouse over. In-Reply-To: References: Message-ID: The only reason I really care about this is that for certain sites I want to know where the link is pointing before I follow it. But I'd rather use the keyboard navigation. So maybe I need a "confirm" mode that shows me the link before following. Maybe as a prefix key. I can currently copy the link then paste it in to find-url, but that is less convenient. regards, David -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jjfoerch at earthlink.net Wed Oct 1 08:25:05 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Wed, 01 Oct 2008 11:25:05 -0400 Subject: [Conkeror] [PATCH] Show object class for prefix key. References: <873aji9c10.fsf@earthlink.net> <874p3wj2js.fsf@jeremyms.com> Message-ID: <87y7188him.fsf@earthlink.net> Jeremy Maitin-Shepard writes: > David Kettler writes: > >> --- >>> Perhaps there is a "best of both worlds" solution here: when the >>> interactive system displays the current key sequence, prefix keys could >>> be followed in parentheses by a name identifying them. So if you hit >>> * M, the minibuffer message would look like: >>> >>> * M (MathML) > >> Like this? It might need some refactoring; keyboard.js now depends on >> some internal details of the browser object system. > > The feature seems potentially reasonable in theory, but I don't think > this is a good way to do it. Potentially it could be done nicely as > part of a general system for associating help text with key prefix > bindings. This comes to mind--not sure whether it can factor directly into giving names to prefix keys: The meta-x command displays the current prefixes in its prompt. Can this display be done by the same part of conkeror that displays an ongoing key sequence? Would meta-x itself be a prefix command? -- John Foerch From jjfoerch at earthlink.net Wed Oct 1 08:33:23 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Wed, 01 Oct 2008 11:33:23 -0400 Subject: [Conkeror] conkeror not starting References: <87k5cybt5o.fsf@earthlink.net> <87fxnkc18r.fsf@earthlink.net> Message-ID: <87tzbw8h4s.fsf@earthlink.net> "Rohan Nicholls" writes: > Actually if I eval the offending line, I get a directory path back (a > valid one), so even that does not really make sense. > > Cc["@mozilla.org/file/directory_service;1"] > .getService(Ci.nsIProperties).get("ProfD", Ci.nsIFile).path > But for whatever reasons, during startup it was killing the app. Maybe there is some timing issue in Mozilla at that stage that causes this service to fail. The fact that the author of the sessions patch apparently didn't experience this problem leads me to wonder if it is a bug in certain versions of xulrunner. -- John Foerch From rohan.nicholls at googlemail.com Wed Oct 1 09:29:10 2008 From: rohan.nicholls at googlemail.com (Rohan Nicholls) Date: Wed, 1 Oct 2008 18:29:10 +0200 Subject: [Conkeror] conkeror not starting In-Reply-To: <87tzbw8h4s.fsf@earthlink.net> References: <87k5cybt5o.fsf@earthlink.net> <87fxnkc18r.fsf@earthlink.net> <87tzbw8h4s.fsf@earthlink.net> Message-ID: On Wed, Oct 1, 2008 at 5:33 PM, John J Foerch wrote: > "Rohan Nicholls" writes: >> Actually if I eval the offending line, I get a directory path back (a >> valid one), so even that does not really make sense. >> >> Cc["@mozilla.org/file/directory_service;1"] >> .getService(Ci.nsIProperties).get("ProfD", Ci.nsIFile).path >> But for whatever reasons, during startup it was killing the app. > > Maybe there is some timing issue in Mozilla at that stage that causes > this service to fail. The fact that the author of the sessions patch > apparently didn't experience this problem leads me to wonder if it is a > bug in certain versions of xulrunner. That was what I was thinking as well, as the version change is where things went awry. I am also a little suspicious of ubuntu/debian as I keep running into little problems that result from their habit of patching packages, which I don't find in my archlinux packages. But maybe 1.9.0.2 introduced a new bug. Rohan From nicktastic at gmail.com Thu Oct 2 11:27:26 2008 From: nicktastic at gmail.com (Nicholas A. Zigarovich) Date: Thu, 2 Oct 2008 14:27:26 -0400 Subject: [Conkeror] RFC: Proxy management API Message-ID: See http://bugs.conkeror.org/issue59 for details. Thanks, - Nick From nicktastic at gmail.com Thu Oct 2 11:35:38 2008 From: nicktastic at gmail.com (Nicholas A. Zigarovich) Date: Thu, 2 Oct 2008 14:35:38 -0400 Subject: [Conkeror] Proxy Settings In-Reply-To: References: Message-ID: Hi Alexander, Thanks for the script! FYI - rather than using select_buffer_hook to update the mode line, you can use watch_pref(pref, hook) to call the widget's update() method when the network.proxy.* prefs used by the mode line are changed. Patch attached to this message. You also might be interested in the proposed proxy management API: http://bugs.conkeror.org/issue59 Cheers, - Nick On Tue, Sep 30, 2008 at 5:38 AM, Alexander Reinwarth wrote: > Hi, > > as I use conkeror regularly in different networks and as conkeror has no builtin > functions for twiddling with the respective mozilla preferences, I wrote some > code for changing the proxy settings. > > Definitely nothing special and of course the code of a java script beginner, I > just thought I share the code, in case anyone has a need for it. > > Regards, > > Alexander > > > /* > * (C) Copyright 2008 Alexander Reinwarth > * > * Some simple functions for handling conkeror's connection through a > * proxy. For simplification it is assumed that http, https, ftp and > * gopher use the same proxy and port. > * > * "Works for me" > */ > > /* Standard proxy host and port for proxy-host and proxy-port. */ > define_variable("proxy_host","localhost", > "Hostname which will be offered as a standard value by proxy-host"); > define_variable("proxy_port","8080", > "Port which will be offered as a standard value by proxy-host"); > > /* toggle proxy on/off */ > interactive("proxy-toggle", > "Toggle wether to use a proxy or not.", > function(I) { > user_pref("network.proxy.type", get_pref("network.proxy.type") == 1 ? 0 : 1); > proxy_display_settings(I); > // update the widget > select_buffer_hook.run(I.buffer); > }); > > /* set the proxy host */ > function proxy_set_host(host){ > user_pref("network.proxy.http", host); > user_pref("network.proxy.ssl", host); > user_pref("network.proxy.ftp", host); > user_pref("network.proxy.gopher", host); > } > > interactive("proxy-host", > "Change the proxy host.", > function (I) { > proxy_set_host((yield I.minibuffer.read($prompt = "Host:", > $initial_value=proxy_host))); > proxy_display_settings(I); > // update the widget > select_buffer_hook.run(I.buffer); > }); > > > /* set the proxy port */ > function proxy_set_port(port){ > user_pref("network.proxy.http_port", parseFloat(port)); > user_pref("network.proxy.ssl_port", parseFloat(port)); > user_pref("network.proxy.ftp_port", parseFloat(port)); > user_pref("network.proxy.gopher_port", parseFloat(port)); > } > > interactive("proxy-port", > "Change the proxy port.", > function (I){ > proxy_set_port((yield I.minibuffer.read($prompt = "Port:", > $initial_value=proxy_port))) ; > proxy_display_settings(I); > // update the widget > select_buffer_hook.run(I.buffer); > }); > > > /* display current proxy settings */ > > function proxy_display_settings (I){ > > I.window.minibuffer.message ((get_pref("network.proxy.http"))+ ":" + > (get_pref("network.proxy.http_port"))+ ":" + > (get_pref("network.proxy.type") == 1 ? "on" : "off") > ); > } > > interactive ("proxy-display-settings", > "Display the current proxy settings", > function (I){proxy_display_settings(I);} > ); > > /* key bindings */ > > define_key(default_global_keymap, "C-c p t", "proxy-toggle"); > define_key(default_global_keymap, "C-c p h", "proxy-host"); > define_key(default_global_keymap, "C-c p p", "proxy-port"); > define_key(default_global_keymap, "C-c p d", "proxy-display-settings"); > > > /* > * A simple modeline-widget displaying the proxy settings > */ > > function proxy_widget(window){ > this.name = "proxy-widget"; > text_widget.call(this, window); > > // update the widget when select_buffer_hook is run > this.add_hook("select_buffer_hook"); > } > > proxy_widget.prototype.__proto__ = text_widget.prototype; > > proxy_widget.prototype.update = function () { > this.view.text = get_pref("network.proxy.http")+":" > +get_pref("network.proxy.http_port")+":" +(get_pref("network.proxy.type") == 1 ? > "on" : "off"); > }; > > /* > * Add the widget to the modeline > */ > > add_hook("mode_line_hook", mode_line_adder(proxy_widget)); > > > > _______________________________________________ > Conkeror mailing list > Conkeror at mozdev.org > https://www.mozdev.org/mailman/listinfo/conkeror > -------------- next part -------------- A non-text attachment was scrubbed... Name: proxy.js.diff Type: text/x-patch Size: 1319 bytes Desc: not available URL: From juhpetersen at gmail.com Sun Oct 5 07:00:51 2008 From: juhpetersen at gmail.com (Jens Petersen) Date: Mon, 6 Oct 2008 00:00:51 +1000 Subject: [Conkeror] [patch] download-manager.js typo Message-ID: <9436bffe0810050700k6a22fc79hf6446ff6480b9adb@mail.gmail.com> Fix a trivial spelling typo in a download-manager.js comment. Jens -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-typo-spelling-of-automatically.patch Type: application/octet-stream Size: 1105 bytes Desc: not available URL: From juhpetersen at gmail.com Sun Oct 5 07:27:54 2008 From: juhpetersen at gmail.com (Jens Petersen) Date: Mon, 6 Oct 2008 00:27:54 +1000 Subject: [Conkeror] [patch] 0003-Use-window-close-hooks-in-delete_window-and-quit.patch Message-ID: <9436bffe0810050727p224fa117o267941d5cc8f2fb5@mail.gmail.com> Here is a patch to run the window close hooks in delete_window and quit. I think the changes to quit could be done better: comments and feedback welcome, but this works for me. I was prompted to write this after (again) losing a conkeror session that had about 8-10 open buffers (tabs), forgetting/not realising that conkeror sessions are shared... -Jens -------------- next part -------------- A non-text attachment was scrubbed... Name: 0003-Use-window-close-hooks-in-delete_window-and-quit.patch Type: application/octet-stream Size: 1331 bytes Desc: not available URL: From juhpetersen at gmail.com Sun Oct 5 07:34:17 2008 From: juhpetersen at gmail.com (Jens Petersen) Date: Mon, 6 Oct 2008 00:34:17 +1000 Subject: [Conkeror] [patch] 0004-Add-window_confirm_close-function.patch Message-ID: <9436bffe0810050734j35674867kddc6544391e6982a@mail.gmail.com> This adds a window_confirm function which can be used in window_before_close_hook to query with confirm whether to close window when it has multiple buffers open. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0004-Add-window_confirm_close-function.patch Type: application/octet-stream Size: 1126 bytes Desc: not available URL: From juhpetersen at gmail.com Sun Oct 5 07:48:12 2008 From: juhpetersen at gmail.com (Jens Petersen) Date: Mon, 6 Oct 2008 00:48:12 +1000 Subject: [Conkeror] flickering tabs? Message-ID: <9436bffe0810050748k12a77144v70b4013dc4413118@mail.gmail.com> Hi, Has anyone else seen an issue with tabs in the tab-bar flickering madly in a resize loop for certain window size and tab configurations? It happens pretty often for me and makes conkeror use a lot of cpu while it tries frantically to keep modifying tab labels apparently in a loop to fit some criterion? Could it be related to tab title cropping? Jens From marting at gmx.ch Sun Oct 5 12:49:41 2008 From: marting at gmx.ch (marting at gmx.ch) Date: Sun, 05 Oct 2008 21:49:41 +0200 Subject: [Conkeror] bugfix: minibuffer history if match required Message-ID: <87vdw6ddpm.fsf@gmx.ch> Hi, When exit_minibuffer is called and match_required is true, I think it is better to add the match than to add the minibuffer text to the minibuffer history. The following patch implements that. diff --git a/modules/minibuffer-read.js b/modules/minibuffer-read.js index e49cb01..6b9b212 100644 --- a/modules/minibuffer-read.js +++ b/modules/minibuffer-read.js @@ -422,7 +422,7 @@ function exit_minibuffer(window) if (s.history) { - s.history.push(val); + s.history.push(s.match_required ? match : val); if (s.history.length > minibuffer_history_max_items) s.history.splice(0, s.history.length - minibuffer_history_max_items); } -- Martin From nicktastic at gmail.com Mon Oct 6 13:00:15 2008 From: nicktastic at gmail.com (Nicholas A. Zigarovich) Date: Mon, 6 Oct 2008 16:00:15 -0400 Subject: [Conkeror] flickering tabs? In-Reply-To: <9436bffe0810050748k12a77144v70b4013dc4413118@mail.gmail.com> References: <9436bffe0810050748k12a77144v70b4013dc4413118@mail.gmail.com> Message-ID: Jens, Happens to me all the time. Very annoying. The arrow buttons seem to rapidly appear and disappear, causing all tabs to constantly resize. Also, tab size seems to become disproportionate over time. Some tabs will often be very small while others will be very large. Bug filed: http://bugs.conkeror.org/issue62 - Nick On Sun, Oct 5, 2008 at 10:48 AM, Jens Petersen wrote: > Hi, > > Has anyone else seen an issue with tabs in the tab-bar flickering > madly in a resize loop for certain window size and tab configurations? > > It happens pretty often for me and makes conkeror use a lot of cpu > while it tries frantically to keep modifying tab labels apparently in > a loop to fit some criterion? Could it be related to tab title > cropping? > > Jens > _______________________________________________ > Conkeror mailing list > Conkeror at mozdev.org > https://www.mozdev.org/mailman/listinfo/conkeror > From lists at reinwarth.com Tue Oct 7 01:55:14 2008 From: lists at reinwarth.com (Alexander Reinwarth) Date: Tue, 7 Oct 2008 08:55:14 +0000 (UTC) Subject: [Conkeror] Proxy Settings References: Message-ID: Nicholas A. Zigarovich gmail.com> writes: > Thanks for the script! You're welcome. > FYI - rather than using select_buffer_hook to update the mode line, > you can use watch_pref(pref, hook) to call the widget's update() > method when the network.proxy.* prefs used by the mode line are > changed. Patch attached to this message. Thanks for the hint, this is by far a more elegant solution to the problem of reacting to changing values of a preference. > You also might be interested in the proposed proxy management API: > > http://bugs.conkeror.org/issue59 This looks interesting, I'll stay tuned for the resulting API :) Regards, Alexander From jeremy at jeremyms.com Thu Oct 9 16:04:20 2008 From: jeremy at jeremyms.com (Jeremy Maitin-Shepard) Date: Thu, 09 Oct 2008 16:04:20 -0700 Subject: [Conkeror] New feature: describe-preference command (bound to [C-h p] by default) Message-ID: <877i8hxte3.fsf@jeremyms.com> This new command provides help on Mozilla preferences. It includes completion based on defined preferences, and opens the corresponding webpage at http://kb.mozillazine.org/, which seems to have documentation for a lot of preferences. -- Jeremy Maitin-Shepard From jeremy at jeremyms.com Thu Oct 9 18:04:09 2008 From: jeremy at jeremyms.com (Jeremy Maitin-Shepard) Date: Thu, 09 Oct 2008 18:04:09 -0700 Subject: [Conkeror] New feature: Cookie management interface Message-ID: <873aj5xnue.fsf@jeremyms.com> There is now a simple cookie management interface in modules/cookie.js. Specifically, it introduces the clear-cookies command, as well as the user variable cookie_lifetime_policy, which provides an interface for getting and setting (via session_pref) the Mozilla preferences network.cookie.lifetimePolicy and network.cookie.lifetime.days. -- Jeremy Maitin-Shepard From nicktastic at gmail.com Fri Oct 10 10:11:18 2008 From: nicktastic at gmail.com (Nicholas A. Zigarovich) Date: Fri, 10 Oct 2008 13:11:18 -0400 Subject: [Conkeror] New feature: cache management API Message-ID: A simple cache cache management API has been added to modules/cache.js. Example usage can be found at the wiki: http://conkeror.org/Tips - Nick From richardlewis at fastmail.co.uk Sun Oct 12 17:17:01 2008 From: richardlewis at fastmail.co.uk (Richard Lewis) Date: Mon, 13 Oct 2008 01:17:01 +0100 Subject: [Conkeror] Current Location Message-ID: <200810130117.05282.richardlewis@fastmail.co.uk> Hi there, This is either a question or feature request. Is it possible to edit the current URL? Equivalent to editting the contents of the Location bar in many other browsers and then going to the altered location? I think it would be quite cool if, when you press 'g', it shows the current URL highlighted (selected) so that if you start typing you replace it, or you can use the cursor keys to remove the selection, edit the URL, and then visit the editted version. Or, it might be nice if pressing the up cursor key after pressing 'g', scrolls through a list of (edittable) previously visited URLs. Is anything like that already possible? Cheers, Richard -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard Lewis JID: ironchicken at jabber.earth.li http://www.richard-lewis.me.uk/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +-------------------------------------------------------+ |Please avoid sending me Word or PowerPoint attachments.| |http://www.gnu.org/philosophy/no-word-attachments.html | +-------------------------------------------------------+ From abe at deuxchevaux.org Sun Oct 12 17:35:46 2008 From: abe at deuxchevaux.org (Axel Beckert) Date: Mon, 13 Oct 2008 02:35:46 +0200 Subject: [Conkeror] Current Location In-Reply-To: <200810130117.05282.richardlewis@fastmail.co.uk> References: <200810130117.05282.richardlewis@fastmail.co.uk> Message-ID: <20081013003546.GB10579@sym.noone.org> Hi, On Mon, Oct 13, 2008 at 01:17:01AM +0100, Richard Lewis wrote: > Is it possible to edit the current URL? Equivalent to editting the > contents of the Location bar in many other browsers and then going > to the altered location? Yeah, try C-x C-v like in Emacs "Replace buffer" (or so). > I think it would be quite cool if, when you press 'g', it shows the > current URL highlighted (selected) so that if you start typing you > replace it, or you can use the cursor keys to remove the selection, > edit the URL, and then visit the editted version. I would suggest to add another keybinding in addition to C-x C-x: Shift-g (or short "G") as in Lynx, because the (small) "g" also comes from Lynx. > Or, it might be nice if pressing the up cursor key after > pressing 'g', scrolls through a list of (edittable) previously > visited URLs. Ack! Same for C-x C-f. Regards, Axel -- Axel Beckert - abe at deuxchevaux.org, abe at noone.org - http://noone.org/abe/ From richardlewis at fastmail.co.uk Sun Oct 12 17:51:13 2008 From: richardlewis at fastmail.co.uk (Richard Lewis) Date: Mon, 13 Oct 2008 01:51:13 +0100 Subject: [Conkeror] Current Location In-Reply-To: References: <200810130117.05282.richardlewis@fastmail.co.uk> Message-ID: <200810130151.14611.richardlewis@fastmail.co.uk> On Monday 13 October 2008 01:35:46 Axel Beckert wrote: > Yeah, try C-x C-v like in Emacs "Replace buffer" (or so). On Monday 13 October 2008 01:44:24 Sketch wrote: > > C-x C-v does this. You can rebind g to find-alternate-url to > make it do the same thing. > Cool. Just what I was looking for. > > As in emacs, M-p and M-n cycle up and down through proevious > history in most completion prompts. > Oh yes, I keep forgetting to think Emacs. Thanks Axel and Sketch. Richard -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard Lewis JID: ironchicken at jabber.earth.li http://www.richard-lewis.me.uk/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- +-------------------------------------------------------+ |Please avoid sending me Word or PowerPoint attachments.| |http://www.gnu.org/philosophy/no-word-attachments.html | +-------------------------------------------------------+ From sketch at openverse.com Sun Oct 12 17:54:23 2008 From: sketch at openverse.com (Sketch) Date: Sun, 12 Oct 2008 19:54:23 -0500 (CDT) Subject: [Conkeror] Current Location In-Reply-To: <200810130151.14611.richardlewis@fastmail.co.uk> References: <200810130117.05282.richardlewis@fastmail.co.uk> <200810130151.14611.richardlewis@fastmail.co.uk> Message-ID: On Mon, 13 Oct 2008, Richard Lewis wrote: >> As in emacs, M-p and M-n cycle up and down through proevious >> history in most completion prompts. >> > Oh yes, I keep forgetting to think Emacs. By the way, C-h b to list keybindings also works in minibuffer/completion prompts. -- Sketch From lists at reinwarth.com Tue Oct 14 14:12:00 2008 From: lists at reinwarth.com (Alexander Reinwarth) Date: Tue, 14 Oct 2008 23:12:00 +0200 Subject: [Conkeror] Periodic reload of buffers Message-ID: <48F50B20.8000107@reinwarth.com> Hi! One of the firefox extensions I really like is ReloadEvery, which periodically reloads the webpage in a given tab. As I need to monitor some web pages, which do not send a refresh-meta-header, I wrote some code, which mimics this behaviour. Just in case someone else finds this useful, I attach the code. Regards, Alexander -------------- next part -------------- A non-text attachment was scrubbed... Name: reload.js Type: application/javascript Size: 3775 bytes Desc: not available URL: From bleader at ratonland.org Thu Oct 16 11:48:42 2008 From: bleader at ratonland.org (bleader) Date: Thu, 16 Oct 2008 20:48:42 +0200 Subject: [Conkeror] kill-other-buffers function Message-ID: <20081016184842.GA1620@ratonland.org> Hi all, I finally took the time to write this small function that is pretty handy to me, hope it may be usefull to someone else. It's simply the kill-other-buffers, that will keep current buffer alive and kill all others buffers (within the current window). -- bleader -------------- next part -------------- A non-text attachment was scrubbed... Name: kill-other-buffers.patch Type: text/x-diff Size: 850 bytes Desc: not available URL: From skamil at gmail.com Sun Oct 19 19:48:23 2008 From: skamil at gmail.com (Shoaib Kamil) Date: Mon, 20 Oct 2008 02:48:23 +0000 (UTC) Subject: [Conkeror] conkeror as default browser on mac Message-ID: Hi, I've begun using conkeror and am extremely impressed with how well everything works. I was, however, unable to set it as the default browser in Mac OSX 10.5. It seems the app bundle must be exporting some information that tells the OS that the application can handle browsing. I've tried using the Firefox Info.plist (with the required changes to make it run the xulrunner executable) but to no avail. Has anyone had success with this? thanks. From David.Kettler at dsto.defence.gov.au Sun Oct 26 18:45:46 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 27 Oct 2008 12:15:46 +1030 Subject: [Conkeror] [PATCH] Optionally display a URL panel when selecting from hints. Message-ID: When hints_display_url_panel is true and an item is being selected using the hinting system, a panel is displayed above the minibuffer showing the URL of the item that is being selected. This is useful for confirming that the correct link is selected and that the URL is not undesirable in some way. --- I'm not very familiar with javascript, XUL or the conkeror code. Suggestions for improvements are welcome. content/conkeror.css | 4 ++++ modules/hints.js | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/content/conkeror.css b/content/conkeror.css index b5bc751..ad19ea7 100644 --- a/content/conkeror.css +++ b/content/conkeror.css @@ -88,6 +88,10 @@ tree.completions treechildren::-moz-tree-cell-text(current) { font-weight: bold; } +.panel .url-panel-label { + font-weight: bold; +} + /* tab bar */ diff --git a/modules/hints.js b/modules/hints.js index d36e080..9ea1454 100644 --- a/modules/hints.js +++ b/modules/hints.js @@ -328,6 +328,33 @@ hint_manager.prototype = { } }; +/* Show panel with currently selected URL below the minibuffer. */ +function hints_url_panel(hints, window) { + var g = new dom_generator(window.document, XUL_NS); + + var p = g.element("hbox", "class", "panel url", "flex", "0"); + g.element("label", p, "value", "URL:", "class", "url-panel-label"); + var url_value = g.text("label", p, "class", "url-panel-value"); + window.minibuffer.insert_before(p); + + p.update = function() { + url_value.nodeValue = ""; + if (hints.manager && hints.manager.last_selected_hint) { + var elem = hints.manager.last_selected_hint.elem; + if (elem instanceof Ci.nsIDOMHTMLAnchorElement) + url_value.nodeValue = elem; + } + } + + p.destroy = function() { + this.parentNode.removeChild(this); + }; + + return p; +} + +define_variable("hints_display_url_panel", false, "When selecting a hint, the URL can be displayed in a panel above the minibuffer. This is useful for confirming that the correct link is selected and that the URL is not evil. This option is most useful when hints_auto_exit_delay is long or disabled."); + /** * keyword arguments: * @@ -340,6 +367,8 @@ function hints_minibuffer_state(continuation, buffer) { keywords(arguments, $keymap = hint_keymap, $auto); basic_minibuffer_state.call(this, $prompt = arguments.$prompt); + if (hints_display_url_panel) + this.url_panel = hints_url_panel(this, buffer.window); this.original_prompt = arguments.$prompt; this.continuation = continuation; this.keymap = arguments.$keymap; @@ -362,6 +391,8 @@ hints_minibuffer_state.prototype = { this.focused_frame, this.focused_element); } this.manager.update_valid_hints(); + if (this.url_panel) + this.url_panel.update(); }, unload : function (window) { if (this.auto_exit_timer_ID) { @@ -376,12 +407,16 @@ hints_minibuffer_state.prototype = { this.auto_exit_timer_ID = null; } this.manager.remove(); + if (this.url_panel) + this.url_panel.destroy(); }, update_minibuffer : function (m) { if (this.typed_number.length > 0) m.prompt = this.original_prompt + " #" + this.typed_number; else m.prompt = this.original_prompt; + if (this.url_panel) + this.url_panel.update(); }, handle_auto_exit : function (m, delay) { -- 1.6.0.2.605.g208f6.dirty -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jjfoerch at earthlink.net Mon Oct 27 13:14:32 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Mon, 27 Oct 2008 16:14:32 -0400 Subject: [Conkeror] gmail-mode no longer loaded by default Message-ID: <87ljw994nr.fsf@earthlink.net> Hello all, Gmail-mode is no longer loaded automatically because it overrides so many keys that it renders the browser practically unusable without the mouse, particularly for anyone who does not know all of gmail's special key bindings. For those who do use it, you will have to put the following into your rc: require("page-modes/gmail.js"); Sorry for any inconvenience from the change in defaults. -- John Foerch From David.Kettler at dsto.defence.gov.au Mon Oct 27 17:24:06 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 28 Oct 2008 10:54:06 +1030 Subject: [Conkeror] [PATCH] find-url with blank url reloads buffer. Message-ID: A blank url now defaults to the url of the current buffer. This means that "g RET" will reload the current buffer (which is useful for fingers trained to press "g" in gnus). Also "C-u g RET" will duplicate the current buffer. There is no new functionality, but keystrokes which were not useful now do something sensible. --- I'm not sure if I.buffer.description is the correct place to grab the current url. modules/content-buffer.js | 3 +-- modules/element.js | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/content-buffer.js b/modules/content-buffer.js index 7726a06..051acee 100644 --- a/modules/content-buffer.js +++ b/modules/content-buffer.js @@ -309,8 +309,7 @@ minibuffer.prototype.read_url = function () { $auto_complete = "url", $select, $match_required = false); - if (result == "") // well-formedness check. (could be better!) - throw ("invalid url or webjump (\""+ result +"\")"); + // todo: well-formedness check yield co_return(result); }; /* diff --git a/modules/element.js b/modules/element.js index 6aed43b..916b898 100644 --- a/modules/element.js +++ b/modules/element.js @@ -367,6 +367,8 @@ function follow (I, target) { // for this check, because FOLLOW_DEFAULT could signify new buffer // or new window. check_buffer (I.buffer, content_buffer); + if (I.browser_object == browser_object_url && element.length == 0) + element = I.buffer.description; browser_object_follow(I.buffer, target, element); } -- -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From David.Kettler at dsto.defence.gov.au Mon Oct 27 17:25:21 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 28 Oct 2008 10:55:21 +1030 Subject: [Conkeror] [PATCH] Don't override OPEN_CURRENT_BUFFER with default target. Message-ID: Because zero is a false value in javascript, a target of OPEN_CURRENT_BUFFER would previously be overridden with a default value. There is no run-time difference (the default ends up doing the same thing anyway) but it could be confusing when inspecting the value of target. --- modules/commands.js | 3 ++- modules/element.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/commands.js b/modules/commands.js index f6193b1..f914ff9 100644 --- a/modules/commands.js +++ b/modules/commands.js @@ -667,7 +667,8 @@ function view_as_mime_type (I, target) { var element = yield I.read_browser_object("view_as_mime_type"); var spec = element_get_load_spec(element); - target = target || FOLLOW_CURRENT_FRAME; + if (target == null) + target = FOLLOW_CURRENT_FRAME; if (!spec) throw interactive_error("Element is not associated with a URI"); diff --git a/modules/element.js b/modules/element.js index 916b898..eeccd9b 100644 --- a/modules/element.js +++ b/modules/element.js @@ -360,7 +360,8 @@ function element_get_load_spec(elem) { function follow (I, target) { - target = target || FOLLOW_DEFAULT; + if (target == null) + target = FOLLOW_DEFAULT; var element = yield I.read_browser_object(I.command, target); // XXX: to follow in the current buffer requires that the current // buffer be a content_buffer. this is perhaps not the best place -- 1.6.0.2.605.g208f6.dirty -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jjfoerch at earthlink.net Tue Oct 28 08:11:59 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Tue, 28 Oct 2008 11:11:59 -0400 Subject: [Conkeror] [PATCH] Don't override OPEN_CURRENT_BUFFER with default target. References: Message-ID: <87fxmg92kg.fsf@earthlink.net> David Kettler writes: > Because zero is a false value in javascript, a target of > OPEN_CURRENT_BUFFER would previously be overridden with a default > value. There is no run-time difference (the default ends up doing the > same thing anyway) but it could be confusing when inspecting the value > of target. Good catch. Applied. -- John Foerch From jjfoerch at earthlink.net Tue Oct 28 08:13:38 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Tue, 28 Oct 2008 11:13:38 -0400 Subject: [Conkeror] [PATCH] find-url with blank url reloads buffer. References: Message-ID: <87bpx492hp.fsf@earthlink.net> David Kettler writes: > A blank url now defaults to the url of the current buffer. This means > that "g RET" will reload the current buffer (which is useful for > fingers trained to press "g" in gnus). Also "C-u g RET" will duplicate > the current buffer. > > There is no new functionality, but keystrokes which were not useful > now do something sensible. What about, instead, using the alternate-url browser object as the default for find-url, and modifying that browser object to select the url? -- John Foerch From jjfoerch at earthlink.net Tue Oct 28 08:52:08 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Tue, 28 Oct 2008 11:52:08 -0400 Subject: [Conkeror] [PATCH] Optionally display a URL panel when selecting from hints. References: Message-ID: <877i7s90pj.fsf@earthlink.net> David Kettler writes: > When hints_display_url_panel is true and an item is being selected > using the hinting system, a panel is displayed above the minibuffer > showing the URL of the item that is being selected. This is useful for > confirming that the correct link is selected and that the URL is not > undesirable in some way. > --- > > I'm not very familiar with javascript, XUL or the conkeror code. > Suggestions for improvements are welcome. Great feature! Thanks! -- John Foerch From jjfoerch at earthlink.net Tue Oct 28 08:57:13 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Tue, 28 Oct 2008 11:57:13 -0400 Subject: [Conkeror] [patch] download-manager.js typo References: <9436bffe0810050700k6a22fc79hf6446ff6480b9adb@mail.gmail.com> Message-ID: <873aig90h2.fsf@earthlink.net> "Jens Petersen" writes: > Fix a trivial spelling typo in a download-manager.js comment. > > Jens Thanks! -- John Foerch From jjfoerch at earthlink.net Tue Oct 28 09:19:17 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Tue, 28 Oct 2008 12:19:17 -0400 Subject: [Conkeror] bugfix: minibuffer history if match required References: <87vdw6ddpm.fsf@gmx.ch> Message-ID: <87y7087kvu.fsf@earthlink.net> marting at gmx.ch writes: > Hi, > > When exit_minibuffer is called and match_required is true, I think it > is better to add the match than to add the minibuffer text to the > minibuffer history. The following patch implements that. > Applied, thank you. -- John Foerch From jjfoerch at earthlink.net Tue Oct 28 10:10:00 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Tue, 28 Oct 2008 13:10:00 -0400 Subject: [Conkeror] Periodic reload of buffers References: <48F50B20.8000107@reinwarth.com> Message-ID: <87od147ijb.fsf@earthlink.net> Alexander Reinwarth writes: > Hi! > > One of the firefox extensions I really like is ReloadEvery, which > periodically reloads the webpage in a given tab. As I need to monitor > some web pages, which do not send a refresh-meta-header, I wrote some > code, which mimics this behaviour. > > Just in case someone else finds this useful, I attach the code. > > Regards, > > Alexander Hi Alexander, It sounds like what you really want to do isn't to associate the reload-timer with a particular buffer, but rather with a particular page or website. This sounds like a good candidate for a page-mode. It should be possible to make a kind of "generic page-mode" such that it could be user-configured to work with any website. Most of the existing page-modes are for a particular website, but modules/page-modes/media.js may be a good example of a generic page-mode. -- John Foerch From jjfoerch at earthlink.net Tue Oct 28 11:07:48 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Tue, 28 Oct 2008 14:07:48 -0400 Subject: [Conkeror] [RFC] Show more links on mouse over. References: Message-ID: <87k5bs7fuz.fsf@earthlink.net> David Kettler writes: > Previously only simple links were shown in the echo area when the > mouse was hovered over the link. Now image links and links containing > formatting will also be shown. > --- > > An example where this makes a difference is at the conkeror webgit > http://repo.or.cz/w/conkeror.git. The git image in the top right > corner is clickable but without this patch it doesn't show the link on > mouseover. > > This patch copies the parent chasing code from > element_get_load_spec(). That's more expensive than the previous > code, but I don't notice any performance degradation on my box. > > My main concern with the approach though, is that I want a guarantee > that the link I see when I hover is what I'll get when I click. But > the current code has seperate implementations for these two cases, so > the result may differ. > > I considered calling element_get_load_spec() from the event handler, > but it seems rather heavy weight. > > I wonder if it's possible to hook in while the DOM is being > constructed and attach the href from an anchor element to its bottom > level child. And do some of the other cases handled by > element_get_load_spec() at that time too. Then the simplified > element_get_load_spec() and the mouseover event handler need only > check the element for a href; they will get the same result. Thank you. I'm just now getting caught up on reviewing patches, so sorry for the wait on this one. I think your concern about consistency between the notification text and the url that gets used upon the click event is very valid, and something we should look into. However, this patch is definitely a positive incremental improvement on conkeror's current rollover notification. Perhaps the rollover notification text should also contain information about any onclick handlers registered for the nodes being hovered over. -- John Foerch From jjfoerch at earthlink.net Tue Oct 28 11:49:10 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Tue, 28 Oct 2008 14:49:10 -0400 Subject: [Conkeror] kill-other-buffers function References: <20081016184842.GA1620@ratonland.org> Message-ID: <87fxmg7dy1.fsf@earthlink.net> bleader writes: > Hi all, > > I finally took the time to write this small function that is pretty > handy to me, hope it may be usefull to someone else. It's simply the > kill-other-buffers, that will keep current buffer alive and kill all > others buffers (within the current window). Thank you. Applied. Catching up on patches today. Sorry for the delay. -- John Foerch From jeremy at jeremyms.com Tue Oct 28 14:07:44 2008 From: jeremy at jeremyms.com (Jeremy Maitin-Shepard) Date: Tue, 28 Oct 2008 14:07:44 -0700 Subject: [Conkeror] bugfix: minibuffer history if match required In-Reply-To: <87y7087kvu.fsf@earthlink.net> (John J. Foerch's message of "Tue, 28 Oct 2008 12:19:17 -0400") References: <87vdw6ddpm.fsf@gmx.ch> <87y7087kvu.fsf@earthlink.net> Message-ID: <87wsfssa1r.fsf@jeremyms.com> John J Foerch writes: > marting at gmx.ch writes: >> Hi, >> >> When exit_minibuffer is called and match_required is true, I think it >> is better to add the match than to add the minibuffer text to the >> minibuffer history. The following patch implements that. >> I should have replied to the original message much sooner -- sorry. This patch does work because there is no guarantee that the match value that is returned to the caller is actually a suitable value for the user to have typed, since getting a value from the history is equivalent in terms of the completion system to the user having typed it. In particular, the match value might not even be a string. Notice that with this patch, if you use C-x b, pick something, and then open C-x b again, and look at the history, you'll see that [Object object] is listed, because with switch-to-buffer, the match value is the actual buffer itself, not a string. I agree that what you want is a useful feature in some cases like when completing a URL, but I think it would require some change to the completion system in order for it to work. Even then, it is not clear how to make it work with switch-to-buffer. -- Jeremy Maitin-Shepard From David.Kettler at dsto.defence.gov.au Tue Oct 28 23:30:35 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 29 Oct 2008 17:00:35 +1030 Subject: [Conkeror] [PATCH] find-url with blank url reloads buffer. In-Reply-To: <87bpx492hp.fsf@earthlink.net> References: <87bpx492hp.fsf@earthlink.net> Message-ID: The url and alternate-url browser objects now default to the url of the current buffer. This means that "g RET" will reload the current buffer and "C-u g RET" will duplicate the current buffer. For consistency, "C-x C-v DEL RET" will also reload the current buffer, but that's less likely to be useful. There is no new functionality, but keystrokes which were not useful now do something sensible. --- > What about, instead, using the alternate-url browser object as the > default for find-url, and modifying that browser object to select the url? I'm not sure what you mean; is this close to what you had in mind? I agree that it makes more sense to do the selection in the browser object. I couldn't see a way to pass a parameter to the browser object handler to select whether or not the current url is presented for editing. Instead, I generate the handler for the two cases, but this seems a bit heavy handed. regards, David. modules/commands.js | 12 +----------- modules/content-buffer.js | 3 +-- modules/element.js | 23 ++++++++++++++++++----- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/modules/commands.js b/modules/commands.js index a53b7fe..997f4e7 100644 --- a/modules/commands.js +++ b/modules/commands.js @@ -419,17 +419,7 @@ interactive("find-url-new-window", "Open a URL in a new window", interactive("find-alternate-url", "Edit the current URL in the minibuffer", "find-url", - $browser_object = - define_browser_object_class( - "alternate-url", null, null, - function (buf, prompt) { - check_buffer (buf, content_buffer); - var result = yield buf.window.minibuffer.read_url ( - $prompt = prompt, - $initial_value = buf.display_URI_string); - yield co_return (result); - })); - + $browser_object = browser_object_alternate_url); interactive("go-up", "Go to the parent directory of the current URL", "find-url", diff --git a/modules/content-buffer.js b/modules/content-buffer.js index 87c99d1..68c1154 100644 --- a/modules/content-buffer.js +++ b/modules/content-buffer.js @@ -309,8 +309,7 @@ minibuffer.prototype.read_url = function () { $auto_complete = "url", $select, $match_required = false); - if (result == "") // well-formedness check. (could be better!) - throw ("invalid url or webjump (\""+ result +"\")"); + // todo: well-formedness check yield co_return(result); }; /* diff --git a/modules/element.js b/modules/element.js index 745ee52..4845543 100644 --- a/modules/element.js +++ b/modules/element.js @@ -89,13 +89,26 @@ define_browser_object_class( "top", null, null, function (buf, prompt) { yield co_return(buf.top_frame); }); -define_browser_object_class( - "url", null, null, - function (buf, prompt) { +function browser_object_url_handler_generator (offer_initial) { + return function (buf, prompt) { check_buffer (buf, content_buffer); - var result = yield buf.window.minibuffer.read_url ($prompt = prompt); + var current_uri = buf.display_URI_string; + var result = yield buf.window.minibuffer.read_url ( + $prompt = prompt, + $initial_value = offer_initial ? current_uri : null); + if (result.length == 0) + result = current_uri; yield co_return (result); - }); + } +} + +define_browser_object_class( + "url", null, null, + browser_object_url_handler_generator(false)); + +define_browser_object_class( + "alternate-url", null, null, + browser_object_url_handler_generator(true)); define_browser_object_class( "alt", "Image Alt-text", null, -- -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From jjfoerch at earthlink.net Wed Oct 29 17:54:22 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Wed, 29 Oct 2008 20:54:22 -0400 Subject: [Conkeror] [PATCH] find-url with blank url reloads buffer. References: <87bpx492hp.fsf@earthlink.net> Message-ID: <87y7066gxt.fsf@earthlink.net> David Kettler writes: > > I'm not sure what you mean; is this close to what you had in mind? I > agree that it makes more sense to do the selection in the browser > object. > > I couldn't see a way to pass a parameter to the browser object handler > to select whether or not the current url is presented for editing. > Instead, I generate the handler for the two cases, but this seems a > bit heavy handed. > > regards, David. Hi David, It is now possible to accomplish what you want as follows, in your rc, with the new utility function `set_default_browser_object': set_default_browser_object("find-url", browser_object_alternate_url); Likewise for the commands find-url-new-buffer and find-url-new-window, if you use those commands. I agree with your observation that there is a troubling amount of code duplication between browser_object_url and browser_object_alternate_url. Things to think about. I hesitate to declare that following a blank url automatically equates to reload, and I think the browser-object system is the right place to deal with this. -- John Foerch From David.Kettler at dsto.defence.gov.au Wed Oct 29 23:25:21 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 30 Oct 2008 16:55:21 +1030 Subject: [Conkeror] [PATCH] find-url with blank url reloads buffer. In-Reply-To: <87y7066gxt.fsf@earthlink.net> References: <87bpx492hp.fsf@earthlink.net> <87y7066gxt.fsf@earthlink.net> Message-ID: G'day John, > It is now possible to accomplish what you want as follows Thanks, but that doesn't quite do what I want. The behaviour is right, but not the appearance. I don't want to see the current URL in the minibuffer when I press g. > I hesitate to declare that following a blank url automatically > equates to reload Fair enough. How about if a user variable selected this behaviour? Or how about a user callback to allow arbitrary fiddling with the string. Another option, which I can mostly implement in my rc, is for me to write a url-blank-default object class which calls browser_object_url. I'm not sure how to do that wrapering though, and I'd still need to disable the check in read_url(). > and I think the browser-object system is the right place to deal > with this. That's what I tried to do in the second version of the patch. Does it not do so? BTW, particular thanks also for your improvements to the url panel. regards, David. -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From volh at ginnungagap.in.ua Thu Oct 30 02:17:18 2008 From: volh at ginnungagap.in.ua (volh at ginnungagap.in.ua) Date: Thu, 30 Oct 2008 11:17:18 +0200 Subject: [Conkeror] [PATCH] unescape current location in the mode line Message-ID: <20081030091718.GC4169@ehursagkurkurra> Hi. Mode line and find-alternate-url escape current location string. This makes surfing location like http://ru.wikipedia.org/wiki/???????????_?????_????? quite uncomfortable. -- wbr, Roman Semenenko. -------------- next part -------------- diff --git a/modules/commands.js b/modules/commands.js index 0ac8b69..fc6cc62 100644 --- a/modules/commands.js +++ b/modules/commands.js @@ -432,7 +432,7 @@ interactive("find-alternate-url", "Edit the current URL in the minibuffer", check_buffer (buf, content_buffer); var result = yield buf.window.minibuffer.read_url ( $prompt = prompt, - $initial_value = buf.display_URI_string); + $initial_value = textToSubURI.unEscapeURIForUI("UTF-8", buf.display_URI_string)); yield co_return (result); }), $prompt = "Find url"); diff --git a/modules/mode-line.js b/modules/mode-line.js index f07a8fa..443c387 100644 --- a/modules/mode-line.js +++ b/modules/mode-line.js @@ -141,7 +141,7 @@ function current_buffer_name_widget(window) { } current_buffer_name_widget.prototype.__proto__ = text_widget.prototype; current_buffer_name_widget.prototype.update = function () { - this.view.text = this.window.buffers.current.description; + this.view.text = textToSubURI.unEscapeURIForUI("UTF-8", this.window.buffers.current.description); }; function current_buffer_scroll_position_widget(window) { diff --git a/modules/suggest-file-name.js b/modules/suggest-file-name.js index 267cbd3..6b965d1 100644 --- a/modules/suggest-file-name.js +++ b/modules/suggest-file-name.js @@ -134,7 +134,6 @@ function maybe_filename_from_uri(uri) { var url = uri.QueryInterface(Components.interfaces.nsIURL); if (url.fileName != "") { // 2) Use the actual file name, if present - var textToSubURI = Cc["@mozilla.org/intl/texttosuburi;1"].getService(Ci.nsITextToSubURI); return textToSubURI.unEscapeURIForUI(url.originCharset || "UTF-8", url.fileName); } } catch (e) { diff --git a/modules/utils.js b/modules/utils.js index a88d7c0..47f86d2 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -1264,3 +1264,5 @@ function compute_url_up_path (url) up = ".."; return up; } + +var textToSubURI = Cc["@mozilla.org/intl/texttosuburi;1"].getService(Ci.nsITextToSubURI); From volh at ginnungagap.in.ua Thu Oct 30 02:53:20 2008 From: volh at ginnungagap.in.ua (volh at ginnungagap.in.ua) Date: Thu, 30 Oct 2008 11:53:20 +0200 Subject: [Conkeror] [PATCH] unescape current location in the mode line In-Reply-To: <20081030091718.GC4169@ehursagkurkurra> References: <20081030091718.GC4169@ehursagkurkurra> Message-ID: <20081030095320.GD4169@ehursagkurkurra> upd. unescape links on mouseover -- wbr, Roman Semenenko. -------------- next part -------------- diff --git a/modules/content-buffer.js b/modules/content-buffer.js index 87c99d1..ab87dd3 100644 --- a/modules/content-buffer.js +++ b/modules/content-buffer.js @@ -56,7 +56,7 @@ function content_buffer(window, element) while (node && !(node instanceof Ci.nsIDOMHTMLAnchorElement)) node = node.parentNode; if (node) { - content_buffer_overlink_change_hook.run(buffer, node.href); + content_buffer_overlink_change_hook.run(buffer, textToSubURI.unEscapeURIForUI("UTF-8",node.href)); buffer.current_overlink = event.target; } }, true, false); From jeremy at jeremyms.com Thu Oct 30 11:53:28 2008 From: jeremy at jeremyms.com (Jeremy Maitin-Shepard) Date: Thu, 30 Oct 2008 11:53:28 -0700 Subject: [Conkeror] [PATCH] unescape current location in the mode line In-Reply-To: <20081030091718.GC4169@ehursagkurkurra> (volh@ginnungagap.in.ua's message of "Thu, 30 Oct 2008 11:17:18 +0200") References: <20081030091718.GC4169@ehursagkurkurra> Message-ID: <87ej1xlxsn.fsf@jeremyms.com> volh at ginnungagap.in.ua writes: > Hi. Mode line and find-alternate-url escape current location string. > This makes surfing location like > http://ru.wikipedia.org/wiki/???????????_?????_????? quite > uncomfortable. I agree that displaying them poorly is unfortunate. However, first I believe that this should be corrected at a lower layer than in the mode line code itself. (In particular, the mode line code you modified is not even specific to content buffers, meaning that buffer.description might not even be a URL.) The other issue is that we need to make sure that it is always correct to assume the URL is UTF-8 encoded. Otherwise, we need to figure out under what conditions we can assume that, and only apply the decoding in those conditions. -- Jeremy Maitin-Shepard From jeremy at jeremyms.com Thu Oct 30 11:54:45 2008 From: jeremy at jeremyms.com (Jeremy Maitin-Shepard) Date: Thu, 30 Oct 2008 11:54:45 -0700 Subject: [Conkeror] [PATCH] unescape current location in the mode line In-Reply-To: <20081030095320.GD4169@ehursagkurkurra> (volh@ginnungagap.in.ua's message of "Thu, 30 Oct 2008 11:53:20 +0200") References: <20081030091718.GC4169@ehursagkurkurra> <20081030095320.GD4169@ehursagkurkurra> Message-ID: <87abcllxqi.fsf@jeremyms.com> volh at ginnungagap.in.ua writes: > upd. unescape links on mouseover Likewise for this patch, we need to know under what conditions we can assume the URL is UTF-8 encoded. -- Jeremy Maitin-Shepard From jjfoerch at earthlink.net Thu Oct 30 19:14:40 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Thu, 30 Oct 2008 22:14:40 -0400 Subject: [Conkeror] [PATCH] find-url with blank url reloads buffer. References: <87bpx492hp.fsf@earthlink.net> <87y7066gxt.fsf@earthlink.net> Message-ID: <87r65x5x4f.fsf@earthlink.net> David Kettler writes: > G'day John, > >> It is now possible to accomplish what you want as follows > > Thanks, but that doesn't quite do what I want. The behaviour is > right, but not the appearance. I don't want to see the current URL in > the minibuffer when I press g. > >> I hesitate to declare that following a blank url automatically >> equates to reload > > Fair enough. How about if a user variable selected this behaviour? > Or how about a user callback to allow arbitrary fiddling with the > string. > Hi David, I have been thinking about this problem today, and I think I have an idea for an elegant solution that can unify several features into one interface. Ignore what I said about doing this in the browser-object system. On further thought, I think we should go to a lower level. In summary, the idea is a take on the option you presented: "a user callback to allow arbitrary fiddling with the string." But let me explain it in full....... Months back there was a feature request discussed in the irc channel: When an url has been read in the minibuffer, if it is not a valid url, and it is not a valid webjump, google the text. The idea evolved into "default webjump"--such that any webjump could be used as a default when none was given. Nobody has yet implemented this feature, but I believe it shares common traits with your empty-url handler such that both of them, and *possibly* the entire webjump system itself could be folded into a single configuration-interface. Here is the easy version: After reading some text with minibuffer.read_url and establishing that the text was neither a valid webjump nor a valid url (tricky bit), user-definable handlers would be tried in sequence until one claimed a match and performed a transformation on the text. This method would accomodate both the default webjump feature and the blank url feature, but lacks the comprehensive uniformity of the other possible way to do it.... Now here is the difficult version: minibuffer.read_url would itself be modified such that the completion-processors would be modular, instead of hard-coded. The user could configure the list of completers for read_url to use. Existing completers such as bookmarks, history, and webjumps would be made modular and included in this system. Default-webjump would also be a modular completer, available for the user to add in at a lower precedence than the webjump complter. An empty-url handler would also be available. > BTW, particular thanks also for your improvements to the url panel. Sure! Thank you for the nice feature. Definitely something I will use. Thoughts? -- John Foerch From David.Kettler at dsto.defence.gov.au Thu Oct 30 20:29:05 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 31 Oct 2008 13:59:05 +1030 Subject: [Conkeror] [PATCH] find-url with blank url reloads buffer. In-Reply-To: <87r65x5x4f.fsf@earthlink.net> References: <87bpx492hp.fsf@earthlink.net> <87y7066gxt.fsf@earthlink.net> <87r65x5x4f.fsf@earthlink.net> Message-ID: > Thoughts? I like it. Something I never liked in firefox was that you couldn't be sure whether something typed would be interpreted as a url, a mozilla keyword or something to pass to a search engine. And you couldn't tell what keywords were defined. That doesn't arise in conkeror because the completion system gives feedback on how the string will be interpreted. So I think a default-webjump thing would work well. I'm happy to put some effort into the easy version; it seems straightforward enough, if I can figure out the validation part. The difficult version sounds very nice but it's beyond my current knowledge and I won't be able to invest the time into it for a long while. Perhaps that can be left as a longer term goal. regards, David. -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From David.Kettler at dsto.defence.gov.au Thu Oct 30 23:07:46 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 31 Oct 2008 16:37:46 +1030 Subject: [Conkeror] [PATCH] Typing a substring of a hint now respects a disabled hints_auto_exit_delay. Message-ID: Previously if hints_auto_exit_delay was set to zero a link would be followed as soon as an unambiguous substring was typed. Further typing was then interpreted as keystroke commands. --- modules/hints.js | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/modules/hints.js b/modules/hints.js index a397afa..64f1f31 100644 --- a/modules/hints.js +++ b/modules/hints.js @@ -441,7 +441,8 @@ hints_minibuffer_state.prototype = { this.manager.current_hint_number = -1; this.manager.update_valid_hints(); if (this.auto_exit) { - if (this.manager.valid_hints.length == 1) + if (this.manager.valid_hints.length == 1 + && hints_auto_exit_delay > 0) this.handle_auto_exit(m, hints_auto_exit_delay); else if (this.manager.valid_hints.length > 1 && hints_ambiguous_auto_exit_delay > 0) -- 1.6.0.2.605.g208f6.dirty -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From David.Kettler at dsto.defence.gov.au Thu Oct 30 23:09:28 2008 From: David.Kettler at dsto.defence.gov.au (David Kettler) Date: 31 Oct 2008 16:39:28 +1030 Subject: [Conkeror] [PATCH] Added page mode for the Gmane mailing list archive. Message-ID: This just arranges to pass keystrokes through to the Loom web interface to the Gmane news spool. --- modules/page-modes/gmane.js | 85 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 85 insertions(+), 0 deletions(-) create mode 100644 modules/page-modes/gmane.js diff --git a/modules/page-modes/gmane.js b/modules/page-modes/gmane.js new file mode 100644 index 0000000..81620ce --- /dev/null +++ b/modules/page-modes/gmane.js @@ -0,0 +1,85 @@ +/** + * (C) Copyright 2008 David Kettler + * + * Use, modification, and distribution are subject to the terms specified in the + * COPYING file. +**/ + +require("content-buffer.js"); +require("bindings/default/content-buffer/normal.js"); + +define_keymap("gmane_keymap", $parent = content_buffer_normal_keymap); + + +/* Rebind most overridden commands. */ +define_key(gmane_keymap, "C-c c", "copy"); +define_key(gmane_keymap, "C-c +", "zoom-in-text"); +define_key(gmane_keymap, "C-c -", "zoom-out-text"); +define_key(gmane_keymap, "C-c f", "follow"); +define_key(gmane_keymap, "C-c l", "go-back"); + + +/* + The f keystroke is hard to live without; put this in rc to restore it: + define_key(gmane_keymap, "f", "follow"); +*/ + +/* + Loom keystrokes. http://gmane.org/loom-help.php + + SPC Page down, then next article + DEL Page up the current article + n Select the next unread article + p Select the previous unread article + N Select the next article + P Select the previous article + + Go to the next page + - Go to the previous page + f Go to the first page + l Go to the last page + c Catch up -- mark all articles as read + C Clear -- mark all articles as unread + R Refresh the group + < Go to the first article on the page + > Go to the last article on the page + . Go to the first article currently displayed in the frame + down Move focus to the next subject + up Move focus to the previous subject +* q Quit and go to the list of groups + S Report the current article as spam +* D Disable all Loom keystrokes + + Keystrokes marked with * are not passed through in this mode. + + There's a disable, but no enable. Maybe should provide a way to + switch the keymap in and out. +*/ + +define_key(gmane_keymap, "space", null, $fallthrough); +define_key(gmane_keymap, "back_space", null, $fallthrough); +define_key(gmane_keymap, "n", null, $fallthrough); +define_key(gmane_keymap, "p", null, $fallthrough); +define_key(gmane_keymap, "N", null, $fallthrough); +define_key(gmane_keymap, "P", null, $fallthrough); +define_key(gmane_keymap, "+", null, $fallthrough); +define_key(gmane_keymap, "-", null, $fallthrough); +define_key(gmane_keymap, "f", null, $fallthrough); +define_key(gmane_keymap, "l", null, $fallthrough); +define_key(gmane_keymap, "c", null, $fallthrough); +define_key(gmane_keymap, "C", null, $fallthrough); +define_key(gmane_keymap, "R", null, $fallthrough); +define_key(gmane_keymap, "<", null, $fallthrough); +define_key(gmane_keymap, ">", null, $fallthrough); +define_key(gmane_keymap, ".", null, $fallthrough); +define_key(gmane_keymap, "down", null, $fallthrough); +define_key(gmane_keymap, "up", null, $fallthrough); +define_key(gmane_keymap, "S", null, $fallthrough); + + +define_page_mode("gmane_mode", "Gmane", + $enable = function (buffer) { + buffer.local_variables.content_buffer_normal_keymap = gmane_keymap; + }); + +var gmane_re = build_url_regex($domain = /(news|thread)\.gmane/, $tlds = ["org"]); +auto_mode_list.push([gmane_re, gmane_mode]); -- 1.6.0.2.605.g208f6.dirty -- IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. From marting at gmx.ch Fri Oct 31 00:58:53 2008 From: marting at gmx.ch (marting at gmx.ch) Date: Fri, 31 Oct 2008 08:58:53 +0100 Subject: [Conkeror] bugfix: minibuffer history if match required References: <87vdw6ddpm.fsf@gmx.ch> <87y7087kvu.fsf@earthlink.net> <87wsfssa1r.fsf@jeremyms.com> Message-ID: <87y705mc02.fsf@notebook.home> Jeremy Maitin-Shepard writes: [..] > This patch does work because there is no guarantee that the match value > that is returned to the caller is actually a suitable value for the user > to have typed, since getting a value from the history is equivalent in > terms of the completion system to the user having typed it. In > particular, the match value might not even be a string. Notice that > with this patch, if you use C-x b, pick something, and then open C-x b > again, and look at the history, you'll see that [Object object] is > listed, because with switch-to-buffer, the match value is the actual > buffer itself, not a string. Indeed, I wasn't aware of that problem. Is the buffer history the only one not storing strings? > I agree that what you want is a useful feature in some cases like when > completing a URL, but I think it would require some change to the > completion system in order for it to work. Even then, it is not clear > how to make it work with switch-to-buffer. It wasn't so much in the case of urls that I thought it would be useful since in this case auto completion already does what I want (namely it has the effect that what is stored in the history is the url I ended up visiting). It was actually in the case of the command history since having entries like "cmd_" in the history didn't seem to me to be very useful. Of course, a workaround to this would be to enable auto completion for the command history as well -- but how to do this? It seems like minibuffer_auto_complete_preferences is ignored in this case. Is that right? And why? -- Martin From marting at gmx.ch Fri Oct 31 01:34:02 2008 From: marting at gmx.ch (marting at gmx.ch) Date: Fri, 31 Oct 2008 09:34:02 +0100 Subject: [Conkeror] bugfix: minibuffer history if match required In-Reply-To: <87y705mc02.fsf@notebook.home> (marting@gmx.ch's message of "Fri, 31 Oct 2008 08:58:53 +0100") References: <87vdw6ddpm.fsf@gmx.ch> <87y7087kvu.fsf@earthlink.net> <87wsfssa1r.fsf@jeremyms.com> <87y705mc02.fsf@notebook.home> Message-ID: <87tzatmadh.fsf@notebook.home> marting at gmx.ch writes: [..] > Of course, a workaround to this would be to enable auto completion for > the command history as well -- but how to do this? It seems like > minibuffer_auto_complete_preferences is ignored in this case. Is that > right? And why? Please ignore what I said above. I now see that minibuffer_auto_complete_preferences is not the right variable for this anyway. My question was actually this: Is it possible to make the command history behave as for example the url history in that selecting an entry in the completion panel automatically updates the minibuffer input? And I now realize that this can be done only by setting match_required to false or by changing the condition whether to update the minibuffer input to not depend on match_required (but on a new user variable, say). But I guess you wouldn't want to change that, right? -- Martin From jjfoerch at earthlink.net Fri Oct 31 08:18:46 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Fri, 31 Oct 2008 11:18:46 -0400 Subject: [Conkeror] [PATCH] find-url with blank url reloads buffer. References: <87bpx492hp.fsf@earthlink.net> <87y7066gxt.fsf@earthlink.net> <87r65x5x4f.fsf@earthlink.net> Message-ID: <87mygk6be1.fsf@earthlink.net> David Kettler writes: >> Thoughts? > > I like it. > > Something I never liked in firefox was that you couldn't be sure > whether something typed would be interpreted as a url, a mozilla > keyword or something to pass to a search engine. And you couldn't > tell what keywords were defined. That doesn't arise in conkeror > because the completion system gives feedback on how the string will be > interpreted. So I think a default-webjump thing would work well. > > I'm happy to put some effort into the easy version; it seems > straightforward enough, if I can figure out the validation part. The > difficult version sounds very nice but it's beyond my current > knowledge and I won't be able to invest the time into it for a long > while. Perhaps that can be left as a longer term goal. > > regards, David. Sounds good to me. I can see that modular completions are going to be a very involving feature to implement, if we end up doing it that way. -- John Foerch From jjfoerch at earthlink.net Fri Oct 31 09:56:15 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Fri, 31 Oct 2008 12:56:15 -0400 Subject: [Conkeror] [PATCH] Added page mode for the Gmane mailing list archive. References: Message-ID: <87iqr866vk.fsf@earthlink.net> David Kettler writes: > This just arranges to pass keystrokes through to the Loom web > interface to the Gmane news spool. Thank you. Applied. -- John Foerch From jjfoerch at earthlink.net Fri Oct 31 11:48:27 2008 From: jjfoerch at earthlink.net (John J Foerch) Date: Fri, 31 Oct 2008 14:48:27 -0400 Subject: [Conkeror] [PATCH] Typing a substring of a hint now respects a disabled hints_auto_exit_delay. References: Message-ID: <87ej1w61ok.fsf@earthlink.net> David Kettler writes: > Previously if hints_auto_exit_delay was set to zero a link would be > followed as soon as an unambiguous substring was typed. Further > typing was then interpreted as keystroke commands. Hi David, When hints_auto_exit_delay is 0, no auto-exit is supposed to happen at all, as it says in the docstring. If that is broken, there must be a deeper bug involved in the handling of the variable hints_minibuffer_state.auto_exit. I'm also noticing the strange ways in which hints_auto_exit_delay and hints_ambiguous_auto_exit_delay are getting passed around in hints.js, with separate handling of number keys (hints-handle-number command) vs. other characters (hints_minibuffer_state.handle_input). I think this calls for a deeper refactoring, possibly removing the command hints-handle-number. Thoughts? -- John Foerch