I figure I would share this one more time. The thing is so handy I put it on my desktop but the original is blinding white and 1.5:1 aspect ratio. This is a quick recolor and resize to 16:9. There is a 90px margin on top that is sized for the GNOME header so that the content remains visible. Sorry if this post seems redundant. For me, having this reminder to keep trying to use Emacs is just the motivation I need to open a file in Emacs instead of just using gedit quickly.

bonus tip!

On Fedora 40, if you have darkmode set to the default in GNOME, GNU Emacs does not follow the darkmode styling directive for the menu bar. I spent forever trying to make this work in darkmode. If the app is launched using $ GTK_THEME=Adwaita:dark emacs it will start with the menu bar set to dark mode.

However there is a script that actually launches Emacs in /user/bin/emacs-desktop. If you open that file and modify it by adding export GTK_THEME=Adwaita:dark emacs just before the last line, it will launch with darkmode enabled. This is the entire contents of that file:

#!/usr/bin/sh

# The pure GTK build of emacs is not supported on X11, so try to avoid
# using if there is an alternative.

if [ "$XDG_SESSION_TYPE" = 'x11' ]; then
    case "$(readlink -f /usr/bin/emacs)" in
    */emacs-*.*-pgtk)
        if type emacs-gtk+x11 >/dev/null; then
            exec emacs-gtk+x11 "$@"
        elif type emacs-lucid >/dev/null; then
            exec emacs-lucid "$@"
        fi
        ;;
    esac
fi

export GTK_THEME=Adwaita:dark emacs
exec emacs "$@"

