From: Mike Krell <laughingboy_0@yahoo.com>
Subject: problem with save-excursion
Date: Mon, 29 Jul 2002 08:56:59 -0700 (PDT) [thread overview]
Message-ID: <20020729155659.59139.qmail@web20209.mail.yahoo.com> (raw)
Hello,
I've written a little elisp function to run the current buffer
through perl (or any other command). However, the current region is
lost as a result of running the code, even though I'm using save-
excursion. Can anyone help with this?
Thanks,
Mike
defun perl-replace-buffer ()
"Apply perl command to buffer"
(interactive)
(save-excursion
(mark-whole-buffer)
(let ((start (region-beginning))
(end (region-end)))
(shell-command-on-region start end
(read-from-minibuffer "Command: " '("perl -pe \"\"" . 11 ))
t
t
)
)
)
)
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
next reply other threads:[~2002-07-29 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-29 15:56 Mike Krell [this message]
2002-07-29 19:47 ` problem with save-excursion fabrice bauzac
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=20020729155659.59139.qmail@web20209.mail.yahoo.com \
--to=laughingboy_0@yahoo.com \
/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.