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

Re: marked area into perl script and back (filter)

Expand Messages
  • thundt
    Here s what I would do (no macro for this yet): 1. cut region to scratch buffer 2. filter-buffer with command of your choice 3. copy resulting buffer back to
    Message 1 of 6 , Feb 26, 2002
      Here's what I would do (no macro for this yet):

      1. cut region to scratch buffer
      2. 'filter-buffer' with command of your choice
      3. copy resulting buffer back to region

      -Th


      --- In jasspa@y..., "Kludszuweit Dr, Arne (A.)" <akludszu@f...> wrote:
      > I want to move the selected area from emacs into
      > the standard input of an perlscript
      > and
      > the output should replace the selected area (like a filter)
      >
      >
      > It would be additionary nice if I could give the perlscript
      > one parameter from inside emacs
      >
      > Is it possible ?
      >
      > Many thanks
    • Steven Phillips
      This is exactly what I was going to suggest and having managed to dig the macro out, here is a filter-region command, Steve
      Message 2 of 6 , Feb 26, 2002
        This is exactly what I was going to suggest and having managed to dig the
        macro out, here is a filter-region command,

        Steve


        > -----Original Message-----
        > From: thundt [mailto:thundt@...]
        > Sent: 27 February 2002 02:32
        > To: jasspa@yahoogroups.com
        > Subject: [jasspa] Re: marked area into perl script and back (filter)
        >
        >
        > Here's what I would do (no macro for this yet):
        >
        > 1. cut region to scratch buffer
        > 2. 'filter-buffer' with command of your choice
        > 3. copy resulting buffer back to region
        >
        > -Th
        >
        >
        > --- In jasspa@y..., "Kludszuweit Dr, Arne (A.)" <akludszu@f...> wrote:
        > > I want to move the selected area from emacs into
        > > the standard input of an perlscript
        > > and
        > > the output should replace the selected area (like a filter)
        > >
        > >
        > > It would be additionary nice if I could give the perlscript
        > > one parameter from inside emacs
        > >
        > > Is it possible ?
        > >
        > > Many thanks
        >
        >
        >
        > __________________________________________________________________________
        >
        > This is an unmoderated list. JASSPA is not responsible for the content of
        > any material posted to this list.
        >
        > To unsubscribe, send a mail message to
        >
        > mailto:jasspa-unsubscribe@yahoogroups.com
        >
        > or visit http://groups.yahoo.com/group/jasspa and
        > modify your account settings manually.
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        >
        >
        >
      • Steven Phillips
        There s just no pleasing some!
        Message 3 of 6 , Feb 27, 2002
          There's just no pleasing some!

          > -----Original Message-----
          > From: Kludszuweit Dr, Arne (A.) [mailto:akludszu@...]
          > Sent: 27 February 2002 09:46
          > To: 'jasspa@yahoogroups.com'
          > Subject: RE: [jasspa] Re: marked area into perl script and back (filter)
          >
          >
          > It works fantastic !!!!! So as ist is !!
          >
          > It works also with the 4nt / 4dos executable extensions
          > If I say in 4dos / 4nt
          > set .pl=perl.exe
          >
          > and i have a filter like
          > fil.pl
          >
          > I can execute on the emacs commandline only
          > fil
          > and it works
          > great
          >
          >
          >
          > Is it possible that the marked area still remains marked (the new area)
          > So you can better see what the filter does and where starts the
          > replaced text
          >
          > Many thanks
          > Arne
          >
          >
          > -----Original Message-----
          > From: Steven Phillips [mailto:sphillips@...]
          > Sent: Mittwoch, 27. Februar 2002 07:57
          > To: jasspa@yahoogroups.com
          > Subject: RE: [jasspa] Re: marked area into perl script and back (filter)
          >
          >
          > This is exactly what I was going to suggest and having managed to dig the
          > macro out, here is a filter-region command,
          >
          > Steve
          >
          >
          > > -----Original Message-----
          > > From: thundt [mailto:thundt@...]
          > > Sent: 27 February 2002 02:32
          > > To: jasspa@yahoogroups.com
          > > Subject: [jasspa] Re: marked area into perl script and back (filter)
          > >
          > >
          > > Here's what I would do (no macro for this yet):
          > >
          > > 1. cut region to scratch buffer
          > > 2. 'filter-buffer' with command of your choice
          > > 3. copy resulting buffer back to region
          > >
          > > -Th
          > >
          > >
          > > --- In jasspa@y..., "Kludszuweit Dr, Arne (A.)" <akludszu@f...> wrote:
          > > > I want to move the selected area from emacs into
          > > > the standard input of an perlscript
          > > > and
          > > > the output should replace the selected area (like a filter)
          > > >
          > > >
          > > > It would be additionary nice if I could give the perlscript
          > > > one parameter from inside emacs
          > > >
          > > > Is it possible ?
          > > >
          > > > Many thanks
          > >
          > >
          > >
          > >
          > __________________________________________________________________________
          > >
          > > This is an unmoderated list. JASSPA is not responsible for the
          > content of
          > > any material posted to this list.
          > >
          > > To unsubscribe, send a mail message to
          > >
          > > mailto:jasspa-unsubscribe@yahoogroups.com
          > >
          > > or visit http://groups.yahoo.com/group/jasspa and
          > > modify your account settings manually.
          > >
          > >
          > >
          > >
          > > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          > >
          > >
          > >
          >
          >
          > __________________________________________________________________________
          >
          > This is an unmoderated list. JASSPA is not responsible for the content of
          > any material posted to this list.
          >
          > To unsubscribe, send a mail message to
          >
          > mailto:jasspa-unsubscribe@yahoogroups.com
          >
          > or visit http://groups.yahoo.com/group/jasspa and
          > modify your account settings manually.
          > ganz toll
          >
          > filtreg.emf
          >
          > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
          > ;;;;;;;;;;
          > ;
          > ; Created By: Steven Phillips
          > ; Created: Tue Jan 29 23:03:39 2002
          > ; Description: filter the current region
          > ; Notes: The result may introduce extra blank lines at the end
          > ; depending on the command called.
          > ;
          > ; Copyright (c) 2002 JASSPA.
          > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
          > ;;;;;;;;;;
          >
          > define-macro filter-region
          > kill-region
          > set-position "\x90"
          > !force 0 delete-buffer "filter-region-tmp"
          > find-buffer "filter-region-tmp"
          > yank
          > !force !force filter-buffer @mna
          > !if $status
          > ; forget the old, we have the new
          > -1 yank
          > beginning-of-buffer
          > set-mark
          > end-of-buffer
          > backward-char
          > copy-region
          > !endif
          > goto-position "\x90"
          > ; yank will either be original if filter failed or reuired
          > filter output
          > yank
          > -1 yank
          > !force 0 delete-buffer "filter-region-tmp"
          > !emacro
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
          >
          > __________________________________________________________________________
          >
          > This is an unmoderated list. JASSPA is not responsible for the content of
          > any material posted to this list.
          >
          > To unsubscribe, send a mail message to
          >
          > mailto:jasspa-unsubscribe@yahoogroups.com
          >
          > or visit http://groups.yahoo.com/group/jasspa and
          > modify your account settings manually.
          >
          >
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
          >
        • Kludszuweit Dr, Arne (A.)
          It works fantastic !!!!! So as ist is !! It works also with the 4nt / 4dos executable extensions If I say in 4dos / 4nt set .pl=perl.exe and i have a filter
          Message 4 of 6 , Feb 27, 2002
            It works fantastic !!!!! So as ist is !!

            It works also with the 4nt / 4dos executable extensions
            If I say in 4dos / 4nt
            set .pl=perl.exe

            and i have a filter like
            fil.pl

            I can execute on the emacs commandline only
            fil
            and it works
            great



            Is it possible that the marked area still remains marked (the new area)
            So you can better see what the filter does and where starts the replaced text

            Many thanks
            Arne


            -----Original Message-----
            From: Steven Phillips [mailto:sphillips@...]
            Sent: Mittwoch, 27. Februar 2002 07:57
            To: jasspa@yahoogroups.com
            Subject: RE: [jasspa] Re: marked area into perl script and back (filter)


            This is exactly what I was going to suggest and having managed to dig the
            macro out, here is a filter-region command,

            Steve


            > -----Original Message-----
            > From: thundt [mailto:thundt@...]
            > Sent: 27 February 2002 02:32
            > To: jasspa@yahoogroups.com
            > Subject: [jasspa] Re: marked area into perl script and back (filter)
            >
            >
            > Here's what I would do (no macro for this yet):
            >
            > 1. cut region to scratch buffer
            > 2. 'filter-buffer' with command of your choice
            > 3. copy resulting buffer back to region
            >
            > -Th
            >
            >
            > --- In jasspa@y..., "Kludszuweit Dr, Arne (A.)" <akludszu@f...> wrote:
            > > I want to move the selected area from emacs into
            > > the standard input of an perlscript
            > > and
            > > the output should replace the selected area (like a filter)
            > >
            > >
            > > It would be additionary nice if I could give the perlscript
            > > one parameter from inside emacs
            > >
            > > Is it possible ?
            > >
            > > Many thanks
            >
            >
            >
            > __________________________________________________________________________
            >
            > This is an unmoderated list. JASSPA is not responsible for the content of
            > any material posted to this list.
            >
            > To unsubscribe, send a mail message to
            >
            > mailto:jasspa-unsubscribe@yahoogroups.com
            >
            > or visit http://groups.yahoo.com/group/jasspa and
            > modify your account settings manually.
            >
            >
            >
            >
            > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            >
            >
            >


            __________________________________________________________________________

            This is an unmoderated list. JASSPA is not responsible for the content of
            any material posted to this list.

            To unsubscribe, send a mail message to

            mailto:jasspa-unsubscribe@yahoogroups.com

            or visit http://groups.yahoo.com/group/jasspa and
            modify your account settings manually.
            ganz toll

            filtreg.emf
            ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
            ;
            ; Created By: Steven Phillips
            ; Created: Tue Jan 29 23:03:39 2002
            ; Description: filter the current region
            ; Notes: The result may introduce extra blank lines at the end
            ; depending on the command called.
            ;
            ; Copyright (c) 2002 JASSPA.
            ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

            define-macro filter-region
            kill-region
            set-position "\x90"
            !force 0 delete-buffer "filter-region-tmp"
            find-buffer "filter-region-tmp"
            yank
            !force !force filter-buffer @mna
            !if $status
            ; forget the old, we have the new
            -1 yank
            beginning-of-buffer
            set-mark
            end-of-buffer
            backward-char
            copy-region
            !endif
            goto-position "\x90"
            ; yank will either be original if filter failed or reuired filter output
            yank
            -1 yank
            !force 0 delete-buffer "filter-region-tmp"
            !emacro

            Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          • Kludszuweit Dr, Arne (A.)
            Thanks it works Because it is so an fundamental command can you include this to the nano emacs ? I think at least set-position is not available in nanoemacs
            Message 5 of 6 , Feb 27, 2002
              Thanks it works

              Because it is so an fundamental command can you include this to
              the nano emacs ?
              I think at least set-position is not available in nanoemacs


              Arne

              -----Original Message-----
              From: Steven Phillips [mailto:sphillips@...]
              Sent: Mittwoch, 27. Februar 2002 09:27
              To: jasspa@yahoogroups.com
              Subject: RE: [jasspa] Re: marked area into perl script and back (filter)


              There's just no pleasing some!

              > -----Original Message-----
              > From: Kludszuweit Dr, Arne (A.) [mailto:akludszu@...]
              > Sent: 27 February 2002 09:46
              > To: 'jasspa@yahoogroups.com'
              > Subject: RE: [jasspa] Re: marked area into perl script and back (filter)
              >
              >
              > It works fantastic !!!!! So as ist is !!
              >
              > It works also with the 4nt / 4dos executable extensions
              > If I say in 4dos / 4nt
              > set .pl=perl.exe
              >
              > and i have a filter like
              > fil.pl
              >
              > I can execute on the emacs commandline only
              > fil
              > and it works
              > great
              >
              >
              >
              > Is it possible that the marked area still remains marked (the new area)
              > So you can better see what the filter does and where starts the
              > replaced text
              >
              > Many thanks
              > Arne
              >
              >
              > -----Original Message-----
              > From: Steven Phillips [mailto:sphillips@...]
              > Sent: Mittwoch, 27. Februar 2002 07:57
              > To: jasspa@yahoogroups.com
              > Subject: RE: [jasspa] Re: marked area into perl script and back (filter)
              >
              >
              > This is exactly what I was going to suggest and having managed to dig the
              > macro out, here is a filter-region command,
              >
              > Steve
              >
              >
              > > -----Original Message-----
              > > From: thundt [mailto:thundt@...]
              > > Sent: 27 February 2002 02:32
              > > To: jasspa@yahoogroups.com
              > > Subject: [jasspa] Re: marked area into perl script and back (filter)
              > >
              > >
              > > Here's what I would do (no macro for this yet):
              > >
              > > 1. cut region to scratch buffer
              > > 2. 'filter-buffer' with command of your choice
              > > 3. copy resulting buffer back to region
              > >
              > > -Th
              > >
              > >
              > > --- In jasspa@y..., "Kludszuweit Dr, Arne (A.)" <akludszu@f...> wrote:
              > > > I want to move the selected area from emacs into
              > > > the standard input of an perlscript
              > > > and
              > > > the output should replace the selected area (like a filter)
              > > >
              > > >
              > > > It would be additionary nice if I could give the perlscript
              > > > one parameter from inside emacs
              > > >
              > > > Is it possible ?
              > > >
              > > > Many thanks
              > >
              > >
              > >
              > >
              > __________________________________________________________________________
              > >
              > > This is an unmoderated list. JASSPA is not responsible for the
              > content of
              > > any material posted to this list.
              > >
              > > To unsubscribe, send a mail message to
              > >
              > > mailto:jasspa-unsubscribe@yahoogroups.com
              > >
              > > or visit http://groups.yahoo.com/group/jasspa and
              > > modify your account settings manually.
              > >
              > >
              > >
              > >
              > > Your use of Yahoo! Groups is subject to
              > http://docs.yahoo.com/info/terms/
              > >
              > >
              > >
              >
              >
              > __________________________________________________________________________
              >
              > This is an unmoderated list. JASSPA is not responsible for the content of
              > any material posted to this list.
              >
              > To unsubscribe, send a mail message to
              >
              > mailto:jasspa-unsubscribe@yahoogroups.com
              >
              > or visit http://groups.yahoo.com/group/jasspa and
              > modify your account settings manually.
              > ganz toll
              >
              > filtreg.emf
              >
              > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
              > ;;;;;;;;;;
              > ;
              > ; Created By: Steven Phillips
              > ; Created: Tue Jan 29 23:03:39 2002
              > ; Description: filter the current region
              > ; Notes: The result may introduce extra blank lines at the end
              > ; depending on the command called.
              > ;
              > ; Copyright (c) 2002 JASSPA.
              > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
              > ;;;;;;;;;;
              >
              > define-macro filter-region
              > kill-region
              > set-position "\x90"
              > !force 0 delete-buffer "filter-region-tmp"
              > find-buffer "filter-region-tmp"
              > yank
              > !force !force filter-buffer @mna
              > !if $status
              > ; forget the old, we have the new
              > -1 yank
              > beginning-of-buffer
              > set-mark
              > end-of-buffer
              > backward-char
              > copy-region
              > !endif
              > goto-position "\x90"
              > ; yank will either be original if filter failed or reuired
              > filter output
              > yank
              > -1 yank
              > !force 0 delete-buffer "filter-region-tmp"
              > !emacro
              >
              > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
              >
              >
              >
              > __________________________________________________________________________
              >
              > This is an unmoderated list. JASSPA is not responsible for the content of
              > any material posted to this list.
              >
              > To unsubscribe, send a mail message to
              >
              > mailto:jasspa-unsubscribe@yahoogroups.com
              >
              > or visit http://groups.yahoo.com/group/jasspa and
              > modify your account settings manually.
              >
              >
              >
              >
              > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
              >
              >
              >


              __________________________________________________________________________

              This is an unmoderated list. JASSPA is not responsible for the content of
              any material posted to this list.

              To unsubscribe, send a mail message to

              mailto:jasspa-unsubscribe@yahoogroups.com

              or visit http://groups.yahoo.com/group/jasspa and
              modify your account settings manually.




              Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
            Your message has been successfully submitted and would be delivered to recipients shortly.