Stack Exchange Network

Stack Exchange network consists of 174 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.

1
vote
1answer
21 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
29 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
18 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
0answers
27 views

how to send URL from browser using Emacs as default mail handler?

I'd like to use the Chrome command Email Page Location to email a URL through Emacs. Desired behavior is this: In Chrome, I choose Email Page Location Emacs activates, initiates a new email message,...
0
votes
1answer
84 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 ...
0
votes
0answers
80 views

dpkg --configure <package> or the configure menu option in dselect: python-mode Python mode for GNU Emacs and XEmacs

I’ve issues with my system upgrade in my research I came across this partial fix: **sudo apt-get install** --reinstall python-minimal python-lockfile Partial Result is the: Install python-mode for ...
1
vote
1answer
431 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
59 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
129 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
133 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
247 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 ...