gnewsense-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gNewSense-users] Emacs tip for KFV rechecking


From: Bake Timmons
Subject: [gNewSense-users] Emacs tip for KFV rechecking
Date: Tue, 22 Apr 2008 16:42:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Some of us might want to recheck our files for firmware.  To ease any
manual checking, I recommend using the file browsing mode of Emacs
called Dired ("Directory Editor") -- even to those who do not use
Emacs. Dired has nothing to do with KFV Mode, BTW. :)

It's cool and really fast.  Just start up Emacs and type C-x d (while
holding Control, press x; then press d).  Emacs will ask for a path to
examine, and you respond with something such as
/usr/src/linux-2.6.24_12.22/

Then you will get a file listing.  For maximum speed, I often press 'v'
to view a file, then I page through the file however I want, and then I
press 'q' to go back to whatever listing I came from.

Two great keystrokes are C-s and C-r for forward and backward search
incrementally, or, for more power, C-M-s and C-M-r to search with
regular expressions.  (C-M-s means while holding down Control *and* Meta
[typically Alt], press 's'.)

Finally, I challenge anyone to top the M-x re-builder command.  If all
you are doing is just reading files, you will not need this command, but
for anyone who will do some programming with regular expressions, you
should check this out.  This makes a little window underneath the window
that you were in.  This little window has an empty pair of quotes that
you fill in with a regular expression that will try to match on the file
contents in the window above.  Words cannot do this thing justice --
it's just a handy little utility that cleverly uses highlighting to help
you construct and learn how to use regular expressions.  Note that for
regular expressions *within a string* such as this, backslashes that are
needed for, say, C-M-s will need to be doubled.  Thus, C-M-s \\ would
match on a backslash, and the *string* regex equivalent would be "\\\\".
Another tip: "\n" in re-builder matches newline, but using C-M-s or
C-M-r, you would use the C-j keystroke -- weird but you get used to it.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]