[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Search]
Re: question about emacspeak-websearch
Those ines of code in emacspeak-websearch deserved to be deleted and
are now gone.
However your assertion that its presence meant that you couldn't use
emacspeak-websearch unless w3 was installed was incorrect--
it set up browse-url to use W3 if and only if W3 was installed.
Note that some of emacspeak-websearch's functionality --in fact quite
a lot of its advanced functionality-- may not work with w3m --
--Raman >>>>> "Yvonne" == Yvonne Thomson <yvonne@xxxxxxxxxxx> writes:
Yvonne> At Fri, 26 Sep 2003 13:22:23 +1000, Tim Cross wrote:
>> Hi Yvonne,
>>
>> Whenever I need to change the way something in emacspeak works,
>> or for that matter any other emacs code, I find emacs' advice
>> facility (see defadvice and the emacs lisp manual for details),
>> very useful. Its main advantage is that you can modify a
>> functions behavior without editing the original code - this
>> avoids having to re-edit everytime you do an upgrade. In fact,
>> emacspeak makes extensive use of this facility itself. Its also
>> very simple - essentially, you are writing a "wrapper" function
>> which can be used to alter inputs before they are passed to the
>> original function, alter the return value from the function or
>> totally replace the function.
>>
Yvonne> Thanks, for this, but I knew about advice. The problem is,
Yvonne> the code involved isn't a function. It evaluates, as far
Yvonne> as I can tell, after emacspeak-websearch loads, using
Yvonne> eval-after-load, and then changes browse-url to use w3. I
Yvonne> have no idea how to change something like this with
Yvonne> external code. Any help here would be much appreciated.
>> One minor correction to a statement in your post. You don't
>> have to have w3 installed to do web browsing within
>> emacs/emacspeak. Other alternatives are w3m and lynx within a
>> terminal window.
>>
Yvonne> Er, I know about the alternatives. I'm using w3m, that's
Yvonne> why I'm dealing with this in the first place. But
Yvonne> emacspeak support for w3m still appears to require the
Yvonne> emacspeak w3 code, in order to deal with xslt, which makes
Yvonne> separating the browsers at this point a bit awkward.
>> It may be possible for Raman to add a customize setting to
>> select the preferred web browser. However, this can sometimes
>> be difficult because in some instances, there is no 1-to-1
>> mapping of functions between w3 and w3m - that is to say, where
>> in w3 you may be able to achieve some particular functionality
>> with just minor coding, doing the same within a different
>> browser may require considerably more coding. Raman favors w3
>> over w3m because it offers some features which are not
>> available in other browsers like w3m. For example, w3 supports
>> auditory cascading style sheets (ACSS) which makes it very easy
>> to define a style sheet which will use certain audio attributes
>> for various html elements.
>>
Yvonne> I *know* what the drawbacks are. Trust me on this. I've
Yvonne> been using emacspeak long enough to know this. As a user,
Yvonne> I prefer to trade off a way, *way* faster browser
Yvonne> experience for the emacspeak facilities available with
Yvonne> w3. That's my choice to make. Since I've tried to hack
Yvonne> some features that are in emacspeak-w3 that aren't in
Yvonne> emacspeak-w3m, I also know that it's difficult, if not
Yvonne> impossible, to achieve some effects *without*
Yvonne> w3. Searching the web with emacspeak-websearch, however,
Yvonne> doesn't seem to be one of them. I know this, since if I
Yvonne> run the emacspeak wizard that already exists, to change
Yvonne> the browser back to w3m, it runs just fine.
>> Finally, Raman is often more receptive to making changes if the
>> request includes patches or lisp code which either achieves the
>> required modification or goes a long way to doing the job. The
>> main reason for this is because he often doesn't have the time
>> to actually do the changes himself. so, if you work out some
>> functions to add the ability to select the preferred browser
>> for operations like web searching and provide them along with
>> your request, the likelyhood of them being added to the
>> standard distribution is higher.
>>
Yvonne> Perhaps, but I don't really know that I'm good enough with
Yvonne> elisp to go there. Not to mention I'm not entirely sure
Yvonne> where I would go with this behaviour. Emacs already
Yvonne> specifies a way to specify which browser is used for web
Yvonne> requests, browse-url. I'm not sure that adding another
Yvonne> version that specifys the browser you want to use for
Yvonne> emacspeak web requests vs normal web requests is quite the
Yvonne> right way to go. On the other hand, an option in
Yvonne> emacspeak-websearch which specifies whether to use w3 or
Yvonne> some other web browser for searches seems a little
Yvonne> specific. As a user, and not an author, I don't really see
Yvonne> why the code I'm talking about is in there at all, and
Yvonne> without knowing the reasoning, I have no idea how I'd go
Yvonne> about patching it to add the customization I'm looking for
Yvonne> here.
>> I strongly recommend checking out emacs' advice mode. You can
>> find lots of examples of its use within emacspeak. I would have
>> to say I have found it to be one of the most powerful and
>> simple mechanisms for modifying emacs/emacspeak's
>> behavior. Often, when I think there is some part of emacs which
>> I would like to behave differently, I will first attempt to
>> achieve the different functionality via defadvice, use it for a
>> while and possibly refine it. Once it has stabilized and
>> appears to be working well, I may then either convert this into
>> a stand-alone mode or submit patches to the package
>> author. However, most of the time, a simple defadvice is
>> sufficient and I just leave it in my personal advice .el file
>> which I load at startup.
>>
Yvonne> I've used advice myself, mostly for adding speech to my
Yvonne> own functions or giving packages that don't at least a
Yvonne> minimum of emacspeak ability. If I'd been a better elisp
Yvonne> programmer, and known what to do in the case of something
Yvonne> not actually being a function, I think I'd've done that,
Yvonne> and not bothered the list with it, which is my usual way
Yvonne> of dealing with these things.
Yvonne> Thanks for your help
Yvonne> -----------------------------------------------------------------------------
Yvonne> To unsubscribe from the emacspeak list or change your
Yvonne> address on the emacspeak list send mail to
Yvonne> "emacspeak-request@xxxxxxxxxxx" with a subject of
Yvonne> "unsubscribe" or "help"
--
Best Regards,
--raman
Email: raman@xxxxxxxxxxx
WWW: http://emacspeak.sf.net/raman/
AIM: TVRaman
PGP: http://emacspeak.sf.net/raman/raman-almaden.asc
IRC: irc://irc.gnu.org/emacspeak
-----------------------------------------------------------------------------
To unsubscribe from the emacspeak list or change your address on the
emacspeak list send mail to "emacspeak-request@xxxxxxxxxxx" with a
subject of "unsubscribe" or "help"
Emacspeak Files |
Subscribe |
Unsubscribe | Search