Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
GNU is Not Unix GUI Open Source Software

Emacs Developers (Including Richard Stallman) Discuss How to Build a More 'Modern' Emacs (lwn.net) 172

LWN.net re-visits the emacs-devel mailing list, where the Emacs 28 development cycle has revived discussions about how to make the text editor more "modern" and attractive to new users: A default dark theme may not be in the future, leading one to think that there may yet be hope for the world in general. But there does seem to be general agreement that Emacs could benefit from a better, more centralized approach to color themes, rather than having color names hard-coded throughout various Elisp packages. From that, a proper theme engine could be supported, making dark themes and such easily available to those who want them...

Another area where Emacs is insufficiently "modern", it seems, has to do with keyboard and mouse bindings. On the keyboard side, users have come to expect certain actions from certain keystrokes; ^X to cut a selection, ^V to paste it, etc. These bindings are easily had by turning on the Cua mode, but new users tend not to know about this mode or how to enable it. Many participants in the discussion said that this mode should be on by default. That, of course, would break the finger memory of large numbers of existing Emacs users, who would be unlikely to appreciate the disruption. Or, as Richard Stallman put it:

It is not an option to change these basic key bindings to imitate other, newer editors. It would create a different editor that we Emacs users would never switch to. It is unfortunate that the people who implemented the newer editors chose incompatibility with Emacs....

The situation with mouse behavior is similar; as several participants in the discussion pointed out, users of graphical interfaces have come to expect that a right-button click will produce a menu of available actions. In Emacs, instead, that button marks a region ("selection"), with a second click in the same spot yanking ("cutting") the selected text. Many experienced Emacs users have come to like this behavior, but it is surprising to newcomers. The right mouse button with the control key held down does produce a menu defined by the current major mode, but that is evidently not what is being requested here; that menu, some say, should present global actions rather mode-specific ones.

Stallman suggested offering a "reshuffled mode" that would bring the context menu to an unadorned right-button click, and which would add some of the expected basic editing commands there as well. This would be relatively easy to do, he said, since mouse bindings are separate from everything else. Besides, as he noted, the current mouse behavior was derived from "what was the standard in X Windows around 1990"; while one wouldn't want to act in haste, it might just be about time for an update.

Other proposed changes involved "discoverability," including the default enabling of various modes, although to incorporate them into GNU Emacs "would often require the author to sign copyrights over to the Free Software Foundation, which is not something all authors are willing to do..."
This discussion has been archived. No new comments can be posted.

Emacs Developers (Including Richard Stallman) Discuss How to Build a More 'Modern' Emacs

