all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: metaperl <schemelab@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: convert current working directory to perl package name
Date: Mon, 5 Apr 2010 07:32:15 -0700 (PDT)	[thread overview]
Message-ID: <b9c50470-4715-4388-9a5b-b0cbaa887f40@z4g2000yqa.googlegroups.com> (raw)

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



             reply	other threads:[~2010-04-05 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-05 14:32 metaperl [this message]
2010-04-05 15:00 ` convert current working directory to perl package name Andreas Politz
2010-05-04 20:03 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9c50470-4715-4388-9a5b-b0cbaa887f40@z4g2000yqa.googlegroups.com \
    --to=schemelab@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.