[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
convert current working directory to perl package name
From: |
metaperl |
Subject: |
convert current working directory to perl package name |
Date: |
Tue, 04 May 2010 15:44:04 -0000 |
User-agent: |
G2/1.0 |
hello,
I would like to create a simple interactive Emacs Lisp function.
When invoked, this command will obtain the current directory as a full
pathname:
/home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/Recipe/Searching
It will then get rid of everything from the start of line to (and
including) lib:
DBIx/Cookbook/Recipe/Searching
Then it will replace each forward slash with "::"
DBIx::Cookbook::Recipe::Searching
The resulting string will be put into the buffer at point.
I've written a macro to do this, but dont know how to save a macro as
a command to my .emacs.el file
- convert current working directory to perl package name,
metaperl <=