From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/13938 Path: main.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.gnus.general Subject: Re: agent off-line and URLs Date: 12 Feb 1998 17:55:50 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: Reply-To: jari.aalto@ntc.nokia.com NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: multipart/mixed; boundary="Multipart_Thu_Feb_12_17:55:49_1998-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035153213 11961 80.91.224.250 (20 Oct 2002 22:33:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:33:33 +0000 (UTC) Return-Path: Original-Received: from xemacs.org (xemacs.cs.uiuc.edu [128.174.252.16]) by altair.xemacs.org (8.8.8/8.8.8) with ESMTP id IAA21737 for ; Thu, 12 Feb 1998 08:01:25 -0800 Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by xemacs.org (8.8.5/8.8.5) with ESMTP id JAA00626 for ; Thu, 12 Feb 1998 09:59:51 -0600 (CST) Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id KAN17803; Thu, 12 Feb 1998 10:36:05 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 12 Feb 1998 09:56:53 -0600 (CST) Original-Received: from claymore.vcinet.com (claymore.vcinet.com [208.205.12.23]) by sina.hpc.uh.edu (8.7.3/8.7.3) with SMTP id JAA02786 for ; Thu, 12 Feb 1998 09:56:41 -0600 (CST) Original-Received: (qmail 10634 invoked by uid 504); 12 Feb 1998 15:56:36 -0000 Original-Received: (qmail 10631 invoked from network); 12 Feb 1998 15:56:36 -0000 Original-Received: from axl01it.ntc.nokia.com (131.228.118.232) by claymore.vcinet.com with SMTP; 12 Feb 1998 15:56:35 -0000 Original-Received: from zeus.tele.nokia.fi (zeus.tele.nokia.fi [131.228.134.50]) by axl01it.ntc.nokia.com (8.8.5/8.6.9) with SMTP id RAA11955 for ; Thu, 12 Feb 1998 17:55:03 +0200 (EET) Original-Received: from pegasus.tele.nokia.fi (pegasus.ntc.nokia.com [131.228.169.148]) by zeus.tele.nokia.fi (8.6.4/8.6.4) with ESMTP id RAA29698 for ; Thu, 12 Feb 1998 17:57:25 +0200 Original-Received: (from jaalto@localhost) by pegasus.tele.nokia.fi (8.7.5/8.7.1) id RAA09638; Thu, 12 Feb 1998 17:55:51 +0200 (EET) Original-To: Ding mailing list X-info: Quassia Gnus v0.22 In-Reply-To: Dave Love's message of "11 Feb 1998 22:27:18 +0000" Original-Lines: 126 X-Mailer: Quassia Gnus v0.22/Emacs 19.34 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:13938 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:13938 --Multipart_Thu_Feb_12_17:55:49_1998-1 Content-Type: text/plain; charset=US-ASCII | 98-02-11 Dave Love list.ding | | Is there a good suggestion for a _simple_ way to use the | results online afterwards? For instance, just invoking browse-url N | times in succession (asynchronously) and emptying the file isn't | right, I think. [I don't know anything about existing implementations | of that sort of thing.] This offline URL cacheing idea facinated me, so I added support to the latest release of my tinyurl.el minor mode. If anybody is interested here is how the story goes: Either: - Turn on tiurl-mode for Gnus buffers and the offline/online detections is automatic. When gnus is unplugged, the urls are stored to *URL-cache* buffer. Go there and push the urls when you're online again. OR - Replace Gnus and TM browser with this snippet and have tinyurl.el package somewhere along load-path. Complete docs for package can be found here. (The new feature is not yet documented in html page, nor it is implemented in the version located in the ftp site, please wait for the news tiny tools release) ftp://cs.uta.fi/pub/ssjaaa/ema-tiny.html#417 Cheers! jari --Multipart_Thu_Feb_12_17:55:49_1998-1 Content-Type: text/plain; charset=US-ASCII (autoload 'tiurl-mode "tinyurl" t t) ;;; ---------------------------------------------------------------------- ;;; (defun my-gnus-browse-and-cache (URL) "Browse the URL if online, else use TinyUrl" (interactive) (setq URL (gnus-strip-whitespace URL)) (if (string= (second gnus-agent-mode-status) " Plugged") (funcall browse-url-browser-function URL) (when (fboundp 'tiurl-mode) ;Let this handle offline URL (cache) (require 'tinyurl) (tiurl-cache-url URL) ))) ;;; ---------------------------------------------------------------------- ;;; (defun my-gnus-art-load-hook () "Override article settings." ;; Replace functions. (defalias 'gnus-button-url 'my-gnus-browse-and-cache) (defalias 'gnus-button-embedded-url 'my-gnus-browse-and-cache) ;; TM occupies Gnus buffers too, redirect the "push" button. (if (featurep 'tm-setup) (defalias 'tm:browse-url 'my-gnus-browse-and-cache)) ) (add-hook 'gnus-art-load-hook 'my-gnus-art-load-hook) (if (featurep 'gnus-art) (my-gnus-art-load-hook)) ;Reload now --Multipart_Thu_Feb_12_17:55:49_1998-1 Content-Type: text/plain; charset=US-ASCII Tinyurl.el -- Marks all urls on current line in any buffer. Overview of features o When this global minor mode is on, wait few seconds and the current line will scanned for url buttons. Because not all terminals show clolor, there is additional "!" character added to the front of URL for calling you to *push* it. o Once the minor mode is turned on, it occupies every buffer, but there is also function to turn the mode on or off per buffer basis, see `tiurl-mode-1'. o Defines binding `mouse-2' and *ESC* *RET* to view the url at point. These bindings are electric: If there is no button to push, call original binding according to underlying mode. o You can change the set of url handler on the fly: eg. call lynx for a while, then switch to Netscape or use your custom browser. o Requirements: In XEmacs, you must have overlay.el package available. [to be added to docs...] Cacheing URLs for later use (offline reading) If you're not connected to the Net, then it doesn't make sense to call browser directly, but instead cache the pushed urls to separate buffer. When you're online again, you can go to the cache buffer and relaunch pointers. The offline reading is usual in Gnus, where you can toggle between "plugged" and "unplugged" Gnus. The default unpluggged condition detector is `tiurl-unplugged-p'. It returns nil if you're running Gnus and it's in unplugged state. You can place your own unlpugged state detector to variable `tiurl-:unplugged-function'. Cache buffer used is `tiurl-:url-cache-buffer', which is *URL-cache* by default. Support for programming language URLs [C/C++] ...snip [Perl] ...snip [lisp] ...snip [Other languages] --Multipart_Thu_Feb_12_17:55:49_1998-1--