all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: inserting a file
  2005-08-07 19:20 inserting a file Baloff
@ 2005-08-07 19:10 ` Jesper Harder
  2005-08-07 19:41 ` Christian Plate
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Jesper Harder @ 2005-08-07 19:10 UTC (permalink / raw)


Baloff <washdc@wash.edu> writes:

> C-x i filename what about inserting a command output say you are
> writing a post, or in the scratch buffer and want to type the output
> of a shell command. like $ls or whatever.

Use `C-u M-! ls'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* inserting a file
@ 2005-08-07 19:20 Baloff
  2005-08-07 19:10 ` Jesper Harder
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Baloff @ 2005-08-07 19:20 UTC (permalink / raw)



C-x i filename
what about inserting a command output
say you are writing a post, or in the scratch buffer and want to type
the output of a shell command. like $ls or whatever.

thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: inserting a file
  2005-08-07 19:20 inserting a file Baloff
  2005-08-07 19:10 ` Jesper Harder
@ 2005-08-07 19:41 ` Christian Plate
  2005-08-07 19:57 ` Jens Kubieziel
  2005-08-08 19:38 ` Kevin Rodgers
  3 siblings, 0 replies; 7+ messages in thread
From: Christian Plate @ 2005-08-07 19:41 UTC (permalink / raw)



Baloff <washdc@wash.edu> writes:
> what about inserting a command output say you are writing a post, or
> in the scratch buffer and want to type the output of a shell
> command. like $ls or whatever.

I'm quoting from the info-manual:

,----
|    A numeric argument, as in `M-1 M-!', says to insert terminal output
| into the current buffer instead of a separate buffer.  It puts point
| before the output, and sets the mark after the output.  For instance,
| `M-1 M-! gunzip < foo.gz <RET>' would insert the uncompressed
| equivalent of `foo.gz' into the current buffer.
`----

For more details have a look in info: Emacs->Shell->Single Shell

Regards, Christian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: inserting a file
  2005-08-07 19:20 inserting a file Baloff
  2005-08-07 19:10 ` Jesper Harder
  2005-08-07 19:41 ` Christian Plate
@ 2005-08-07 19:57 ` Jens Kubieziel
  2005-08-08 15:34   ` Baloff
  2005-08-08 19:38 ` Kevin Rodgers
  3 siblings, 1 reply; 7+ messages in thread
From: Jens Kubieziel @ 2005-08-07 19:57 UTC (permalink / raw)


* Baloff schrieb am 2005-08-07:
> what about inserting a command output
> say you are writing a post, or in the scratch buffer and want to type
> the output of a shell command. like $ls or whatever.

C-u M-! RET

-- 
Jens Kubieziel                                   http://www.kubieziel.de
"Wir muessen die Rechte der Andersdenkenden selbst dann beachten, wenn
sie Idioten oder schaedlich sind. Wir muessen aufpassen. Wachsamkeit ist
der Preis der Freiheit --- Keine Zensur!" - Wau Holland

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: inserting a file
  2005-08-08 15:34   ` Baloff
@ 2005-08-08  2:08     ` Neon Absentius
  0 siblings, 0 replies; 7+ messages in thread
From: Neon Absentius @ 2005-08-08  2:08 UTC (permalink / raw)


On Mon, Aug 08, 2005 at 08:34:56AM -0700, Baloff wrote:
> both
> C-u M-!  and
> M-1 M-!
> work, now, why is the waste binding, why not save one for something else?

There is only one binding. M-! is bound to the command "shell-command".
M-1 and C-u supply prefix arguments. M-1 supplies the numerical
agument "1" to the command, while "C-u" supplies the "universal
argument". It just happens that all non-nil arguments have the same 
result for this funtion, so for example M-0 would also work. 

,----[ C-h k M-! ]
| M-! runs the command shell-command
|    which is an interactive compiled Lisp function in `simple'.
| It is bound to M-!.
| (shell-command command &optional output-buffer error-buffer)
| 
| Execute string command in inferior shell; display output, if any.
| With prefix argument, insert the command's output at point.
`----

Here is the info node about prefix arguments:

(info "(elisp)Prefix Command Arguments")

> 
> thanks

-- 
Charity in capitalism is like urinating to extinguish a forest fire.
    -- Neon Absentius
absent a.in.cirle sdf period lonestar period org
SDF Public Access UNIX System - http://sdf.lonestar.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: inserting a file
  2005-08-07 19:57 ` Jens Kubieziel
@ 2005-08-08 15:34   ` Baloff
  2005-08-08  2:08     ` Neon Absentius
  0 siblings, 1 reply; 7+ messages in thread
From: Baloff @ 2005-08-08 15:34 UTC (permalink / raw)


Jens Kubieziel wrote:
> * Baloff schrieb am 2005-08-07:
> 
>>what about inserting a command output
>>say you are writing a post, or in the scratch buffer and want to type
>>the output of a shell command. like $ls or whatever.
> 
> 
> C-u M-! RET
> 
both
C-u M-!  and
M-1 M-!
work, now, why is the waste binding, why not save one for something else?

thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: inserting a file
  2005-08-07 19:20 inserting a file Baloff
                   ` (2 preceding siblings ...)
  2005-08-07 19:57 ` Jens Kubieziel
@ 2005-08-08 19:38 ` Kevin Rodgers
  3 siblings, 0 replies; 7+ messages in thread
From: Kevin Rodgers @ 2005-08-08 19:38 UTC (permalink / raw)


Baloff wrote:
> C-x i filename
> what about inserting a command output
> say you are writing a post, or in the scratch buffer and want to type
> the output of a shell command. like $ls or whatever.

I find it inconvenient that there's no default binding for
insert-buffer, so I've got this in my .emacs:

(global-set-key "\C-xI" 'insert-buffer)

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-08-08 19:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-07 19:20 inserting a file Baloff
2005-08-07 19:10 ` Jesper Harder
2005-08-07 19:41 ` Christian Plate
2005-08-07 19:57 ` Jens Kubieziel
2005-08-08 15:34   ` Baloff
2005-08-08  2:08     ` Neon Absentius
2005-08-08 19:38 ` Kevin Rodgers

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.