Questions tagged [invocation]

7 questions
12
votes
3 answers

Launch emacs with ediff-files (of ediff-directories) from command line

I would like to launch emacs to ediff either files or directories. For example, I'd like something like: emacs -f ediff-files file1 file2 But when I do this, it doesn't take file1 and file2 as the two files to diff. Rather, emacs prompts me for…
6
votes
1 answer

Preset search isearch-string from command line

I am trying to set isearch-string from the command line. The purpose is to have a Perl script start Emacs with a given search string, and go directly to the first line of the string and enter search mode. For example: $ emacs +2 t.txt -l srep.el…
Håkon Hægland
  • 3,608
  • 1
  • 20
  • 51
4
votes
2 answers

Portable Emacs: Remapping user-emacs-directory

The Problem I want to install Emacs on a USB Flash Drive in a portable fashion, that is, Emacs should be able to be run from the UFD, once plugged on a device, without predefined paths to its binaries and save all its persistent data on the UFD. To…
antonio
  • 1,762
  • 12
  • 24
4
votes
1 answer

From an external script, open file and run some simple expression whether emacs already running or not

Context / initial need (works fine) I wrote and use a script that generates a file and uses emacsclient to edit it in an existing or new instance of emacs, in a new window. Similar to Set up Emacs on Windows to start a single instance and open files…
2
votes
1 answer

Behavior of '-e' option during emacs invocation

There command-line option -e behaves similar to the --eval option, but yet it is not the same. For example, of these two invocations, only the first one works: emacs --eval '(global-linum-mode)' emacs -e '(global-linum-mode)' And of these two…
nispio
  • 8,175
  • 2
  • 35
  • 73
1
vote
1 answer

How to invoke Emacs from MS DOS prompt with a function with argument?

Inspired by the question Launch emacs with ediff-files (of ediff-directories) from command line and the answer https://emacs.stackexchange.com/a/3623/2609, I tried emacs --eval '(set-background-color "green")' from an MS DOS prompt without sucess.…
Name
  • 7,689
  • 4
  • 38
  • 84
0
votes
1 answer

script to Ediff two files in running gui Emacs?

I'm putting together a presentation that involves some live demos in the terminal. In one of the demos, I run a shell script that takes an input file, runs it through an Awk script, and generates a transformed output file. After doing so, I'd like…
ivan
  • 1,928
  • 10
  • 20