help-emacs-windows
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[h-e-w] Perl in shell with portable Emacs installation


From: Claire_B
Subject: [h-e-w] Perl in shell with portable Emacs installation
Date: Sat, 5 Jun 2010 08:20:47 -0700 (PDT)

I'm usually a Mac/Linux user, but since all the computers at my workplace are
PCs running Windows XP, I'm trying to build a fully integrated,
self-sufficient Emacs system on a USB key.

(I don't have, and can't have, admin rights on these computers and they are
bios-locked so installing new software or booting from a LiveUSB Linux
ddistribution is out of the question).

So far I have a portable install on my usb key with :
- GNU Emacs 23.1 for Windows
- Portable MikTex install
- GSView and SumatraPDF
- R
- sqlite3

and my Emacs works for LateX writing with AucTeX, statistical analysis in R
and database management.

I sometimes need to use perl scripts with my LaTeX files, for example for
counting words. This is where I run into problems : on my mac or linux
machines, I invoke a shell buffer with M-!, type my perl commands and all is
well. However, when I do this on the windows USB install, I get "the perl
interpreter couldn't be found", and no results. I also can't use any unix
commands (grep, patch, etc...)

I've tried installing cygwin 1.7 for the unix tools, and Strawberry Perl
Portable for perl, but I can't figure out how to link them to emacs. I guess
it's only a path problem, but all the info I've found on the internet
relates to "static" (ie on a given computer) installations and I couldn't
get them to run on my usb drive (I'm trying to run perl in a shell from
emacs, not edit perl files in emacs in perl-mode or cperl-mode).

Here is the content of my .emacs file:

;;
;; Portable Emacs init file.
;;;

(setq user-full-name "YOUR NAME")
(setq user-mail-address "YOUR EMAIL ADDRESS")

;;
;; Set environment
;;
(defvar usb-site-lisp-dir (expand-file-name "site-lisp" usb-home-dir))
(setq load-path (cons usb-site-lisp-dir load-path))
(let ((dir (delete nil (mapcar (lambda (f)
     (unless (string-match "\\.elc?\\'" f) f))
          (cddr (directory-files usb-site-lisp-dir t))))))
  (setq load-path (append dir load-path)))

 '(LaTeX-command "latex -synctex=-1")
 '(TeX-bar-LaTeX-all-button-alists (quote (TeX-bar-LaTeX-button-alist
toolbarx-default-toolbar-meaning-alist)))
 '(TeX-bar-LaTeX-button-alist (quote ((latex :image (lambda nil (if
TeX-PDF-mode "pdftex" "tex")) :command (progn (TeX-save-document
(TeX-master-file)) (TeX-command "LaTeX" (quote TeX-master-file) -1)) :help
(lambda (&rest ignored) (TeX-bar-help-from-command-list "LaTeX"))) (pdflatex
:image "pdftex" :command (progn (TeX-save-document (TeX-master-file))
(TeX-command "XDV to PDF" (quote TeX-master-file) -1)) :help (lambda (&rest
ignored) (TeX-bar-help-from-command-list "XDV to PDF"))) (next-error :image
"error" :command TeX-next-error :enable (plist-get TeX-error-report-switches
(intern (TeX-master-file))) :visible (plist-get TeX-error-report-switches
(intern (TeX-master-file)))) (view :image "viewpdf" :command (TeX-command
"View PDF" (quote TeX-master-file) -1) :help (lambda (&rest ignored)
(TeX-bar-help-from-command-list "View PDF"))) (file :image "dvips" :command
(TeX-command "File" (quote TeX-master-file) -1) :visible (not TeX-PDF-mode)
:help (lambda (&rest ignored) (TeX-bar-help-from-command-list "File")))
(bibtex :image "bibtex" :command (TeX-command "BibTeX" (quote
TeX-master-file) -1) :help (lambda (&rest ignored)
(TeX-bar-help-from-command-list "BibTeX"))) (clean :image "delete" :command
(TeX-command "Clean" (quote TeX-master-file) -1) :help (lambda (&rest
ignored) (TeX-bar-help-from-command-list "Clean")))
(latex-symbols-experimental :alias :eval-group
LaTeX-symbols-toolbar-switch-contents LaTeX-symbols-toolbar-contents))))
 '(TeX-bar-LaTeX-buttons (quote (new-file open-file dired kill-buffer
