Hacker News new | comments | show | ask | jobs | submit login
Emacs 26.1 released (gnu.org)
199 points by deng 10 hours ago | hide | past | web | favorite | 71 comments





A few more (personal) highlights from the release:

* New minor mode 'pixel-scroll-mode' provides smooth pixel-level scrolling.

* The networking code has been reworked so that it's more asynchronous than it was (DNS resolution and TLS negotiation do not block Emacs main thread).

* Emacs no longer prompts about editing a changed file when the file's content is unchanged. Instead of only checking the modification time, Emacs now also checks the file's actual content before prompting the user.

* A new submode of 'html-mode', 'mhtml-mode', is now the default mode for html files. This mode handles indentation, fontification, and commenting for embedded JavaScript and CSS.

* Improved CSS mode

* Intercepting hotkeys on Windows 7 and later now works better.


Also better look and feel[1] for Mac (including dark mode) users with

  (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t))
  (add-to-list 'default-frame-alist '(ns-appearance . dark))
[1]: https://imgur.com/aRdxPk0

Wow, just tried it out and it looks really good. What theme are you using? (ref. screenshot)

It's doom-nord from the doom-themes package.

The first just makes my titlebar white, not transparent. The second doesn't seem to do anything. I'm using the updated binary from emacsformacosx.com.

You may need to restart emacs after adding those lines to your config. Creating a fresh frame also seems to work, if you use daemon mode.

Did you do anything to increase your modeline's height?

mhtml-mode sounds interesting, I've been using http://web-mode.org/ to get the same handling of nested CSS/JS in HTML-files.

Also native linum mode.

I suggest to anyone serious w/ Emacs to follow the master branch. I have been compiling once a week since almost a year and did not experience any breakage. My routine is fetch, see the output from "git diff HEAD..FETCH_HEAD -- etc/NEWS | less", pull --ff, compile and install. The benefit being you don't get a whole bunch of news when you update to a major version, but get there gradually; and also the master has the newer features. They keep that branch really stable.

I similarly encourage any Mac users who are serious about emacs to use Mitsuharu Yamamoto's fork, which adds several usability improvements that RMS refuses to endorse and is just generally a better experience on Mac. Mainline GNU Emacs feels clunky and obsolete by comparison.

What are the improvements?

Here is the repo: https://bitbucket.org/mituharu/emacs-mac

Skimming the readme, I see that it's almost entirely mac specific and mostly UX. I can't say they are completely useless but nothing really vital, except the features inherited from Carbon, which seem useful (I really like the concept of AppleScript, i.e. all programs responding to a single programming interface; I guess DBus is supposed to do sth. similar on FreeDesktop, no?).


If anyone else is confused, "sth" is an abbreviation for "something" that was popularised in some countries by dictionaries for non-native English speakers. It's common in continental Europe and the Middle East but obscure in English-speaking countries; "smth", and "sthg" are other common abbreviations that also came from bilingual dictionaries.

that RMS refuses to endorse

What's his rationale?


That Emacs should not give an advantage to non-free operating systems.

Now, because Emacs is free software, this doesn't prevent anyone such as Yamamoto to go and modify Emacs. Rms doesn't want his officially-sanctioned version to have Mac-only improvements, but he also defends the GPL which allows other people to do so. Rms isn't going to go and tell Yamamoto to take down his fork or anything (but he probably will tell macOS users at every opportunity that they are working with an abusive OS).


Couldn't one way out of the impasse be to enhance GNUstep to implement the macOS APIs/features which Yamamoto's fork uses? RMS doesn't want to add features only supported on proprietary platforms, but so long as one free software platform supports the same feature, that should answer RMS' objection.

It might be abusive in the sense that it's nonfree but at least it's functional.

Year of the Linux desktop jokes aside, I've just lately got sick of how broken Linux is on most laptops, even ThinkPads which are supposed to be the gold standard.

My ThinkPad never had working suspend resume, for example, which is just basic stuff that Linux can't seem to get right.

