* Cygwin/NTEmacs Printing Problem
@ 2003-11-17 9:02 steven
2003-11-17 19:08 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: steven @ 2003-11-17 9:02 UTC (permalink / raw)
in the .emacs, I wrote:
(setq lpr-command "cat2file")
under cygwin/bash:
$ cat
#!/usr/bin/bash
TMPFILE=`mktemp -t emacs.print.XXXXX` || exit 1
cat >$TMPFILE
I dit this because I hope the 'ps-print-xxx' command can generate and
save a ps file for me.
But, when I invoked the 'ps-print-xxx' in NTEmacs, I always got
following error:
"searching for program: no such file or directory, cat2file"
Please help!
--
Steven Woody
steven@lczmsoft.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cygwin/NTEmacs Printing Problem
2003-11-17 9:02 Cygwin/NTEmacs Printing Problem steven
@ 2003-11-17 19:08 ` Eli Zaretskii
2003-11-17 19:22 ` Kevin Rodgers
[not found] ` <mailman.179.1069106535.399.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2003-11-17 19:08 UTC (permalink / raw)
> From: steven@lczmsoft.com (steven)
> Newsgroups: gnu.emacs.help
> Date: 17 Nov 2003 01:02:50 -0800
>
> (setq lpr-command "cat2file")
>
> under cygwin/bash:
> $ cat
> #!/usr/bin/bash
> TMPFILE=`mktemp -t emacs.print.XXXXX` || exit 1
> cat >$TMPFILE
>
> I dit this because I hope the 'ps-print-xxx' command can generate and
> save a ps file for me.
If all you need is to get the PS output on a file, you don't need all
this trickery: when ps-print-* commands are invoked with a numeric
argument, they automatically prompt for a file name and leave the PS
stuff on that file.
> But, when I invoked the 'ps-print-xxx' in NTEmacs, I always got
> following error:
> "searching for program: no such file or directory, cat2file"
I suspect that the value of PATH as known to Emacs does not include
the directory where you put cat2file.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cygwin/NTEmacs Printing Problem
2003-11-17 9:02 Cygwin/NTEmacs Printing Problem steven
2003-11-17 19:08 ` Eli Zaretskii
@ 2003-11-17 19:22 ` Kevin Rodgers
2003-11-18 5:47 ` Eli Zaretskii
2003-11-18 8:02 ` steven
[not found] ` <mailman.179.1069106535.399.help-gnu-emacs@gnu.org>
2 siblings, 2 replies; 8+ messages in thread
From: Kevin Rodgers @ 2003-11-17 19:22 UTC (permalink / raw)
steven wrote:
> in the .emacs, I wrote:
>
> (setq lpr-command "cat2file")
>
> under cygwin/bash:
> $ cat
> #!/usr/bin/bash
> TMPFILE=`mktemp -t emacs.print.XXXXX` || exit 1
> cat >$TMPFILE
>
> I dit this because I hope the 'ps-print-xxx' command can generate and
> save a ps file for me.
>
> But, when I invoked the 'ps-print-xxx' in NTEmacs, I always got
> following error:
> "searching for program: no such file or directory, cat2file"
Is the cat2file script executable? Is it in your PATH? Is the Emacs
exec-path variable correctly initialized from your PATH environment
variable?
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cygwin/NTEmacs Printing Problem
2003-11-17 19:22 ` Kevin Rodgers
@ 2003-11-18 5:47 ` Eli Zaretskii
2003-11-18 8:02 ` steven
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2003-11-18 5:47 UTC (permalink / raw)
> From: Kevin Rodgers <ihs_4664@yahoo.com>
> Newsgroups: gnu.emacs.help
> Date: Mon, 17 Nov 2003 12:22:17 -0700
> >
> > But, when I invoked the 'ps-print-xxx' in NTEmacs, I always got
> > following error:
> > "searching for program: no such file or directory, cat2file"
>
> Is the cat2file script executable?
FYI: This question is meaningless on Windows. Windows doesn't store
the executable bit of files in their directory entries.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cygwin/NTEmacs Printing Problem
2003-11-17 19:22 ` Kevin Rodgers
2003-11-18 5:47 ` Eli Zaretskii
@ 2003-11-18 8:02 ` steven
1 sibling, 0 replies; 8+ messages in thread
From: steven @ 2003-11-18 8:02 UTC (permalink / raw)
Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3FB91FE9.6080402@yahoo.com>...
> steven wrote:
>
> > in the .emacs, I wrote:
> >
> > (setq lpr-command "cat2file")
> >
> > under cygwin/bash:
> > $ cat
> > #!/usr/bin/bash
> > TMPFILE=`mktemp -t emacs.print.XXXXX` || exit 1
> > cat >$TMPFILE
> >
> > I dit this because I hope the 'ps-print-xxx' command can generate and
> > save a ps file for me.
> >
> > But, when I invoked the 'ps-print-xxx' in NTEmacs, I always got
> > following error:
> > "searching for program: no such file or directory, cat2file"
>
> Is the cat2file script executable? Is it in your PATH? Is the Emacs
> exec-path variable correctly initialized from your PATH environment
> variable?
M-x shell
$ which cat2file
/usr/local/bin/cat2file
$ echo "hello" | cat2file
So, you see, under the shell prompt of NTEmacs, I can run the cat2file script.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cygwin/NTEmacs Printing Problem
[not found] ` <mailman.179.1069106535.399.help-gnu-emacs@gnu.org>
@ 2003-11-18 9:01 ` steven
2003-11-18 9:40 ` Eli Zaretskii
[not found] ` <mailman.208.1069152033.399.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: steven @ 2003-11-18 9:01 UTC (permalink / raw)
"Eli Zaretskii" <eliz@elta.co.il> wrote in message news:<mailman.179.1069106535.399.help-gnu-emacs@gnu.org>...
>
> If all you need is to get the PS output on a file, you don't need all
> this trickery: when ps-print-* commands are invoked with a numeric
> argument, they automatically prompt for a file name and leave the PS
> stuff on that file.
Oh, thanks. it useful!
>
> I suspect that the value of PATH as known to Emacs does not include
> the directory where you put cat2file.
Should I modify the windows's PATH? but the cat2fiel is a Cygwin
script, which is not excutable under Windows 2000! Did you mean that
NTEmacs only executes Windows excutable program?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cygwin/NTEmacs Printing Problem
2003-11-18 9:01 ` steven
@ 2003-11-18 9:40 ` Eli Zaretskii
[not found] ` <mailman.208.1069152033.399.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2003-11-18 9:40 UTC (permalink / raw)
> From: steven@lczmsoft.com (steven)
> Newsgroups: gnu.emacs.help
> Date: 18 Nov 2003 01:01:17 -0800
>
> > I suspect that the value of PATH as known to Emacs does not include
> > the directory where you put cat2file.
>
> Should I modify the windows's PATH? but the cat2fiel is a Cygwin
> script, which is not excutable under Windows 2000!
It can be executed by the Cygwin port of Bash. Make sure bash.exe is
on the Windows PATH and cat2file is on the PATH used by Bash.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Cygwin/NTEmacs Printing Problem
[not found] ` <mailman.208.1069152033.399.help-gnu-emacs@gnu.org>
@ 2003-11-18 23:31 ` Jason Rumney
0 siblings, 0 replies; 8+ messages in thread
From: Jason Rumney @ 2003-11-18 23:31 UTC (permalink / raw)
Eli Zaretskii <eliz@elta.co.il> writes:
> > Should I modify the windows's PATH? but the cat2fiel is a Cygwin
> > script, which is not excutable under Windows 2000!
>
> It can be executed by the Cygwin port of Bash. Make sure bash.exe is
> on the Windows PATH and cat2file is on the PATH used by Bash.
... and that Emacs is configured to use bash to execute scripts. In this
case, I think the PATH used by bash is inherited from Emacs, not what
is in your ~/.bashrc or other shell configuration files. So either
cat2file needs to be on the Windows PATH, or you need to frob
exec-path from within Emacs.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-11-18 23:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-17 9:02 Cygwin/NTEmacs Printing Problem steven
2003-11-17 19:08 ` Eli Zaretskii
2003-11-17 19:22 ` Kevin Rodgers
2003-11-18 5:47 ` Eli Zaretskii
2003-11-18 8:02 ` steven
[not found] ` <mailman.179.1069106535.399.help-gnu-emacs@gnu.org>
2003-11-18 9:01 ` steven
2003-11-18 9:40 ` Eli Zaretskii
[not found] ` <mailman.208.1069152033.399.help-gnu-emacs@gnu.org>
2003-11-18 23:31 ` Jason Rumney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).