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

Re: vm mailer questions

Tim Cross <tcross@tim.northnet.com.au> writes:

   ... or you can do a cut/copy and paste using the clipboard (which
   can be slow for large amounts of data).

You must deal with very large amounts of data.  I don't run into your problems.

As a test, using GNU Emacs 20.2, I just cut and pasted 2,544,356 bytes
from one buffer to another.  I did not perceive any time delay.
Granted, I am using a fairly large and fast home-built system, but
still, mostly I cut and paste far smaller amounts of text.  Cutting
and pasting are fast.

Nor do I remember any serious delays from cutting and pasting in the
past, when I used far smaller systems.

Here is what I did:

    1. Mark whole buffer using `Control-x h'

    2. Copy entire marked region, the whole buffer, using `Meta-w'

    3. Switch to other buffer using `Control-x b'

    4. Yank whole of text from Emacs' clipboard using `Control-y'

I mention this since, in my experience, good use of Emacs turns on two
skills: search and copy.

Firstly, I frequently using `Control-s' incremental search within a
buffer, `grep' and `igrep' among files in a directory, and `locate' to
find files.

Secondly, having found my topic, I frequently mark a region, then copy
the region using using `Meta-w', and paste it elsewhere using

All these procedures are remarkably fast, even the relatively slow
`grep' command.


If you have not come across the term yet, `grep' is a command for a
generalized regular expression search.  That is to say, `grep' is a
pattern search that uses a regular expression or regexp.  `Meta-x
grep' can be run in Emacs to search for patterns in files in a

`grep' takes a bit of learning, both to master regular expressions and
to learn the other arguments to grep.  You may not want to progress to
it right away, but it is well worth getting to soon.  

Inside a buffer, you can practice incremental regular expression
searches using the `Meta-Control-s' (isearch-forward-regexp) command.
And, the `Control-h a' apropos command that you came across several
days ago uses regular expression

`igrep' is another Emacs command that runs grep in a directory.  In
addition to offering a somewhat easier to use interface than plain
`grep' it searches for patterns in sub-directories below the target
directory.  This is very convenient when you really cannot remember
where some phrase is located.

However, `igrep' not a part of the standard Emacs distribution.  As
far as I can determine, this is because the author, Kevin Rodgers, did
not obtain proper legal papers from his employers, so you cannot be
sure that he had the legal right to copyright the code as he did in
each of the years 1994, 1995, 1996, 1997, and 1998.  The Emacs Lisp
library file says:

     ;;; Neither my former nor current employer (Martin Marietta and
     ;;; Information Handling Services, respectively) has disclaimed any
     ;;; copyright interest in igrep.el.

This opens a user up to a possible claim from either company for your
use of their property.

The good news is that, as far as I know, neither Martin Marietta nor
Information Handling Services have tried to claim ownership of Rodgers
work.  If you were to be sued, you might be able to argue that the
companies have lost their rights to the code for lack of earlier
enforcement.  (Disclaimer: I am not a lawyer.)

(Hackers are often quite naive about legal issues.  You would think
that they would pick up some real world savy, but they don't.  They
act as if the world is made up only of good guys and that no one goes
to court.  For example, the problems with the XEmacs - Emacs split no
longer have anything to do with technical issues, but that law-abiding
institutions do not distribute code that opens them up to court cases
that they would lose.)

A 1997 version of igrep is available in


8 kilobytes, gzip'd.  I don't remember where I picked up my newer version.

As for `locate':  `locate' is a program that searches through a
pre-created database of file names.  The database is created using
`updatedb', a front end for the `find' command.  Usually your computer
system runs `updatedb' sometime in the early morning hours when you
are expected to be asleep.  The advantage of `locate' is that it
enables you to find files when you vaguely remember their names but
have forgot where you put them.

`Meta-x locate' may be a part of the standard Emacs 20.3 distribution.
I don't know since I have not bothered to update to that version of
Emacs.  Instead, I use an earlier version of `locate' that was
distributed among the Emacs sources mailing list.  I could send you a
copy of this version if you like.

Best wishes.


    Robert J. Chassell                  bob@rattlesnake.com
    Rattlesnake Enterprises             http://www.rattlesnake.com

       To unsubscribe or change your address send mail to
"emacspeak-request@cs.vassar.edu" with a subject of "unsubscribe" or "help"

Emacspeak Files | Subscribe | Unsubscribe