I'm not 24 and childfree any more. I don't have time to fiddle with acpi or systemd.


I've used two Thinkpads. I'm currently on an X1 5th gen running Debian stable and it's the most blissful computer experience I've ever had. Everything works, the damn thing is fast, 12 hours of battery life and it's so light. I don't understand this magic but I'm glad it's there.

Previously I was on an x250 also on Debian stable which also worked flawlessly until I dropped it hard. It was just a little heavier and a little slower than my current X1.

On the topic of Macs being stable; I've seen my coworkers experience a lot of grief during the past few months with some macOS updates.

I'm not saying that the experience is in general better with one setup or another, just that mine has been good. I'm sure your experiences are valid too.


Still the only way to run Linux on your laptop and remain sane is to run it full-screen inside VirtualBox on OSX or Windows.

I have been trying to do this for nearly 20 years now...


Mostly because they'd add a feature on a non-free platform (macOS) that is otherwise missing from a free platform. Notably, color emoji have worked fine forever on macOS, and were then _intentionally broken_ (when I say broken I mean the UI blocked for about ten seconds and then finally either displays a placeholder or something similarly less featureful). The reason for this is because Linux font rendering can't get color emoji right.

Instead of blocking these features, won’t it be better to go fix he free platform? What he is doing only promotes mediocre free software to propagate that will only make user switch to other non-free alternatives - Vsnet and sublime are taking away many emacs users.

That Mac-only features would promote (the closed source) Mac OS X, if I remember correctly.

NIH?

For those unfamiliar with GNU Emacs version numbers, they always start at X.1, not X.0, so this is the first major release after 25.1 released in September 2016.

Lest someone misread this and think that Emacs hasn't had an update in 2 years: That says "major release". The previous release was the 25.3 minor release in September 2017.

And least anyone misunderstand your comment and misses the big picture, those are all in principle minor bugfix (although with some new features).

The release you're referring to has maybe 20 lines of non-autogenerated code changed, and was "an emergency release to fix a security vulnerability in Emacs".

By and large new Emacs features only get released every 2-4 years. If you write any non-trivial Emacs code you're only targeting the major releases, and if you're contributing to Emacs you can expect other users to have your feature in the in their hands by the time your newborn is old enough to walk around and argue with you.

It's one of the remaining free software projects that really takes its time with releases.

1. https://www.gnu.org/software/emacs/history.html


I am not a programmer but have been learning programming since last 2 years.

Only yesterday, I installed emacs and spent half an hour on it. Even opened a tutorial to learn the basics.

But I got irritated pretty soon and gave it up. Now I am thinking about people who use it like a pro. How the hell did they master this beast?


I'm not a programmer but I have dabbled in code for a while. Emacs honestly made me love using my computer again.

Give yourself a full day for the tutorial and then try to stick to it even though for a while you will be slower and clumsier at everything. This will pay off massively.[0]

Make it part of your routine. Apart from coding in it, use it for email (mu4e/offlineimap), for git (magit), as a local and remote file manager, for writing notes and running a diary (org mode), for submitting papers (LaTeX/Auctex), for your terminal...

Speaking for myself, it actually improves my quality of life, and I feel like I've only scratched the surface.

[0] https://stackoverflow.com/questions/10942008/what-does-emacs...


I'd skip e-mail at the beginning, because it can be a real pain to set up (not necessarily on Emacs end - but the whole offlineimap thing, credentials, etc.). But I very much recommend magit - if you're using git, it'll blow your mind.

https://magit.vc/


