[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Lynx-dev] FW: [emacspeak The Complete Audio Desktop] Emacspeak: Connect
From: |
Lloyd Rasmussen |
Subject: |
[Lynx-dev] FW: [emacspeak The Complete Audio Desktop] Emacspeak: Connecting Lynx And W3 |
Date: |
Fri, 24 Feb 2006 21:23:05 -0500 |
FYI. Here's an example of use of Lynx as a fallback option in T.V. Raman's
talking EMACS system. I hope that the bounce + Outlook don't mess up the
code embedded below.
-----Original Message-----
From: T. V. Raman (by way of Lloyd Rasmussen <address@hidden>)
[mailto:address@hidden
Sent: Friday, February 24, 2006 8:33 AM
To: address@hidden
Subject: [emacspeak The Complete Audio Desktop] Emacspeak: Connecting Lynx
And W3
Emacs/W3 is still the best Web page rendering option inside Emacspeak given
the ability to apply XSL transforms, as well as obtaining aural styling via
ACSS. However W3's url handling layer often breaks when faced with multiple
redirects, especially when some of these happen through the Host: HTTP
header. Additionally, HTTPS authentication sometimes fails mysteriously in
the presence of redirects.
In many of these cases, lynx happily fetches the pages correctly; however
you're then stuck using a fairly weak auditory interface in that Emacspeak
degrades to being aterminal level screenreader.
An effective solution to this problem is to use lynx within an Emacs
terminal, and after finding the content that is worth reading, handing off
that content to Emacs/W3. The next few paragraphs show how.
The lynx-site.cfg File
This is where you add site-specific configurations. Here are the lines I
have in my lynx-site.cfg to integrate lynx and Emacs. Before you use any of
this, make sure you have executed M-x server-start in your running Emacs,
and make sure that all is well by experimenting with emacsclient to ensure
that external programs can hand-off editting tasks to the currently running
Emacs.
#site defaults
#for bookshare:
DOWNLOADER:BKS Unpack:bks.pl %s %s:TRUE
PRINTER:Edit:emacsclient %s:TRUE
KEYMAP:???:EDITTEXTAREA # use external editor to edit a form textarea
PRETTYSRC:TRUE
SOURCE_CACHE:MEMORY
SAVE_SPACE:~/.wget/
BOLD_HEADERS:TRUE
PRINTER:W3:emacsclient -e '(w3-open-local "%s")':TRUE
Below, I'll describe what each of the above lines do:
* DOWNLOADER:BKS Unpack:bks.pl %s %s:TRUE The above line creates an
additional item in the download menu that invokes the BookShare unpacker.
Script bks-unpack.pl invokes the BookShare unpack tool with the appropriate
options.
* PRINTER:Edit:emacsclient %s:TRUE This creates an Edit item in the
print menu. Invoking this menu item causes the current page to be handed
off to Emacs for editting. If you want to edit the source, first switch to
source view by hitting \ before invoking print.
* KEYMAP:???:EDITTEXTAREA# use external editor to edit a form textarea
This sets lynx up so that when editting a multiline textarea, you can hand
off the editting job to Emacs. This is particularly useful for editting
Wiki pages. Replace the ?? with the desired key sequence.
* PRETTYSRC:TRUE SOURCE_CACHE:MEMORY The above two settings make the
edit source functionality more pleasant to use.
* PRINTER:W3:emacsclient -e '(w3-open-local "%s")':TRUE The above
creates a W3 menu item in the print menu. Invoking this causes Emacs/W3 to
display the current page --- again switch to source view before invoking
this so that Emacs/W3 gets handed the HTML markup.
Script bks-unpack.pl
#!/usr/bin/perl -w
#$Id: bks.pl,v 1.1 2003/07/04 15:41:55 tvraman Exp tvraman $
#Description: Bookshare downloader for Lynx
use strict;
my $location="$ENV{HOME}/books/book-share";
my $password = 'xxxxxxx';
my $grabbed = shift;
my $target = shift;
my $dir =qx(basename $target .bks);
chomp $dir;
my $where = "$location/$dir";
qx(mkdir -p $where);
qx(mv $grabbed $where/$target);
chdir $where;
qx(echo $password | bks-unpack -q $target 1>&- 2>&- &);
--Posted by T. V. Raman to
<http://emacspeak.blogspot.com/2006/02/emacspeak-connecting-lynx-and-w3.html
>emacspeak
The Complete Audio Desktop at 2/23/2006 06:58:43 PM
----------------------------------------------------------------------------
- [Lynx-dev] FW: [emacspeak The Complete Audio Desktop] Emacspeak: Connecting Lynx And W3,
Lloyd Rasmussen <=