I’m not claiming it is the right way. It just worked when I tried it.

  • N0x0n
    link
    fedilink
    arrow-up
    3
    ·
    22 days ago

    Are there any benefits in switching to emacs (or vim?) for casual “power users”? I mean, I do a lot of editing with nano over ssh from a linux desktop or macOS and I get mostly frustrated over shortcuts while editing configuration files and tiny easy to use bash scripts.

    I already had the cognitive dissonance if I should learn either emacs or vim to improve editing speed, but still nano fullfills all my needs :/.

    Seeing your post, raises the same question again. Care to give some personal experience?

    Thanks !

    • sping@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      5
      ·
      edit-2
      19 days ago

      Editing speed is generally not all that significant in my experience. Actual editing is a small fraction of most work IME as a coder and even more when administrating etc…

      Exploring, researching, organizing, executing, debugging, monitoring etc is what most people spend most of their time doing. For actual editing all editors work pretty well.

      Emacs is a text manipulation environment that includes some editors (including vim if you want) that can be very productive in the long run for all of your activities, not just editing, in a coherent integrated manner. Most things boil down to text after all. But takes significant time to ramp up with and get to rich fluidity. It’s an environment that you program and mold to your needs over time.

      I just reached 30 years with it of continuous improvement and related rewards. There is nothing similar out there.

      • N0x0n
        link
        fedilink
        arrow-up
        1
        ·
        19 days ago

        Thanks for your input :))).

        Emacs is a text manipulation environment that includes some editors (including vim if you want) that can be very productive in the long run for all of your activities, not just editing, in a coherent integrated manner. Most things boil down to text after all. But takes significant time to ramp up with and get to rich fluidity. It’s an environment that you program and mold to your needs over time.

        Understood. I’m just doing some light editing on my server mostly doing some text editing here an there (docker files, system files, some bash…) and I really got confused about IDE, terminals, shells and text editing. While emacs looks like a very neat and advanced tool in IT, right now it’s probably overkill for my use case (keeping my services and mini homelab server alive XD).

        I got a Mac as birthday gift (ughhh I hate it somehow…), but I couldn’t find a good workflow between my server (running debian) and Desktop (running endeavour). That’s where I got confused somehow, because shortcuts between devices are completely out of sync even for minimal text editing. (also that shell terminals ≠ text editor)

        However, I found a good compromise today: iTerm2 + micro on my mac. It’s probably a step-up from nano and has better integration with this stupid mac !

        Thank you :)

        • sping@lemmy.sdf.org
          link
          fedilink
          English
          arrow-up
          2
          ·
          19 days ago

          As an Emacs user my typical mode for dealing with server files is to edit them remotely from my local emacs, not using an editor on the server.

          But the commitment required to adopt Emacs isn’t to be underestimated.

    • j4k3@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      21 days ago

      Thus far, Emacs feels like advanced next level bash. I’m looking at all the integrated workflows and ootions. You can hook in RSS, Firefox, email, programming languages, Arduino, serial, SSH, and LLM’s, all within Emacs. It isn’t a text editor, it is everything.

      I think Derek Taylor (Distro Tube on YT) put it best when talking about the way people compare text editors, ‘it isn’t a relevant comparison; like apples to oranges.’ Emacs is not a text editor; Emacs can do text editing. If all you’re doing is text editing, you might be better off with the simple tool. If you are connecting workflows, Emacs is like a glue that can patch everything into one tool. Like you can run Emacs as a server and access files on the remote system through Emacs. Emacs appears to be a language more than anything, but a language between something like Bash and Python in simplicity and flexible scope.

      Today I will be continuing my quest to integrate two large language models in parallel within Emacs. I want to use Emacs to make an agent that includes one of my largest models I can run on my hardware and a code completion specific model.

      Additionally, everyone that appears to actually use Emacs seems to lean heavily into the org-mode stuff. That is one of my biggest curiosities at the moment. Go look at Sasha Chua’s website. Most of that is rendered from org-mode. Org-mode seems to be a super powerful way of organizing your life, taking notes, and presenting information in useful ways.

      I wondered why I don’t hear about people using Emacs like I hear about other tools albeit leet or corpo standard. I think it is because Emacs is extremely intimate. It seems to be so tailored to the individual that it can’t be shared. AI has turned into something like that for me too. The ways I find it to be useful are simply too nuanced to be relatable. I think Emacs is like this too. The ways it becomes useful are so integrated into the periphery and layering of workflows that it is not feasible to extract some small detail to share with another person outside of Emacs users at a similar point along the learning curve.

      • N0x0n
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        19 days ago

        Thank you for your thoughts, tips and references ! Didn’t knew all that, I really thought it was just an advanced text editor !

        Maybe in a few years when I really see/feel and learned more about emacs I will have an other point of view that will actually find any fit in my workflow.

        Still I really like emacs way of editing. Shortcuts feel intuitive.

        Thanks again :)

        Edi: I watched 2 video’s from Derek Taylor, my god this is some crazy stuff. However I think it’s a bit overkill right now. But I gave my editing workflow a step-up ! On my mac iTerm2+micro feels more like “that” something I was looking for.

    • Buildout@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      21 days ago

      I would recommend learning vim in that case. I’m not sure about the availability of vi(m)/emacs on the systems you remote into, but if I was a betting man I’d say vi is more available than vim is more available than emacs. But if you learn vim and are stuck with vi one time it’s still better than nano (for me, but I’m sure you’re quite good with nano). Another benefit that extends outside of your text editing experience is that vim motions are offered out of the box for a lot of linux utilities (less) with no setup, or can be trivially added (tmux), which gives you familiar keybinding almost everywhere as well as an improved ergonomic (and likely speed) advantage.

      • j4k3@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        21 days ago

        I would argue that the only relevant small system is busybox now. That has Vi and Nano IIRC. In most cases, there is likely a way of mounting that system on a host machine or using Emacs to dial into the target. The evilmode bindings are Vim bindings for Emacs.

        When I’m stuck with such a system, the editor is the least of my concerns. All the other Bash commands missing in Ash are the part I struggle with. Like the first thing I’m doing is recreating basic compgen and tree functional equivalents in scripts so that I know my available tools and can navigate the unknown. The lack of manpages, and full flag options descriptions are crippling.