From: harven <harven@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: How do you run your scripts efficiently?
Date: Tue, 16 Sep 2008 09:24:59 -0700 (PDT) [thread overview]
Message-ID: <a294b6fd-33c8-4494-a4a7-61b09e4956f6@8g2000hse.googlegroups.com> (raw)
In-Reply-To: ictzcggpxz.fsf@verizon.net
On Sep 16, 3:50 pm, Dan Espen <dan...@MORE.mk.SPAMtelcordia.com>
wrote:
> "Ben Aurel" <ben.au...@gmail.com> writes:
> > hi
> > I work mostly in vim, although I'm not a very advanced vim user. The
> > problem is I can't find a simple way to easily run a perl script and
> > capture its output.
>
> > I've tried different things but I'm still *very* unsatisfied with the
> > implementation of the following basic workflow:
>
> > 1. Edit a perl script in the editor
> > 2. Press one key (eg. F5) to save and run the script
> > 3. Print the output to a window below the editor window
> > 4. Possibility to easily switch to the output window and scroll
> > through the messages
> > 5. Possibility to easily switch back to the editor window
>
> Run the Perl script under M-x compile
> compile will offer to save the file if it's not already saved.
>
> I bind compile to F1:
>
> (define-key global-map [(f1)] 'compile)
>
> Compile wants to use "make".
> If you don't want to use a makefile
> put this at the bottom of the perl-file:
>
> # Local Variables:
> # compile-command: "./perl-script"
> # End:
>
> To switch to the other window, use M-x other-window,
> I do this enough that I bind it to F10:
>
> (define-key global-map [(f10)] 'other-window)
>
> I think that covers all 5 issues above.
I think M-x compile print the result of the compilation process in
another window. As far as I understand, the OP wants the actual output
of the script to be displayed in another window. This can be done by
putting the following in the initfile.
(global-set-key (kbd "<f5>") (lambda ()
(interactive)
(save-buffer)
(shell-command (buffer-file-name))))
next prev parent reply other threads:[~2008-09-16 16:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.19322.1221540524.18990.help-gnu-emacs@gnu.org>
2008-09-16 13:50 ` How do you run your scripts efficiently? Dan Espen
2008-09-16 16:24 ` harven [this message]
2008-09-16 20:18 ` Xah
2008-09-14 15:13 Ben Aurel
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=a294b6fd-33c8-4494-a4a7-61b09e4956f6@8g2000hse.googlegroups.com \
--to=harven@free.fr \
--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.