Fork me on GitHub
#emacs
<
2023-07-04
>
vemv21:07:23

Are packages a good medium to deliver a shell (or bb, w/e) script? For instance, for package grizzl I see:

$ ls ~/.emacs.d/elpa/grizzl-20160818.737
grizzl-autoloads.el grizzl-pkg.el       grizzl.el           grizzl.elc
It seems that I could sneak a .sh in my package?

vemv21:07:21

Unrelated question, can you reproduce this error?

> (shell-command-to-string "lein version")
"Error: Could not find or load main class true'\nCaused by: java.lang.ClassNotFoundException: true'\n"
I used misc lein versions and no profiles

dpsutton21:07:55

I debug this stuff by: running in a terminal, then running in eshell. Eshell uses the same exec path as emacs I believe

vemv22:07:03

hmmm... above is an eshell, below is an inferior shell both emit the same for java -version both have $SHELL=zsh but only the inferior shell reads my .zshrc could be a good lead but I don't recall my dotfiles doing something funny in this area (plus, an eshell without dotfiles should be cleaner than one with)

dpsutton22:07:02

In eshell try “which lein”

vemv22:07:29

It doesn't make a difference... I can point to a very precise executable like this one (obtained just now via curl > ~/bin/lein2910) and will get the same error

dpsutton22:07:47

I’d make some little script that echoes it’s arguments back to you. Maybe you’ve set some variable for eMacs to inject something

vemv22:07:15

ok, will keep debugging tomorrow could you generously confirm (shell-command-to-string "lein version") works for you?

dpsutton22:07:06

> Leiningen 2.9.8 on Java 17.0.1 OpenJDK 64-Bit Server VM

dpsutton22:07:25

(kill-new (shell-command-to-string "lein version"))

thanks3 2
vemv22:07:59

Debugged. Normal iterm or inferior shell: LEIN_JVM_OPTS=-Dmranderson.internal.no-parallelism=true eshell: LEIN_JVM_OPTS=true' I guess that the nested = trips Eshell.

vemv22:07:22

...My declaration is export LEIN_JVM_OPTS="-Dmranderson.internal.no-parallelism=true" , double quotes and all. IIRC there was an even better syntax

lread22:07:06

I'm relatively new to running emacs on Linux. I've been happily running in a terminal. https://clojurians.slack.com/archives/C099W16KZ/p1688415543657749 had me exploring running emacs under X Windows. I am wondering what Linux folks typically do here. I assumed terminal... but maybe I am missing out on some benefits of using X Windows?

vemv22:07:57

If the question can be translated to macOS "Emacs on iTerm vs. Emacs as a standalone GUI app", the difference is quite absimal... Probably the basics are more flexibility with keyboard shortcuts, less hassle with "true color", and misc OS integration / UI affordances

enn23:07:09

I got in the habit of running Emacs in the terminal because I found the font support and rendering of the X Windows version to be very poor--much worse than the font rendering in my terminal emulator. (This was many years ago now, so I have to assume things have improved.) I use Macs today but I still run Emacs in the terminal. I'm not familiar with eldev. I've never encountered an Emacs package that flat-out won't run in text mode (of course, certain functionality is unavailable, like viewing images in buffers).

hiredman23:07:22

I run emacs on linux, typically the gui version when running locally and the terminal version when running remotely over ssh, but I also use emacsclient sometimes in ways that can end up mixing and matching that. never heard of eldev before, if I got control characters like that in the terminal my first assumption would be the the terminal got hosed somehow

hiredman23:07:47

I guess the main reason I use gui emacs is it tends to look nicer, doesn't relay on characters for line drawing etc, can open pdfs and images etc

Colin (fosskers)02:07:36

I've been running Emacs on Linux for years, also using the graphical backends. Recently it also became possible to run Emacs using pure GTK in Wayland, and that's what I do.

Colin (fosskers)02:07:55

Mainly doing so makes fonts (and the interface) look a little nicer

lread03:07:07

Thanks folks for sharing, much appreciated! https://github.com/doublep/eldev/ is new to me too. It is a tool @U051BLM8F uses on his emacs projects to run elisp tests, compile (and maybe lint?), and also during dev, run emacs with a package in isolation (this was the feature I ran into trouble with). Seems like a useful idea/tool to me.

dakra10:07:47

+1 for GUI Emacs. Imho if all you run in the terminal is Emacs, then the X version only has advantages. Mainly you have more keybindings available, can display SVGs and images and have different fonts etc. I only use terminal Emacs if I don't use tramp but ssh into a machine for some reason.

lread14:07:42

Awesome, I'm going to give the emacs gui version a whirl.

ag16:07:40

I never understood running Emacs in terminal. Why, if you can instead run the terminal inside Emacs? And have nicer fonts, colors, child-frames, pdf-tools, etc. etc.

upvote 1
enn16:07:35

1. The fonts historically have not been nicer (can only use fonts in non-standard formats, no/bad antialiasing). 2. If you prefer a tiling workflow child-frames are a bug, not a feature. 3. The killer feature for me: easy remote pairing with zero-friction handoff between pairs in a shared tmux. Bonus: each pair gets to use the fonts they prefer, at the size they prefer. You avoid the (often-significant) CPU and bandwidth overhead of screen sharing, with no worries about compression artifacts making small type hard to read (a constant problem with Slack huddles for me; Zoom is not as bad, but still not as crisp as locally-rendered fonts in my terminal).

lread17:07:38

> I never understood running Emacs in terminal. Why, if you can instead run the terminal inside Emacs? And have nicer fonts, colors, child-frames, pdf-tools, etc. etc. One reason: the person doing so doesn't know any better! simple_smile @U060QM7AA thanks for the insights on the benefits of terminal mode.

ag17:07:21

This message contains interactive elements.

ag17:07:25

I had to actually squeeze Emacs frame to half the width of my actual screen, but even with that, you can imagine, without the posframe, I'd have to turn my head every time I run M-x.