[Techtalk] Double-click selection of words in Firefox

Riccarda Cassini riccarda.cassini at gmx.de
Wed May 26 19:30:33 EST 2004


Akkana Peck wrote:
> Riccarda Cassini writes:
> > I'd like to extract only the pure numbers (without the trailing comma
> > or dot) by double-clicking on them, to then cut-and-paste them into
> 
> Happily, the one thing you can do is make it stop at punctuation.
> 
> In mozilla, it's easy: go to your mozilla profile directory
> (probably ~/.mozilla/profilename/blahblah -- wherever prefs.js is)
> and edit user.js (create the file if it isn't already there).
> Add this line:
> 
> user_pref("layout.word_select.stop_at_punctuation", true);

That was exactly the info I needed to get me going on this...
Thank you very much, Akkana!

I tried sticking that line into all the prefs.js files I could find.
Sadly, though, no effect whatsoever at first.  Okay, I have to confess
I wasn't actually using Firefox, but still the previous version called
Firebird  (when will it be called Firehawk, btw? ;-)

So, I figured it was my fault... and a good opportunity to finally
upgrade to Firefox. I downloaded the current stable version 0.8.
Unfortunately, that didn't want to run at all, because my libc was too
old - at work I'm currently sitting at an old SuSE 7.2 box, which I
can't upgrade for reasons beyond the scope of this mail...  So, I tried
to get Firefox working with a newer libc, while leaving everything else
as is - I didn't really feel like attempting open heart surgery...

Well, this little project turned out to be considerably more involved
than I'd ever imagined. I quite naively thought that prepending some
directory (where the new libc.so.6 lives) to LD_LIBRARY_PATH would
do ... :-)  Good laugh!  Several hours later, and with lots of help
from a very patient coworker, I finally had it working.  At least I
learnt a lot about things like ld-linux.so, chroot environments (which
we eventually gave up), patching binaries, and whatever else we were
trying...

To be correct, the current standard Firefox version 0.8 still doesn't
work, but I'm not sure whether this has anything to do with the libc
issue (the binary "firefox-bin" simply quits, immediately, without any
error message or coredump - return code 0 ...).  However, that same 0.8
version, but localized to a german appearance, works just fine. 
Problem is, I generally don't like localized versions. So next, I
downloaded the most recent nightly build, which is also running fine. 
Anyway, I now had two working versions to play around with...

> 
> Unfortunately, firefox seems to have a problem with reading user
> prefs; in many (not all) cases, prefs specified by the user are
> simply ignored.  So for firefox, you'll have to edit the system
> prefs, probably something like /etc/mozilla-firefox/pref/unix.js.
> Look for the stop_at_punctuation line, and change it from false
> to true.  (Then please file a bug against firefox for not honoring
> user preferences!  If it's not already filed.)

My conclusions with respect to my initial problem are as follows:

Firefox 0.8 (stable/deDE-localized):

"layout.word_select.stop_at_punctuation" works as intended, but only
if you put it in the system-wide preference file unix.js [*]. The user
specific prefs.js is ignored in this case.

Firefox 0.8+ (nightly build):

"layout.word_select.stop_at_punctuation" has a weird interaction with
another option "layout.word_select.eat_space_to_next_word".  If the
latter is set to true, the former works as intended, except that
trailing blanks are selected as well (I guess that's what is meant by
eat_space_to_next_word). When eat_space_to_next_word is false,
stop_at_punctuation only works at the beginning of the word - at the
end, punctuation is still included in the selection ;-(

On the other hand, the settings are now honored, if you put them in
the user specific prefs.js, or even in user.js (in the same directory),
which is supposed to override settings in prefs.js.  In contrast to
prefs.js, user.js is not automatically rewritten upon exit of the
browser.  If you make a change to user.js, however, you have to start
the browser twice: upon first start, settings from user.js are
transferred to prefs.js, where they'll then take effect for the second
run.  The system-wide default configs have been reworked completely,
too. No more all.js and unix.js.
Obviously, this is still work in progress...

Anyhow, I'm more or less satisfied with the overall results ;-)


BTW, while looking through all of the available options for prefs.js,
I discovered, that there still is that option

  user_pref("image.animation_mode", "once");

which I loved so much when I first came across Phoenix, as the browser
was called at the time.  That was one of the primary reasons that made
me switch from standard Mozilla to Phoenix (besides its general light-
weightedness). It made animated GIFs cycle just once, so there was no
more endlessly blinking crap in all five corners of every other page!
Unfortunately, the developers had removed that ingenious option again
in later versions - well, I thought so, as it wasn't UI-settable any
longer.
(Actually, I have no idea why they'd removed it from the UI, maybe some
threat by those joint forces interested in web ads :-)  Anyone knows?)


> There is some debate over whether this should be the default on
> Linux/Unix platforms.  The down side is that this applies
> everywhere, including the urlbar; so doubleclicking will no
> longer select the whole url, so you have to triple-click to select
> a url.  Opinion is split roughly 50-50 over which way is better.

If anybody would ask *me*, some keyboard shortcut popping up a dialog
box where you can choose between different preconfigured settings at
runtime, would be optimal - independently of whether the urlbar would
get a seperate treatment.  I don't think that there is any "right way"
to do it - depending on the task at hand, different settings are 
optimal...

Riccarda


[*] BTW, unix.js apparently overrides the settings in all.js, which
explains the different default behaviour under Windows und Unix: in
all.js "layout.word_select.stop_at_punctuation" is set to true, while
in unix.js, it is set to false.



-- 
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info



More information about the Techtalk mailing list