Fork me on GitHub
#emacs
<
2022-04-06
>
Drew Verlee16:04:59

What version of emacs do you suggest running? I see emacs 28.1 was just released. It seems like i'm on GNU emacs 29.0.5 but it has been acting really unstable recently (crashing, slow startups, etc..). Would it be better to use the more stable release on 28.1 with a fresh install? Ubuntu's software manager is showing me i can install version 1:26.3+1-1ubuntu2 which i'm assuming is version 26 so ill have to go elsewhere.

ericdallo16:04:13

26 is too old, I use emacs 29 master and didn't notice any issues for a while

ericdallo16:04:18

I update it every 2-3 weeks

ericdallo16:04:43

you should use 28.1 if don't want breaking changes all the time, it should be pretty fast enough

👍 1
ericdallo16:04:34

basically the main key features regarding performance is: • 27 introduced native json parsing, quite important for lsp users • 28 introduced native compilation which improves emacs speed overall

👍 1
Drew Verlee16:04:30

how do you update version 29? I should have kept notes on how i installed it.

ericdallo16:04:24

I use NixOS so I use https://github.com/nix-community/emacs-overlay, you can use Nix too via MacOS

ag16:04:36

I second Eric's suggestion. I've been using Emacs 29 for a few months. My primary workstation is a Mac, installed it using brew formula emacs-plus@29. It is quite stable, except some minor things that were deprecated long ago, things like cl - they are getting slowly removed or modified, now without warnings. I think it's time, since many of them were obsolete since v24

ericdallo16:04:07

Probably for mac users this is a more convenient install method ☝️

Drew Verlee16:04:33

ill try using the snaps from https://snapcraft.io/emacs.

mpenet18:04:28

You just need to clone the emacs repo first

mpenet18:04:52

It should be easy to modify

mpenet18:04:30

Just remove pgtk if you are not using Wayland

Drew Verlee18:04:57

I'm take a look, thanks a lot!!

mpenet18:04:27

I last used it a few weeks ago. I suppose it still works

mpenet08:04:13

just to confirm, it works with current master, I just recompiled: GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2022-04-07

practicalli-johnny10:04:27

https://launchpad.net/~ubuntu-elisp/+archive/ubuntu/ppa provides nightly builds of Emacs (which is given the version 29.0.50) Add the PPA and apt install emacs-snapshot Most nightly builds are pretty stable, so I tend to install it and not update (unless there are issues) Recommend removing the emacs and emacs-common packages and use the snapshot equivalents Snapshot package will point the emacs command to emacs-snapshot when installed

practicalli-johnny10:04:16

I'd only recommend the Emacs Snap package as a last resort, they take up a lot of space, install multiple copies and have several access constraints

👍 1
Drew Verlee00:04:15

It's really weird that the default (snaps) isn't stable or ideal. is it just transition pains?

Drew Verlee00:04:10

that seems to have worked flawlessly btw john, ty again. ... Edit: i obviously meant "flawlessly" not lawlessness. Wow.

practicalli-johnny00:04:24

I've used the Ubuntu Emacs PPA when ever the Ubuntu release didnt have a version of Emacs I wanted. There have been a surprising number of Emacs releases since the last Ubuntu LTS version was released and it seems the packaging in Debian hasnt kept up. The latest intermediate Ubuntu release includes Emacs 27.1, as does the next Ubuntu release in a few weeks. Emacs 28.1 wasnt released soon enough to be included in the new LTS and so I expect Emacs 28.x to appear as part of the 22.10 Ubuntu release. So for now, I'm using a nightly build via the emacs-snapshot package, which seems to work very well with Spacemacs.

👍 1
teodorlu10:04:11

On Linux, I’ve been running Emacs 28 from source for about half a year. To update simply, git pull , make and sudo make install. I was surprised by how simple that was, and I appreciated avoiding the indirection and packaging. Finding the right branch to track was quite simple too. Emacs source: http://savannah.gnu.org/projects/emacs/ Now that Emacs 28 is out, I guess getting prebuilt binaries should be easier.

paulspencerwilliams18:04:39

What binding do others typically use to copy sexps? I was surprised that smartparens has a sp-copy-sexp function but it has no binding.

dpsutton18:04:23

I just use M-w

dpsutton18:04:33

kill-ring-save

paulspencerwilliams18:04:50

Oh, I've tried that several times but when I do it first time, I get 'The mark is not set now, so there is no region'.

paulspencerwilliams18:04:16

I did something just, although I forget what, which enabled me to use M-w fine,

dpsutton18:04:03

you create a region. put your point somewhere, hit C-[space] and move to the end of your selection. the sexp navigations work great here

paulspencerwilliams18:04:33

Oh right, you have to create the region. I was hoping you wouldn't need to do that like with sp-copy-sexp - I know it's only a few keystrokes...

mpenet18:04:23

expand-region is quite nice for this

👍 1
mpenet18:04:14

And it works for more than s-exps

paulspencerwilliams18:04:44

Oh, that's a package isn't it?

paulspencerwilliams18:04:28

I've installed that before - I was surprised I'd need a separate package to do what I consider such a simple and basic thing, but perhaps it was the right thing to do!

mpenet18:04:36

It's one of my favorite packages, can't live without it now

😊 1
mpenet18:04:36

If you just need to copy sexps it's overkill, but like I said it works with a lot of stuff (quoted values, comments, various semantic things depending on the mode)

paulspencerwilliams18:04:50

Oh yeah, expand-region + M-w work well! Cheers all!

Charles Comstock04:04:01

Expand region is good, but there is also the builtin mark-sexp bound to C-M-SPC or C-M-@.

paulspencerwilliams06:04:37

Ooh, that sounds faster! Cheers

ag21:04:03

Does anyone have a small elisp helper that turns leiningen type deps to deps.edn type (and maybe vice-versa), i.e., [org.clojure/clojurescript "1.11.4"] -> org.clojure/clojurescript "1.11.4" {:mvn/version "1.11.4"} I can probably spend a few minutes to write one, but maybe someone has done that already. Would you be so kind to share? Thanks.

practicalli-johnny10:04:55

Not lisp, but there is a Clojure project that converts Lein deps to Clojure CLI deps. It may provide some ideas https://github.com/hagmonk/depify

👍 1
Benjamin11:04:30

you are right I also wanted this for a while so here:

(defun lein-deps-to-deps (beg end)
  (interactive "r")
  (save-excursion
    (goto-char beg)
    (while (re-search-forward
	    "\\[\\(.+?\\)\\s-\"\\(.+?\\)\"\\]"
	    nil
	    t)
      (replace-match
       "\\1 {:mvn/version \\2}"))))
I forgot to use end
(defun lein-deps-to-deps (beg end)
  (interactive "r")
  (let ((end (save-excursion
	       (goto-char end)
	       (point-marker))))
    (save-excursion
      (goto-char beg)
      (while (re-search-forward
	      "\\[\\(.+?\\)\\s-\"\\(.+?\\)\"\\]"
	      end
	      t)
	(replace-match
	 "\\1 {:mvn/version \\2}")))))

1