Культурный офтопик
 help / color / mirror / Atom feed
From: Alexey Voinov <voins@voins.program.ru>
To: smoke-room@lists.altlinux.org, m.bykov@gmail.com
Subject: Re: [room] emacs shell command = grep ?
Date: Tue, 24 Feb 2009 14:29:26 +0300 (MSK)
Message-ID: <20090224.142926.13451824.voins@voins.program.ru> (raw)
In-Reply-To: <69c7dc8b0902090840j669f72c9l20e888d8a8c73731@mail.gmail.com>

Michael Bykov <m dot bykov at gmail dot com> writes:
> как грепнуть что-то в емаксе?
> 
> мне нужно выполнить цепочку команд, последняя - grep. Как грепу
> передать высвеченный регион? В руководстве прямо про grep примера нет.
> 
> Вот из руководства: высвечиваем регион, (пусть слово word), затем
> выполняем произвольную команду по M-|:
> 
> M-| cat <RET> --> word.
> 
> M-| gpg <RET> - корректно работает. (В gpg регион передается).
> 
> M-| ls <RET> --> правильно отдает список файлов (регион на ls не влияет).
> 
> а как выполнить команду
> 
> M-| ls | grep <RET> ? ---> ошибка.
> 
> здесь регион не передается почему-то. Голову сломал :(
Не усложняй. :)
Выполни сначала M-! ls, выдели что нужно (хоть всё), и потом M-! grep
Можно, конечно, выпендриться, и чуть-чуть обернуть
shell-command-on-region, чтобы при пустом выделении оно посылало на
вход весь буфер.

-- 
Alexey Voinov



      parent reply	other threads:[~2009-02-24 11:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-09 16:40 Michael Bykov
2009-02-10 12:08     ` Evgenii Terechkov
2009-02-24 11:29 ` Alexey Voinov [this message]

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=20090224.142926.13451824.voins@voins.program.ru \
    --to=voins@voins.program.ru \
    --cc=m.bykov@gmail.com \
    --cc=smoke-room@lists.altlinux.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

Культурный офтопик

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/smoke-room/0 smoke-room/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 smoke-room smoke-room/ http://lore.altlinux.org/smoke-room \
		smoke-room@lists.altlinux.org smoke-room@lists.altlinux.ru smoke-room@lists.altlinux.com smoke-room@altlinux.ru smoke-room@altlinux.org smoke-room@altlinux.com
	public-inbox-index smoke-room

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.smoke-room


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git