Comments Filter:
  • by Freischutz ( 4776131 ) on Saturday September 26, 2020 @09:56AM (#60545590)
    VI rules! Emacs is for dilettantes ...
    • by spudnic ( 32107 )

      They could make vim emulation mode the default and remove all of the emacs keybindings.

      • They could make vim emulation mode the default and remove all of the emacs keybindings.

        Yeah but VI running in Emacs? That's tantamount to heresy.

        • They could make vim emulation mode the default and remove all of the emacs keybindings.

          Yeah but VI running in Emacs? That's tantamount to heresy.

          Then it's been heretical for a long time as VI emulation in Emacs (along with a bunch of other editors) has been around for a while. I've been using Emacs since the mid-late 80s and remember VI emulation (before vim) way back then (perhaps the early 90s).

          • They could make vim emulation mode the default and remove all of the emacs keybindings.

            Yeah but VI running in Emacs? That's tantamount to heresy.

            Then it's been heretical for a long time as VI emulation in Emacs (along with a bunch of other editors) has been around for a while. I've been using Emacs since the mid-late 80s and remember VI emulation (before vim) way back then (perhaps the early 90s).

            Since the 1980s? ... and you missed the editor "holy wars": https://en.wikipedia.org/wiki/... [wikipedia.org] The "editor holy wars" have been an ongoing nerd joke since since around 1985: https://miro.medium.com/max/14... [medium.com]

    • VI rules! Emacs is for dilettantes ...

      A big problem I had was knowing Wordstar on DRDOS, before moving to GNU/Linux. The trouble I had with Emacs was hitting Wordstar control key sequences, and getting all sorts of weird effects, because they mean something different in Emacs. There was a Wordstar mode in Emacs, but it was not good enough to avoid these errors. So I changed to Vim, and learned a completely different editing style, which did not collide with my old Wordstar habits. I have pretty much forgotten Wordstar now.

      • Back around Win3.0 or 3.1, someone invented a way to use the diamond-based cursor system that Wordstar used, for *every* application in Windows. He made the code free, and published it in PCMag or one of those early magazines. I don't know whether anyone still uses it with those key bindings--I adapted the code to use my own vi-inspired keystrokes, except with the control key, rather than modal: ^H for cursor one character left, ^K for one line up, etc. I still use it today, and it works everywhere excep

  • Emacs... (Score:5, Funny)

    by parityshrimp ( 6342140 ) on Saturday September 26, 2020 @10:04AM (#60545600)
    Emacs is a good operating system, but it could use a better text editor.
  • Modern? (Score:5, Funny)

    by ArchieBunker ( 132337 ) on Saturday September 26, 2020 @10:21AM (#60545628)

    Oh where to start. Make it available only a docker container for starters. Strip out all the old commands and make new slightly different ones. Make a click through code of conduct so you don't write anything hateful. Implement a new GUI with icons that resemble the Futurama language. The BitBucket icons are a great example of that.

    • Aquamacs, it does most of what is discussed and integrates nicely into a Mac environment. Having had to use a stock default Emacs on Linux this past year has reminded me how much I take for granted on the Aquamacs side. To install it, just drag to applications folder. To uninstall, drag to trash. My big wish for it is to be able to re-order tabs, but it's such an advance to even have tabs that I'm ok with that.

    • Love it

  • by mveloso ( 325617 ) on Saturday September 26, 2020 @10:23AM (#60545630)

    Oh boy, all 20 of them will have to learn new key bindings. The horror!

    • by ShanghaiBill ( 739463 ) on Saturday September 26, 2020 @10:31AM (#60545660)

      A 2016 Stackoverflow survey found that about ~5% of programmers use Emacs as their development environment.

      That percentage may have diminished as the old order is displaced by padawans, but is certainly far more than 20.

      • Select a programmer at random from a "stackoverflow survey"

        Which is more likely:

        (a) The programmer uses EMACS
        (b) The programmer is about to troll the survey

        So, its 5% you say? 4.7% troll and 0.3% for realz?
        • (b) The programmer is about to troll the survey

          Do you have a Stackoverflow account?

          There is no way to post anonymously, and SO's reputation system is more robust than Slashdot's "karma".

          Stackoverflow is not a hospitable place for trolls.

          I have seen people put their SO id and reputation on their resume. I can't even imagine anyone doing that with their Slashdot account.

          • I have seen people put their SO id and reputation on their resume.

            Always said HR lack technical competence. Hiring based even in part on SO, given its history of wrong code being cut-n-pasted all over the place, kind of proves it.

          • Stackoverflow is not a hospitable place for trolls.

            Stackoverflow is an online game in which the only goal is accumulating points.

        • 4.7 out of 5(%) are trolls? That's 94% of the total, almost everyone. If by "troll" you mean the person said the opposite of what they actually use as an editor, we'd have, according to your "statistics", 94% of 95% who said they don't use Emacs lied (89.3%) + the realz (0.3%) = 89.6% Emacs users. Not bad.
      • Next upgrade, save keymap prefs.
        Next upgrade, default to cua.

        That means all users will have their current defaults, and new users will get the new keymap.

      • by habig ( 12787 )

        Coming at it from another angle: what fraction of people are working (sysadmin, coding, editing shell scripts, config files, etc) on shell on servers? If you're doing that, you're probably using vi or emacs (or, in my own weird case, both)? I suppose someone out there probably uses pico to do this for some reason. Not for long is my guess.

        If we assume the vi/emacs religious wars are evenly split, then 5% emacs then means 5% more vi, which means the fraction of programmers answering that stack overflow

        • by ShanghaiBill ( 739463 ) on Saturday September 26, 2020 @01:47PM (#60546228)

          Weirdos like me who also write emails in emacs, papers and letters using emacs plus latex, etc can't be all that common.

          Perhaps not as uncommon as you think.

          I use Emacs for coding and scripting. So all the keybindings are in my muscle-memory. If someone asks me for the key-bindings to split the screen, I can't even answer without putting my hands on the keyboard and watching what my fingers do*. When you know an editor that well, you are not going to switch to some other app for mail or Latex or any other text editing.

          *It is ^x2.

    • You can't even read; what it says it that of the 20 of us, most would not agree to use new key bindings, and would therefore not learn them.

    • Oh boy, all 20 of them will have to learn new key bindings. The horror!

      I will fight you ... ! :-)

      [ I've been using Emacs since the mid-late 80s. ]

  • by Viol8 ( 599362 ) on Saturday September 26, 2020 @10:24AM (#60545636) Homepage

    ...that does the job of editing text and no more. I don't need a some kind of half baked OS, a built in programming language hardly anyone ever uses (vim also guilty of this), some kind of user "experience", "smart" code highlighting or a shitty code refactorer that almost always gets it wrong. I want insert, delete, search and replace, load, save and thats it. Anything else can be done much better with other command line tools.

    • If you want a minimal text editor, /bin/ed is available.

    • The funny thing is that whatever you're using is probably more like the pejoratives than emacs, which can run on computers so old that only an idiot would think there is a bunch of bloat. It has the same features it had 25 years ago.

    • nano, then.

      • The only sane answer. Yeah make the X key backspace, you know because 50 years ago (literally) there was no standard keyboard.

    • First thing I do in vim is turn off all the stupid default settings that get in my way and make it a default editor. First thing I do in emacs is copy over my customizations so it's not just a default editor.

    • Undo is important, and can't be implemented with other tools.
    • Cheerfully recommend joe - simple keyboard short cuts, the ability to show/hide the help/keyboard shortcuts on the screen, and if you want to go further than a basic text file editor w/o frills it does have syntax highlighting if you enable that. Unfortunately, it isn't likely to be installed by default on most systems (redhat pre-enterprise used to, don't think Debian ever did) but it is in all the relevant repos.

      For the "intro to linux admin" course I teach, I insist on students having VERY basic surviva

    • Notepad for the win!

      Actually, as command line editors go, Microsoft's own EDIT.COM was dead simple to use for new users while still doing everything that you listed. However, if you want to use it, you'll need MS-DOS.

  • by Saffaya ( 702234 ) on Saturday September 26, 2020 @10:27AM (#60545646)

    At first start-up, offer choice of :
    _Classic Emacs keyboard & mouse bindings
    Or
    _Windows-inspired keyboard & mouse bindings

    With a sentence explaining where to find such setting afterwards.

    I do not understand how this isn't evident to everyone.
    This way respects experienced users and accomodates users from another UI paradigm.

    What am I missing here ?

  • Did Emacs even support the system clipboard before Emacs 21 (2001)?
  • Make cua a suggested mode in a menu for basic settings on first install (without config present for those settings). Muscle memory problem solved.

    Of course that wasn't the problem. The problem is that they want to force new users into their way and can't own up to it.

  • Use Electron (Score:3, Insightful)

    by MrBadbar ( 168841 ) on Saturday September 26, 2020 @10:46AM (#60545710)

    I bet if Emacs was rewritten using Electron, javascript instead of elisp, and normal key bindings instead of the carpal-tunnel-inducing keybindings it would be significantly more popular.

    Oh wait, Atom and Visual Studio Code already did this and are hugely popular: https://insights.stackoverflow... [stackoverflow.com]

    Emacs had good ideas to make an extensible editor with a built-in programming language, but the world has moved on to use more modern technologies to build such an editor.

    • You mean "postmodern", not "more modern". Emacs *is* modernity; VS Code is a postmodern mess.
  • by shoor ( 33382 ) on Saturday September 26, 2020 @11:12AM (#60545788)

    Back in the 80s, when personal computers were rather limited, I had an Atari ST. I had been exposed to emacs at work on a unix system, and it was sloooow. But I needed a plain text editor for my atari and I ended up downloading microemacs from some alt.binary newsgroup of Usenet. Binaries on Usenet were uuencoded into ASCII character files that looked to the system like text. You would download them and then uudecode them to get your binary, and that's what I did. And I must say, Micro-Emacs worked pretty well on that Atari. It only had basic functionality, but that was enough to say, write and edit a C program. It resembled emacs to the extent that what it did, it did the emacs way, control A to get to the beginning of a line, control E to get to the end, that kind of thing.

    So I got the muscle memory to use basic emacs commands from micro-emacs. Computers got more powerful so that now even home computers can run emacs in a spritely fashion, and so I use emacs for certain things, but only because I retained that muscle memory from micro-emacs. Maybe Stallman and company should take a look at it.

    • by DrXym ( 126579 )
      I used to use Micro Emacs all the time in my first place of work. Unlike Emacs it started almost instantly and retained the best things about Emacs while jettisoning the bullshit, such as all the lisp that made it slow to start or function.

      I tried moving on to other Emacs clones like jove & joe but eventually graphical editors and IDEs meant I had very little reason to be using a complex command line editor at all. These days if I'm editing something in a console I'll probably just fire up vim and vim

      • I've gone the other way and pushed vim into every corner of my coding and writing experience. I put some effort into learning the VI way, like how to construct complex commands and move efficiently with the keyboard. This has paid off, in that I don't have to deal with differences across mac, windows and linux, all of which I use every day. I could have gone the emacs route the same way but I didn't.

        The block editing features of VIM are really powerful for example, but they really non obvious - you have to

    • I have used the mg editor (formerly MicroGnuEmacs) as my principal text editor since its early days circa 1987. I can make the ^H key do what I want, not what dogma insists.

      Stripped Linux executable is 172816 bytes long. It starts instantly. I have built it to run on-target in embedded systems. The most exotic/fossilized thing required to build it, is ncurses.

      Mg does not work very will on large files; I use one or another ordinary Emacs for plowing through 50MB build logs. In the distant past I hav

  • Users who want usability won't use emacs in any case, and the sooner the poor newbies that stumble in understand they're in the wrong place, the better.

  • Check for .emacs (Score:5, Insightful)

    by bill_mcgonigle ( 4333 ) * on Saturday September 26, 2020 @11:21AM (#60545820) Homepage Journal

    If there are existing emacs preferences in the user's configuration then don't switch behaviors. Don't be such a Dick, Richard.

    • If there are existing emacs preferences in the user's configuration then don't switch behaviors.

      How do you suggest that the newbie user creates their first .emacs while keeping newbie-friendly bindings?

  • by DrXym ( 126579 ) on Saturday September 26, 2020 @11:43AM (#60545880)
    If Emacs devs wanted to modernise the editor they wouldn't have let it get into such a terrible state to start with. It's not like opportunities for modernisation didn't present themselves back when it would have mattered. Remember the XEmacs fork that modernised the L&F and make it suitable for GUIs and the ensuing RMS shitfit that happened with that?

    And it is things like that throughout the life of Emacs which lead us to the modern day where it still isn't modern or user-friendly or fit for purpose in a graphical environment.

    • If Emacs devs wanted to modernise the editor they wouldn't have let it get into such a terrible state to start with.

      I don't know if it's in such a terrible state. It has an active developer community and they've made a lot of improvements over the years.

      • by DrXym ( 126579 )
        Emacs is infamous for the politics and glacial development. It has turned off developers & users and stifled its own agenda / progress. I think XEmacs is demonstrative of that, of how a fork which substantively improved the experience of Emacs was declined for the most laughably bullshit reasons I've ever read.

        So GNU Emacs may have improved over the years but not enough and certainly not sufficiently when so many other programming / developer editors have appeared over the years. I don't think a chang

      • Kids today use ATOM.io and Visual Studio Code node.js electron based editors. They are more flexible and just as powerful and have tons of free add ons with their stores for a t language and debugger imaginable. Emacs is just odd in comparison

        • They are more flexible and just as powerful and have tons of free add ons with their stores for a t language and debugger imaginable.

          That could actually be a description of Emacs. Except Emacs can also be an OS.

          • Let's say you want to learn Rust. In VS Code you open the rust file. VS Code will automatically open the extension store from the marketplace and install RUST autocomplete, syntax highlighter, and even debugger support so you can get the tools you need automatically. Since individuals contribute to it you can choose which add on you want and even see ratings from the community. You can also install emacs keybindings if you want. You can run a shell and Linux and Mac are fully supported just like in emacs.

            Yo

    • Aquamacs, it does most of what is discussed and integrates nicely into a Mac environment. Having had to use a stock default Emacs on Linux this past year has reminded me how much I take for granted on the Aquamacs side.

      In other words, it is modernized. I have not used a better editor that's free or paid, and I've used a lot.

  • by mugurel ( 1424497 ) on Saturday September 26, 2020 @11:44AM (#60545888)
    I'm surprised to see concurrency or threading is not on the agenda. One thing that is really unmodern about emacs is how the UI sometimes freezes until some under-the-hood process is done...
  • by paulpach ( 798828 ) on Saturday September 26, 2020 @12:26PM (#60545984)

    I used emacs in the '90s. I spent many hours tweaking my .emacs file to make it do what I wanted. The only choices in the Unix lab were emacs, vi, and CDE. Nobody liked vi, it was not even perceived as a developer's editor. Almost everybody used CDE and emacs when working on Unix.

    You could not get Unix or Linux at home, everyone had windows or DOS. People normally used whatever editor they had in their windows box, and bring their work to school in a floppy disk. Very few people did some actual coding in the Unix boxes, only minor tweaks. CDE was faster and similar to what they had at home, so it was quite popular.

    Configuring .emacs was rare. Who wants to learn lisp and spend hours programming emacs? People just wanted to tweak their Makefile or fix a hardcoded path separator in java file. People wanted to get work done, not program their editor, not learn new tools they couldn't use at home.

    Fast forward 30 years. You can get emacs in windows and you can install Linux at home. Awesome!
    Emacs still requires to be programmed to customize it. Today's lisp market share is even smaller than in the 90s. The user interface has not changed much in those 30 years either.

    Consider their main competitor: VS code. It has a user interface that is familiar to most developers. It has advanced editor features out of the box such as IntelliSense, emmet, edit multiple lines at the same time, integration with git, etc.... If you open a file that visual studio does not recognize, it will automatically search for a suitable plugin, download, install, and activate it. You have to do that yourself with emacs. It has a built-in extensions marketplace where you can search for and download extensions. It has a settings area where you can customize your editor, no need to program your editor, no need to learn lisp or functional programming. VS code user interface is quite literally decades ahead of emacs.

    Today, if you want a lightweight editor to manage remote servers, vim takes the cake. Emacs is just too slow/bloated for a terminal application. It is usually not even installed. If you want an intuitive graphical text editor for developers, emacs is far behind competitors such as Atom, VS Code, sublime. Emacs is basically being squeezed on both ends.

    I think it is healthy for them to have this kind of conversation, but I fear they waited too long to have it. It may be too late: emacs is already the COBOL of text editors.

  • Disclaimer: Long time no-x cli emacs user here.

    It's #2 to Visual Studio Code right now (don't ask me how VS Code achieved that - I don't know). Emacs being a classic heavy-weight CLI editor should lead the pack in performance. It doesn't and that's somewhat meh.

    Aside from that scripting should be less of a hassle, perhaps with a modern alternative to Emacs Lisp added in. And there should be a modern, post-steam-age sensible default config of keyboard shortcuts. It's a bit of a drag that I have to systematic

  • Just pop-up a dialog (or a command-line inquiry) at install time asking the user what they want. It sounds like basically two options: Experienced User vs. New User. The dialog/inquiry could just say "see the manual for an explanation of the differences", and of course the pop-up could be disabled for unattended installs.

    Or just fork it. Vi has "Vim", Emacs can have Emacsim. Maybe it just needs a new major number like Python 2.x vs. 3.x.

  • ... use echo >> myfile.c

  • by dbialac ( 320955 ) on Saturday September 26, 2020 @08:39PM (#60546946)

    If you're looking for a modern, overly engineered text editor that will bring a contemporary computer to its knees, it's Eclipse.

  • by hcs_$reboot ( 1536101 ) on Sunday September 27, 2020 @01:52AM (#60547240)
    Please, RMS, implement an easy way to switch to Perl regexps.

Avoid strange women and temporary variables.

Working...