all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* compile-internal + korn shell script
@ 2006-03-24 10:23 luca.spinacci
  2006-03-24 18:27 ` Kevin Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: luca.spinacci @ 2006-03-24 10:23 UTC (permalink / raw)




I would like to integrate a compile file command in emacs and I do like to
use the same Korn shell script of another working environment not
integrated in emacs so far.
I thought something like:
...
(setq CC "C:/TEMP/bin/win32/make.ksh ")
(compile-internal (read-from-minibuffer "Compile: "
                                          (format "%s %s "
                                                  CC
                                                  (concat "\""
                                                   (file-name-sans-extension
                                                    (file-name-nondirectory
                                                     (buffer-file-name))) ".o\"")))
...
where what I get in the echo line is, for instance,
Compile: C:/TEMP/bin/win32/make.ksh  "foo.o"

But in the *make* buffer an error is displayed:
cd c:/file_dir/
C:/TEMP/bin/win32/make.ksh  "foo.o"

Make exited abnormally with code 255 at Fri Mar 24 11:15:38

The same command - C:/TEMP/bin/win32/make.ksh  "foo.o" - from
inside a bash shell works correctly launching foo.c compilation as expected.

Any ideas?
I'd like something like compile-internal so that from the related buffer *make* I can move
through compilation errors.
Thank in advance,
Luca.

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

* Re: compile-internal + korn shell script
  2006-03-24 10:23 compile-internal + korn shell script luca.spinacci
@ 2006-03-24 18:27 ` Kevin Rodgers
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2006-03-24 18:27 UTC (permalink / raw)


luca.spinacci@selex-comms.com wrote:
> 
> I would like to integrate a compile file command in emacs and I do like to
> use the same Korn shell script of another working environment not
> integrated in emacs so far.
> I thought something like:
> ...
> (setq CC "C:/TEMP/bin/win32/make.ksh ")
> (compile-internal (read-from-minibuffer "Compile: "
>                                           (format "%s %s "
>                                                   CC
>                                                   (concat "\""
>                                                    (file-name-sans-extension
>                                                     (file-name-nondirectory
>                                                      (buffer-file-name))) ".o\"")))
> ...
> where what I get in the echo line is, for instance,
> Compile: C:/TEMP/bin/win32/make.ksh  "foo.o"
> 
> But in the *make* buffer an error is displayed:
> cd c:/file_dir/
> C:/TEMP/bin/win32/make.ksh  "foo.o"
> 
> Make exited abnormally with code 255 at Fri Mar 24 11:15:38
> 
> The same command - C:/TEMP/bin/win32/make.ksh  "foo.o" - from
> inside a bash shell works correctly launching foo.c compilation as expected.
> 
> Any ideas?
> I'd like something like compile-internal so that from the related buffer *make* I can move
> through compilation errors.

Right.  Generally it's just easier to set a buffer-local value for
compile-command, or call compile directly, but I guess calling
compile-internal should work.

Does `C-h v shell-file-name' tell you that shell commands are run from
Emacs by bash or some other shell?

-- 
Kevin Rodgers

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

* Re: compile-internal + korn shell script
       [not found] <OFE2FC9308.18B5F583-ONC125713E.003B6704@Selex-Comms.com>
@ 2006-03-27 14:57 ` Kevin Rodgers
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2006-03-27 14:57 UTC (permalink / raw)


luca.spinacci@selex-comms.com wrote:
> 
> >Does `C-h v shell-file-name' tell you that shell commands are run from
> >Emacs by bash or some other shell?
> 
> It reports:
> shell-file-name's value is
> "D:/emacs/emacs-21.3/bin/cmdproxy.exe"
> 
> Documentation:
> *File name to load inferior shells from.
> Initialized from the SHELL environment variable.
> 
> You can customize this variable.
> 
> ...I don't know if it may help...

Yes, that's your problem.  You are expecting cmdproxy.exe to run your
make.ksh Korn shell script.  Try setting shell-file-name to the full
path of your ksh executable.

> I found a possible escape - missing the functionality of mouse-2 event on
> compilation errors! - :
> ...
>   (start-process "make-process" "*Compile*"
>                  BASHEXE
>                  MAKE " "
>                  ""(concat (file-name-sans-extension
>                   (file-name-nondirectory
>                    (buffer-file-name))) ".o")"" )
>   (split-window-vertically)
>   (other-window 1)
>   (switch-to-buffer "*Compile*")
> ...
> This solution works but in case of compilation errors the mouse-2 click
> on a compilation error doesn't track the corresponding source code file.
> Is there an explicit way to tell emacs to do association among errors
> (mouse-2 click) and source code creating the buffer *Compile*?
> Is it made automatically? ...in that case something wrong with the
> above process "make-process" exiting abnormally?

The binding of mouse-2 in the *Compile* buffer is handled by
compilation-mode, which is called by compile-internal before the process
is started.

You should use the top-level compile command instead of trying to
replicate all its lower-level function calls.  And if you want to run
Korn shell commands, you should set shell-file-name to the ksh
executable.

-- 
Kevin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

end of thread, other threads:[~2006-03-27 14:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-24 10:23 compile-internal + korn shell script luca.spinacci
2006-03-24 18:27 ` Kevin Rodgers
     [not found] <OFE2FC9308.18B5F583-ONC125713E.003B6704@Selex-Comms.com>
2006-03-27 14:57 ` 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.