The way I learned Emacs was by immersing myself in it. I just decided that I would only use Emacs for the next 2 weeks at work, and if it slowed my productivity to a crawl, so be it (it was clearly during a time when there weren't any deadlines). I also was sitting next to someone who had been using it for a few years so I could just yell out "how do I open a file again??" and he'd yell back "control-x, control-f!"

A couple years later our vi friend expressed interest and did the same thing. His monitor was littered with little post-it notes until the muscle memory kicked in.

You might be thinking, is it really worth my time to learn something esoteric like Emacs, but there are many nice perks once it's been learned. It turns out the default keybindings in readline (and every program that uses readline) are Emacs keys, so it's a exciting feeling realizing you just hit C-t in some random program and it transposed the characters like you wanted. macOS also has many Emacs keybindings in the default text field (where they don't conflict with standard mac keys).


Spend another half an hour, only effectively. Open the tutorial, do it. Sure, the keybindings are weird[0], but try to approach them without preconceptions or prejudice. Imagine you're learning professional software for a task you've never done before. Say, 3D modeling or audio work. There, you would just accept the conventions without second-guessing them.

Work on the tutorial, then spend about half an hour to a hour writing some text and code, so that you get used to interactions. Save a couple of files. Open a couple of files. You should be now comfortable enough to do basic work in Emacs. From there, it's practice, reading and exploration.

The cool thing about Emacs is that it's self-documenting. CTRL+h is your friend (in Emacs-speak, C-h). You remember a key combination but are not sure what it does? C-h k key-combination. Remember a function but not where is it bound? C-h w command, or C-h f command - the latter will give you a full documentation of it (and works for other elisp functions as well). Sorta-remember the command? C-h a whatyouremember - will run a regexp search on a list of all commands. Don't remember neither the key nor the command? M-x apropos whatyouremember - this will run a regex search on everything.

Also, the full documentation for Emacs should be available under C-h i. Or, if you are serious about Emacs and have some money to spare, I can recommend this book: https://www.masteringemacs.org/. It will get you up to speed in no time.

Beyond that, Google around. Look for Emacs guides, interesting packages, and interesting Emacs configs (search terms: .emacs, emacs dotfile). They'll introduce you to various productivity and life quality features for which Emacs is so loved.

--

[0] - they're weird because they predate the modern fashion. What you're used to came later, from IBM, and was popularized Microsoft.


We spent a whole hour.

Okay, more seriously, it took me about a month to stop hating Emacs in 2002. I only started because I thought I had no choice. I was a math undergrad, I wanted to write math, and they plopped me in front of Emacs and LaTeX running on Debian. Alright then, I'm here to learn new mathematics, so I'm also going to learn new ways to type mathematics. This is just how we do things in university, I thought.

Fifteen years laters, I haven't stopped using and learning about Emacs. I can't do any serious writing without it.

So, my advice is, if you don't want to keep learning Emacs forever, just stay with whatever you like right now. As a general rule, the Emacs faith does not proselytise. Some of us tolerate Emacs, but you'll have to try it yourself to see if you do.


> I can't do any serious writing without it.

Well that's too bad, as people have done some serious writing using simper tools - a pen, a typewriter... Isn't Notepad (on Windows) a sufficiently good tool to type, say, a novel in? Less distracting it is, for sure. (Well, I heard some people say that Notepad requires an OS to run, whereas Emacs is an OS in its own right, but really?)


Correcting mistakes on a pen is labourious, same with a typewriter. I find Notepad severely limiting too when it comes editing text (how do I set a mark? how do I kill the current line? or what about just the current word? how do I access the kill ring?) not to mention that all of the keybindings are wrong.

I can use something other than Emacs if I have to, but it all feels like I'm tying both arms behind my back and writing with a pen held in my teeth.


"How the hell did they master this beast?"

I came to Emacs from decades of using vim. I installed evil-mode, and then spent about 10 hours a day for about 3 months learning more, installing packages, and tweaking my config until it matched and exceeded what I had in vim.

This is a never-ending process.. and now, about 5 years later, I'm still learning and still tweaking (though my config has been mostly stable for a long time).

I wouldn't necessarily recommend Emacs to someone who's not willing to put in the time and effort to make it in to the editor they need... though they don't necessarily have to spend as much time or effort on it as I have. Everybody has different needs.

Fortunately we live in an age of plentiful, easy to get information, so if you are interested then learning more is just a few clicks away. I'd recommend joining #emacs on the FreeNode IRC network, r/emacs on Reddit, and the Emacs StackExchange. The people there can give you lots of pointers and detailed help when you need it.


> How the hell did they master this beast?

Patience, mostly. Emacs takes a very big up-front investment, but it pays off in the long run.

> I got irritated pretty soon and gave it up

Yeah, that was my first experience, too. ;-) Don't rush yourself. Come back every couple of months and give it another try. Work your way through the tutorial, and if you feel like it's just too hard, don't listen to yourself. You will be amazed at what you can achieve on determination and persistence.

Also, there are IRC channels and discussion boards waiting for your questions. Do not be afraid to ask "stupid" questions. More likely than not, people will be happy to help you.

Last but not least, emacs comes with pretty good documentation. Learning how to to use emacs' online documentation, both the texinfo manual and the online help, can get you surprisingly far.


I was wondering that too. However it ended up having the best highlighting and indenting packages for the languages I was using. It was available on most platforms and most of all worked in an SSH session.

I wouldn't try to learn everything at once would just learn:

1) How to quit 2) How to save a file 3) Basic navigation: up, down, left, right, end of line, beginning of line 4) How to cut a line, and how to paste a line

