2
uname -a Linux antixbox 4.9.235-antix.1-amd64-smp #1 SMP PREEMPT Mon
Sep 14 19:26:52 EEST 2020 x86_64 GNU/Linux
 
emacs --version GNU Emacs 27.1

echo $SHELL /usr/bin/zsh

I'm trying to get the following to work:

em() {   emacs $1 -geometry "56x23" }

I want to use it as follows e.g. with an existing file:

em testfile.txt

Emacs does launch, but no file buffer.

If I edit the function and replace nano for emacs (and get rid of the geometry stuff), the function works perfectly.

8
  • I have NO idea why the last sentences of my post are in bold!!
    – duke
    Apr 6 at 15:00
  • Does it work without a function? i.e., just typing emacs filename -geometry "56x23"?
    – Tyler
    Apr 6 at 15:27
  • @Tyler Nope! JUST discovered that! I can't finger it out. emacs does launch, but no file shows up.
    – duke
    Apr 6 at 15:46
  • Do you use the dashboard package? That causes this problem for me. Otherwise, you'll need to investigate your own configuration files to find the culprit.
    – Tyler
    Apr 6 at 19:25
  • 1
    Problem solved! Nuked emacs-27.1. Re-installed 26.1 All's well! Thx
    – duke
    Apr 7 at 14:27
1

Maybe run Emacs as a server and then edit files with emacsclient?

I have an alias

e='emacsclient -nw'

And is using it like

$ e foobar.txt
4
  • Also setting EDITOR=emacsclient -nw env var is handy Apr 7 at 7:33
  • Благодарность!! 👍 I'll give it a try to see if it solves my problem!
    – duke
    Apr 7 at 13:43
  • Did it help or you still need to run separate instance of Emacs every time? Apr 14 at 8:22
  • It did! Thank you!
    – duke
    Apr 14 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.