Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [script]

The tag has no usage guidance.

2
votes
1answer
40 views

Is --script a valid emacs switch?

When I execute emacs --batch --script=/home/jim/test.el --no-site-file --file=testing I get: Cannot open load file: no such file or directory, /home/jim/--script=/home/jim/test.el While emacs --...
1
vote
1answer
24 views

visit buffer without setting mode in script

I'm trying to write a small program to indent lisp files using lisp-mode so I can get Emacs-compatible indentation even when using a different program. Here's my first attempt to write a program to ...
0
votes
2answers
51 views

How to use emacs packages in emacs lisp scripting

I have the following emacs script from here #!/usr/local/bin/emacs --script ;;; rcat --- cat ;;; Commentary: ;;; cat function in elisp ;;; Code: ;;-*- mode: emacs-lisp;-*- (defun process (string) ...
0
votes
1answer
45 views

How to apply org-ctrl-c-ctrl-c-hook from command line?

This problem is so convoluted that maybe I should call it a puzzle... On the Unix shell command line, I can convert TSV (tab-separated-values) input to org-mode table format with this perl one-liner: ...
0
votes
1answer
117 views

How to make web-mode handle HTML inside <script> element?

I have elements that contain various things. Some contain HTML; web-mode does not realize that so it messes up the indentation. Some contain CSS; same issue. My first preference is, can I somehow ...
1
vote
1answer
576 views

Can I call a python script from emacs?

I have a simple python script: $ cat ~/simple.py import os import sys def write_greeting(inpath): outpath = os.path.splitext(inpath)[0] + '.txt' with open(outpath, 'w') as f: f.write(...
-1
votes
1answer
63 views

why is save-buffer asking for a chmod?

All of sudden, XEmacs 21.4.22 starts asking whether it should chmod a+x $f everytime I try to save a buffer that is in Shell-script mode. Switching it to fundamental-mode stops that behaviour. ...
5
votes
3answers
132 views

How can I detect if an elisp script is piped?

I want to be able to tell whether stdout is a pipe in an elisp script. This would allow to distinguish between: $ emacs --script foo.el and $ emacs --script foo.el | cat Is this possible in Emacs ...
6
votes
2answers
151 views

How can I script an emacs recording session?

Recording a GIF screencast of Emacs details a few ways we can record screencasts of Emacs sessions (e.g. to demonstrate features), but I'm really bad at not screwing things up :-) Is there a way to ...
1
vote
1answer
36 views

Can I use find to pass a list to emacs commands?

I'm trying to modify a script I got from an old question of mine. I have many .org files under many subdirectories of ~/foo. I want to quickly run htmlize on each .org file. I have some elisp code $ ...
6
votes
2answers
366 views

Print process output line by line

Read process output line by line gives some partial ideas about how to deal with sub-process output in an intelligent manner, but no example and no working solution. I have a couple of examples, one ...