Some of those you might already know from using bash or even basic text editing on macOS.


Steeep learning curve. Baby steps and don't give up. Make judgement after a month or two.

Key point is you can program it to do what you prefer.


Also: not for everyone.

I keep hearing people mentioning vim and emacs but I have a strong suspicion that if people spent the same time that they now spend learning and customizing vim and emacs learning a more modern IDE or advanced editor they'd be even more effective (except when they need to edit over ssh).

Personally I use Visual Studio Code all day now. But I've also been happy with Netbeans, IntelliJ, eclipse and Sublime. I rarely have to use a mouse or touchpad, it's all alt-tab, wait-a-second, alt-tab, edit, ctrl-s, ctrl-p type parts of a filename, ctrl-arrowkeys, F2 enter new name for a variable or field etc etc.

I've done one honest attempts at learning emacs (and I kind of enjoyed it) + lots of involuntary training on vim (yes, I prefer it to nano).


> if people spent the same time that they now spend learning and customizing vim and emacs learning a more modern IDE or advanced editor they'd be even more effective (except when they need to edit over ssh)

Or except if they need to blog. Or manage repositories. Or manage tasks. Or read e-mail. Or...

The thing with Emacs is that it offers you an universal, consistent interface for everything text. That includes code, but also prose, notes, tasks, repositories, file systems, etc. The interface itself is also hugely extensible (with lots of packages readily available through built-in package manager), and all that extensibility works for everything.

IMO, spending more time in a typical IDE will make you a more effective programmer. But it doesn't extend beyond programming. When you do something else, you have to switch tools. In this way, spending time on Emacs has a better payoff, because the scope is both deeper and broader.


It's not you. The defaults are pretty hostile, in my opinion. It took me three attempts over many years to fall in love with Emacs.

I'm now using Emacs for everything: shell, git, email, file browser, window manager, IRC, slack, as a pdf reader, ... oh, and to edit text files.

My advice is to keep using it. When you notice that something is really weird, run `M-x package-list-packages` to see if someone has already written a package to change the weird behaviour. Ask questions on emacs.stackexchange.com, but also ask Emacs; use C-h to learn about why things are the way they are.

If you don't understand why people love Emacs, consider reading this:

    https://elephly.net/posts/2016-02-14-ilovefs-emacs.html
Give it a try some time again. Or not.

> The defaults are pretty hostile, in my opinion.

They're mostly old. So I guess they might be hostile to the young. I actually dislike some of the newer things like transient-mark-mode. I don't want all of that highlighting just because I have a selection region, and was quick to disable it when they enabled it to make it more "modern":

