Emacs Find&Replace on files

Replacing on entiere set of files is hard in Emacs. But I find the correct mumbo-magic procedure, and gifted it to you:

  • Call dired to list files in dir, or call find-dired if you need all sub directories.
  • Mark the files you want. You can mark by regex by typing 【%m】.
  • Type Q to call dired-do-query-replace-regexp.
  • Type your find regex and replace string. (➲ common elisp regex pattern)
  • For each occurrence, type y to replace, n to skip. Type 【Ctrl+g】 to abort the whole operation.
  • Type ! to replace all occurrences in current file without asking, N to skip all possible replacement for rest of the current file. (N is emacs 23 only)
  • To do the replacement on all files without further asking, type Y. (Emacs 23 only)
  • Call ibuffer to list all opened files.
  • Type 【*u】 to mark all unsaved files, type S to save all marked files, type D to close them all.

See this great article for more information

Code Zauker v0.0.3 is OUT

Are you ready for the news?

Code Zauker v0.0.3 is OUT!

The new version spots

  • Case insensive indexing and searching, at a blazing fast speed.
  • UTF-8 compliant indexing. Best if your code is on another encoding, code zauker try to “guess” the right one and fix it.
  • Richer czsearch options, like the following
$ruby -Ilib bin/czsearch -h
Usage: czsearch [options] [term1] [term2]...
    -i, --ignore-case                ignore case distinctions
    -B, --before-context NUM         print NUM lines of leading context
    -A, --after-context NUM          print NUM lines of trailing context
    -C, --context NUM                print NUM lines of output context
    -X, --exclude FILE_PATTERN       Exclude files that match FILE_PATTERN (as ruby regexp). Case insensitive
    -h, --help                       Display this screen
Options are grep-like
EXAMPLES:
czsearch ciao Koros
 Will search Koros OR ciao
czsearch -i gnu
 Will match also GNU and Gnu
czsearch  -X .orig -X .bak -X .java  html:select
 Will skip java and backup file

 

Take a look at the code on github.

And as usual, you can find the Gem on rubygems.

What do you want next? Open a Github issue with “Feature Request” as label, and let me know what do you think.

SearchBlox is now available as a FREE product with no limitations. | Lucene Search Solution – SearchBlox

On November 12, 2010 SearchBlox  announced the availability of SearchBlox Search Software as a completely FREE product.

 

I took a look to SearchBlox on a  complex project, and I suggest you to give it a try. It is a good solution for small sites, and it is powered by Lucene. Google Mini has a strong brand, but it cost a lot and it had a 2-year resubscription process: a very costly stuff.

Read here the complete story: SearchBlox is now available as a FREE product with no limitations.

Site redesign

This article has been retained for hisorical reasons. In this article we refers to blog.Objectsroot.com a site discontinued on August 2008

After some time, I have decided to start redesigning the content and the look of ObjectsRoot.com
I have slightly reduced the tags section, over-simplifying the access to my huge set of articles. With over 100 posts, there is no need of so much tags.
The search engine will help you to find old articles: do not worry anyway, permalinks will remain valid for a long time!

For a short introduction to the new site look, follow this link

In the next weeks you will see a new site look too, clean and clever… like no one before. Stay tuned!
Updated 14 May 2008: Site redesign is in progress. You will find the new site for the 23th of May. Comments are always wellcome!

Updated 21 may 2008: The basic look is finalized, and will not change.

Updated 6 June 2008: Suggested resolution is 1024×768 or higher. The page is dynamically rendered, anyway an 800×600 resolution is discuraged. Fixed some broken links