From: Emanuel Berg <incal@dataswamp.org>
To: help-gnu-emacs@gnu.org
Subject: Re: shell-command-on-region but with command line arguments
Date: Mon, 07 Nov 2022 18:22:57 +0100 [thread overview]
Message-ID: <87mt92of0u.fsf@dataswamp.org> (raw)
In-Reply-To: CAKoxK+7sqG8Tc9P+pij_NF_yCm_taVgYxN4yZa4ecHJ9ytJG4A@mail.gmail.com
Luca Ferrari wrote:
> (defun fluca1978/run-perl-on-region () [...]
No real need for any -region functions IMO, check this out.
(This, in turn should be integrated in `interactive' and/or
`defun', see the other thread ... `cl-defun' with it's default
values is interesting, in principle we could even decouple
argument docstrings and have all that fully automated except
for the reading and writing parts ...)
(defun use-region ()
(when (use-region-p)
(list (region-beginning) (region-end)) ))
(defun test-dwim (&optional beg end)
(interactive (use-region))
(or beg (setq beg (point-min)))
(or end (setq end (point-max)))
(message "%d %d" beg end) )
https://dataswamp.org/~incal/emacs-init/dwim.el
--
underground experts united
https://dataswamp.org/~incal
next prev parent reply other threads:[~2022-11-07 17:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 15:51 shell-command-on-region but with command line arguments Luca Ferrari
2022-11-07 17:22 ` Emanuel Berg [this message]
2022-11-07 19:21 ` Bruno Barbier
2022-11-08 0:13 ` Emanuel Berg
2022-11-09 7:21 ` Luca Ferrari
2022-11-09 7:53 ` Bruno Barbier
2022-11-09 10:37 ` Emanuel Berg
2022-11-09 11:40 ` Luca Ferrari
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=87mt92of0u.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--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.