http://inversethought.com/hg/dotemacs/file/f029c55c6221/dote...


Lots of practice. It’s ok to use an editor like Sublime, too.

I also am trying to use Emacs since everyone says that is so good. Recently i found spacemacs.org . It makes things much easier

Emacs and other editors are like cars. Some like small cars, some others like fast cars or foreign cars, etc.

Use what you like the best.

I use Emacs for some tasks, but for example, for Android development I use Android Studio, because that is more suitable for the task.

(BTW, default Emacs is very foreign. I wouldn't use that. It takes a while until one configures Emacs to one's own taste.)


I wonder what kind of car Emacs would be... maybe an unimog? Or a VW bus. And what would Vim be? And NeoVim? And XEmacs? And Atom? JetBrains? Nano? Ed?

> Emacs

A car with a steam engine inside!


> irritated pretty soon and gave it up

I have spent a lot of time using it, still irritated.


1) realize you may never “master this beast”

2) commit to it for a few weeks and become proficient

3) keep learning


1) realize you may never “master this beast”

Damn, I've been using it for a bit over 21 years and was hoping that I'd almost gotten a handle on it! Oh well, might as well resign myself to it.


Try Spacemacs, it's like the iPhone of Emacs/Vim.

> Flymake has been completely redesigned

Hmm, I just switched to flycheck. Is it worth checking out this new flymake?


TRAMP support for gdrive! That sounds amazing

For the uninitiated, .1 means actual first release.

So this is the first official release of Emacs 26.


Completely OT, but I remember when building Emacs was like "there goes my afternoon". On my current desktop (which is kind of snazzy, I admit), it takes less than 30 seconds wall clock time. This is one aspect of The Future(tm) I definitely appreciate. ;-)

You have one mother of a desktop there. Or, you're not doing a clean build :).

For me, full clean make takes AFAIR something like 10 to 20 minutes. i5-2400, 12GB RAM, SSD drive. Still, totally worth it :). I've been running Emacs 26 for 2 months now.


You are compiling it with "make -j 8" (or -j 4), right?

Oh.

Thanks!


24 bit color support on terminal!!

Do any of you know if tramp does still freeze if remote prompt´s ´text´ has special characters? this is a bug that used to bother me last year.

For those more familiar with emacs; what happened with the idea of moving to guile scheme? Is it done? Abandoned?

It is not an idea that is supported by the whole Emacs community. It is an idea that is supported by the Guile community and RMS. Work has been done to make Guile Emacs work, but it is still slow (as it doesn't seem to compile elisp before running it) and somewhat experimental.

It really just needs someone to make it work more reliably and then demonstrate that it is a desirable thing not just in theory but in practise. Nothing short of doing the work would be sufficient to convince the most active Emacs developers.

The person who had been doing most of the work on Guile Emacs isn't currently making progress on this end, so other interested people are welcome to participate in the effort.

(I'm a Guiler and Emacs user and strongly support the idea of letting Emacs sit on top of the Elisp implementation in Guile.)


> It is not an idea that is supported by the whole Emacs community.

One problem is portability, Emacs Guile means alienating Windows users. Guile does not run on Windows.

As it is now, I can use same Emacs on my home Mac system, on my work Windows 10 computer and on various Linux servers.


Any advice for installing 26.1 alongside a debian repo 25.1.1 build?

Does anyone know if the concurrency support has made it into TRAMP yet? I recently switched to sshfs because I couldn't stand having TRAMP block my editor while saving remote files.

Scrolling with the trackpad seems way better by default, no more mouse-wheel-scroll-amount/mouse-wheel-progressive-speed hacks !

There isn't a windows compile available yet 8( -- yes, i don't have a choice at work.

While it's not the absolute latest version, I've installed emacs 26.1 from https://github.com/m-parashar/emax64/releases So far it's working flawlessly on Windows 10


this is pretty cool:

> TRAMP has a new connection method for Google Drive




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: