all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `start-process`  in Emacs on Windows seems to mangle process output
@ 2015-11-19 14:49 evgeniy.sharapov
  2015-11-19 18:03 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: evgeniy.sharapov @ 2015-11-19 14:49 UTC (permalink / raw)
  To: help-gnu-emacs

Here's the my problem. When I run

------------------------------------------------------------------
(let ((default-directory "C:/Users/esharapov/.emacs.d/"))
  (apply 'start-process "ag" (get-buffer-create "test")
         "c:\\App\\emacs\\libexec\\emacs\\24.5\\i686-pc-mingw32\\cmdproxy.exe"
         (list "-c" "\"ag\" \"--nocolor\"  \"--literal\" \"--line-number\" \"--smart-case\" \"--nogroup\" \"--column\" \"--stats\" \"--\" \"keymap-on\" \".\"")))
------------------------------------------------------------------

I get in the buffer following output: 

------------------------------------------------------------------
194:15:    (defmacro keymap-on-key (name keys)
233:9:       (keymap-on-key ctl-x-f-map "C-x f")
572:7:     (keymap-on-key ctl-z-w-map "C-z w")
194:15:    (defmacro keymap-on-key (name keys)

233:9:       (keymap-on-key ctl-x-f-map "C-x f")

572:7:     (keymap-on-key ctl-z-w-map "C-z w")

6 matches
382 files searched
8993756 bytes searched
0.446822 seconds

Process ag finished
------------------------------------------------------------------

However when I run it in the Windows command prompt as

------------------------------------------------------------------
c:\\App\\emacs\\libexec\\emacs\\24.5\\i686-pc-mingw32\\cmdproxy.exe /c "C:\\App\\bin\\ag.exe --nocolor  --literal --line-number --smart-case --nogroup --column --stats -- keymap-on ."
------------------------------------------------------------------

I get the following output 

------------------------------------------------------------------
#configuration.org#:194:15:    (defmacro keymap-on-key (name keys)
#configuration.org#:233:9:       (keymap-on-key ctl-x-f-map "C-x f")
#configuration.org#:572:7:     (keymap-on-key ctl-z-w-map "C-z w")
configuration.org:194:15:    (defmacro keymap-on-key (name keys)
configuration.org:233:9:       (keymap-on-key ctl-x-f-map "C-x f")
configuration.org:572:7:     (keymap-on-key ctl-z-w-map "C-z w")
6 matches
382 files searched
8993756 bytes searched
0.483917 seconds
-------------------------------------------------------------------

Notice when I use 'start-process' the file name is being removed from the process output. Does anyone know what's the issue here ?
Is it a bug or a feature that could be turned off  ?

Versions:
Microsoft Windows [Version 6.3.9600]
GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570


Sincerely yours,
    Evgeniy Sharapov



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

* Re: `start-process` in Emacs on Windows seems to mangle process output
  2015-11-19 14:49 `start-process` in Emacs on Windows seems to mangle process output evgeniy.sharapov
@ 2015-11-19 18:03 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2015-11-19 18:03 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Thu, 19 Nov 2015 06:49:30 -0800 (PST)
> From: evgeniy.sharapov@gmail.com
> Injection-Date: Thu, 19 Nov 2015 14:49:30 +0000
> 
> Here's the my problem. When I run
> 
> ------------------------------------------------------------------
> (let ((default-directory "C:/Users/esharapov/.emacs.d/"))
>   (apply 'start-process "ag" (get-buffer-create "test")
>          "c:\\App\\emacs\\libexec\\emacs\\24.5\\i686-pc-mingw32\\cmdproxy.exe"
>          (list "-c" "\"ag\" \"--nocolor\"  \"--literal\" \"--line-number\" \"--smart-case\" \"--nogroup\" \"--column\" \"--stats\" \"--\" \"keymap-on\" \".\"")))
> ------------------------------------------------------------------
> 
> I get in the buffer following output: 
> 
> ------------------------------------------------------------------
> 194:15:    (defmacro keymap-on-key (name keys)
> 233:9:       (keymap-on-key ctl-x-f-map "C-x f")
> 572:7:     (keymap-on-key ctl-z-w-map "C-z w")
> 194:15:    (defmacro keymap-on-key (name keys)
> 
> 233:9:       (keymap-on-key ctl-x-f-map "C-x f")
> 
> 572:7:     (keymap-on-key ctl-z-w-map "C-z w")
> 
> 6 matches
> 382 files searched
> 8993756 bytes searched
> 0.446822 seconds
> 
> Process ag finished

What kind of program is "ag"?  What does it do, and how?

> However when I run it in the Windows command prompt as
> 
> ------------------------------------------------------------------
> c:\\App\\emacs\\libexec\\emacs\\24.5\\i686-pc-mingw32\\cmdproxy.exe /c "C:\\App\\bin\\ag.exe --nocolor  --literal --line-number --smart-case --nogroup --column --stats -- keymap-on ."
> ------------------------------------------------------------------
> 
> I get the following output 
> 
> ------------------------------------------------------------------
> #configuration.org#:194:15:    (defmacro keymap-on-key (name keys)
> #configuration.org#:233:9:       (keymap-on-key ctl-x-f-map "C-x f")
> #configuration.org#:572:7:     (keymap-on-key ctl-z-w-map "C-z w")
> configuration.org:194:15:    (defmacro keymap-on-key (name keys)
> configuration.org:233:9:       (keymap-on-key ctl-x-f-map "C-x f")
> configuration.org:572:7:     (keymap-on-key ctl-z-w-map "C-z w")
> 6 matches
> 382 files searched
> 8993756 bytes searched
> 0.483917 seconds
> -------------------------------------------------------------------
> 
> Notice when I use 'start-process' the file name is being removed from the process output. Does anyone know what's the issue here ?

Does "ag", whatever it is, behave differently depending on whether its
standard output is a console device or something else?

Also, are you sure the same "ag" is run in both cases?  The first
command didn't include the absolute file name of the program, could it
be that cmdproxy found some other copy of it?



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

end of thread, other threads:[~2015-11-19 18:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19 14:49 `start-process` in Emacs on Windows seems to mangle process output evgeniy.sharapov
2015-11-19 18:03 ` Eli Zaretskii

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.