Loading ...
Sorry, an error occurred while loading the content.

shell commands

Expand Messages
  • Bryan Schofield
    Is there any short cut to insert the current buffer s file name in to a shell command, using shell-command, pipe-shell-command, or ipipe-shell-command?
    Message 1 of 4 , Apr 2, 2007
    • 0 Attachment
      Is there any short cut to insert the current buffer's file name in to
      a shell command, using shell-command, pipe-shell-command, or
      ipipe-shell-command? Something like vi's %?

      for example,

      someScript -opt %f
    • Ian
      There seems to be ( system ) variables of $buffer-fname and $file-names which may be what you re looking for... see M-x list-variables and/or M-x
      Message 2 of 4 , Apr 2, 2007
      • 0 Attachment
        There seems to be ("system") variables of

        $buffer-fname

        and

        $file-names

        which may be what you're looking for... see

        "M-x list-variables" and/or "M-x command-apropos"

        $buffer

        Ian
        this post <http://tech.groups.yahoo.com/group/jasspa/message/2251>

        On 4/2/07, Bryan Schofield <schofield.bryan@...> wrote:
        > Is there any short cut to insert the current buffer's file name in to
        > a shell command, using shell-command, pipe-shell-command, or
        > ipipe-shell-command? Something like vi's %?
        >
        > for example,
        >
        > someScript -opt %f
      • Thomas Hundt
        I don t think there s a shortcut. I think you re meant to construct the command string yourself. As Ian just pointed out, list-variables shows various
        Message 3 of 4 , Apr 2, 2007
        • 0 Attachment
          I don't think there's a shortcut.

          I think you're meant to construct the command string yourself.
          As Ian just pointed out, list-variables shows various variables that
          hold various forms of the filename.

          If you want not to have to worry about the filename, maybe try
          pipe-shell-command (and supply your own result buffer name to catch the
          results).

          -Th


          Bryan Schofield wrote:
          > Is there any short cut to insert the current buffer's file name in to
          > a shell command, using shell-command, pipe-shell-command, or
          > ipipe-shell-command? Something like vi's %?
          >
          > for example,
          >
          > someScript -opt %f
          >
        • Phillips, Steven
          When entering a command-line using the message-line (i.e. interactive) I use the C-x y and C-x C-y key bindings to insert the current buffer s name and file
          Message 4 of 4 , Apr 2, 2007
          • 0 Attachment
            When entering a command-line using the message-line (i.e. interactive) I use the C-x y and C-x C-y key bindings to insert the current buffer's name and file name respectively. The buffer's name is usually very close to the file name without the path (sometimes have to remove the "<2>" etc)
             
            Steve


            From: jasspa@yahoogroups.com [mailto:jasspa@yahoogroups.com] On Behalf Of Thomas Hundt
            Sent: Tuesday, April 03, 2007 1:35 AM
            To: jasspa@yahoogroups.com
            Subject: Re: [jasspa] shell commands

            I don't think there's a shortcut.

            I think you're meant to construct the command string yourself.
            As Ian just pointed out, list-variables shows various variables that
            hold various forms of the filename.

            If you want not to have to worry about the filename, maybe try
            pipe-shell-command (and supply your own result buffer name to catch the
            results).

            -Th

            Bryan Schofield wrote:
            > Is there any short cut to insert the current buffer's file name in to
            > a shell command, using shell-command, pipe-shell-command, or
            > ipipe-shell- command? Something like vi's %?
            >
            > for example,
            >
            > someScript -opt %f
            >

          Your message has been successfully submitted and would be delivered to recipients shortly.