save-buffer undo cut copy paste [separator nil] latex next-error view bibtex
(pdflatex))))
 '(TeX-command-list (quote (("View PDF" "start \"\" \"/%s.pdf\""
TeX-run-command nil t :help "View PDF") ("XDV to PDF" "xdvipdfmx.exe %s.xdv
" TeX-run-command nil t :help "Convert to PDF") ("XeLaTeX" "%`xelatex
--synctex=1%(mode)%' %t" TeX-run-command nil (latex-mode context-mode
ams-tex-mode)) ("TeX" "%(PDF)%(tex) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX
nil (plain-tex-mode latex-mode texinfo-mode ams-tex-mode) :help "Run plain
TeX") ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode doctex-mode)
:help "Run LaTeX") ("Makeinfo" "makeinfo %t" TeX-run-compile nil
(texinfo-mode) :help "Run Makeinfo with Info output") ("Makeinfo HTML"
"makeinfo --html %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo
with HTML output") ("AmSTeX" "%(PDF)amstex %`%S%(PDFout)%(mode)%' %t"
TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX") ("ConTeXt" "texexec
--once --texutil %(execopts)%t" TeX-run-TeX nil (context-mode) :help "Run
ConTeXt once") ("ConTeXt Full" "texexec %(execopts)%t" TeX-run-TeX nil
(context-mode) :help "Run ConTeXt until completion") ("BibTeX" "bibtex %s"
TeX-run-BibTeX nil t :help "Run BibTeX") ("View" "%V" TeX-run-discard t t
:help "Run Viewer") ("Print" "%p" TeX-run-command t t :help "Print the
file") ("Queue" "%q" TeX-run-background nil t :help "View the printer queue"
:visible TeX-queue-command) ("File" "%(o?)dvips %d -o %f " TeX-run-command t
t :help "Generate PostScript file") ("Index" "makeindex %s" TeX-run-command
nil t :help "Create index file") ("Check" "lacheck %s" TeX-run-compile nil
(latex-mode) :help "Check LaTeX file for correctness") ("Spell"
"(TeX-ispell-document \"\")" TeX-run-function nil t :help "Spell-check the
document") ("Clean" "TeX-clean" TeX-run-function nil t :help "Delete
generated intermediate files") ("Clean All" "(TeX-clean t)" TeX-run-function
nil t :help "Delete generated intermediate and output files") ("Other" ""
TeX-run-command t t :help "Run an arbitrary command"))))
 '(TeX-engine (quote xetex))
 '(TeX-output-view-style (quote (("^dvi$" "^pstricks$\\|^pst-\\|^psfrag$"
"dvips %d -o && start \"\" %f") ("^dvi$" "." "yap -1 %dS %d") ("^pdf$" "."
"start \"/SumatraPDF/SumatraPDF.exe\" %o") ("^html?$" "." "start \"\"
%o"))))
 '(latex-run-command "latex")
 '(plain-TeX-enable-toolbar nil))
 

(require 'tex-mik)
(require 'tex-site)
(require 'ess-site)
(setq inferior-R-program-name "/R-2.11.0/bin/Rterm.exe")
(setq sql-sqlite-program "/sqlite/sqlite3")
(setq sql-sqlite-options '("-interactive"))


I'm considering installing Emacs+emacsw32 to solve the command tools issue,
but I don't think this will help with perl. On the other hand, if I can
configurate Portable Cygwin to work with Portable Emacs, I guess I could
figure out how to deal with Portable Perl (and the other way around).

Thanks for your help.
-- 
View this message in context: 
http://old.nabble.com/Perl-in-shell-with-portable-Emacs-installation-tp28789675p28789675.html
Sent from the Emacs - Windows - Help mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]