Live data from Hacker News

Surprisingly, Emacs on Android is pretty good

kristofferbalintona.me

91–100 of 127 posts

Re: Surprisingly, Emacs on Android is pretty good

#91
post #51

Earlier quoted context omitted.

> I just haven't found Emacs to be particularly productive over SSH. IMO it works best on a local machine, there's just too much in the GUI which isn't as workable over terminal. Font rendering, images, clickable text links all take a hit. None are really deal breakers, but Emacs TUI just kind of feels like an afterthought. X11 over SSH doesn't feel responsive to me. But that's what tramp is for, it works nicely and…

How does it handle things like project heirarchy? Does folder browsing work? Can I use an org-roam database? I've used TRAMP to open single files over SSH, but it seems less functional than mounting with FUSE. But I haven't looked into it extensively. I am definitely going to build out that bash script for the second use case, that sounds excellent. Thanks, I had no idea you could do that

Yes, it works basically everywhere you'd interact with a local file or directory.

For example, you open a remote dired buffer with C-x C-f /ssh:host:/dir/. Afterwards, opening a file or navigating to a directory will open it remotely as well. You can also use project functions or magit seamlessly. I have plenty of bookmarks remotely etc.

Fundamentally, you just prepend "/ssh:[user@]host:" to any path or file operation and things will magically Just Work (tm).

Re: Surprisingly, Emacs on Android is pretty good

#92
post #12

I've been using Emacs 30 on my android tablet for a few months now with a bluetooth keyboard. Needless to say, you can't really leverage eglot so it's basically a no-go for any meaningful software development. I've been using it for org-mode and it is fantastic for that.

If you've got it installed as suggested in the article, with its own termux installation, can't you compile the LSPs there and use them with eglot?

Re: Surprisingly, Emacs on Android is pretty good

#93

Earlier quoted context omitted.

I agree with you on UX but disagree with everything else. If you use native elisp compilation, I find its speed to rival an average editor. Completions can be slow in lsp-mode but still faster than VSCode (and emacs itself ships with eglot, a less full featured alternative to lsp-mode, but may be faster. I haven't used it enough to judge.) This is due to shelling out to LSPs and the fact that not all LSPs are particu…

> Defaults emacs ships with today are really good. They're really not. It still defaults to opening a split window, still litters #foo# and foo~ files in the directory of whatever you're editing, and still comes with few language modes supported out of the box, let alone set up to automatically spawn and use LSP servers. Running a macro over a 10,000 line file is still incredibly slow on a 1-year old mac. Many common…

You may have two dozens years of emacs, but I fear you’ve not grasped the philosophy of emacs, if that is the list of complaints.

> split windows.

Why would I want a new window to replace the one I’m in. If I want to look at an info manual, I want it to start in a new window instead of the one that I’m looking it. My understanding is that there are main tasks and secondary tasks. Switching main tasks replace the current windows, starting secondary tasks pop up a new one. And those pops up are usually dismissed by typing q.

> still litters #foo# and foo~ files in the directory of whatever you're editing

Backup files and autosaved files are good. Especially if the edited file is not versioned. It’s the correct choice as some users are not programmers.

> few language modes

How many toolchain are installed on a newly installed OS? And major modes are not only for syntax.

> LSP servers

Eglot is built in and has a good set of default for current servers. But why should Emacs install stuff for me. It does not know how I want to install them.

> macro over a 10,000 lines

macros do run the full set of the commands as it would run in a normal invocation time the amount of repetition. And there are other approaches like an awk script that may be faster for your usecase.

> common functions…bound to chains of two…three keystrokes

Emacs have a lot of commands. And if you used something a lot, you can bind it to a more accessible bindings.

> mysterious ctrl-u prefix

If it’s mysterious after two dozen years, then I wonder if you ever give the manual a glance. It is for providing an argument to the command and it’s commonly used for providing an alternate behavior to the default one. Like ‘g’ is recompile in a compilation buffer and ‘ctrl-u g’ asks for the command to use for the new iteration instead of reusing the old one.

Re: Surprisingly, Emacs on Android is pretty good

#94

Ultimate .emacs on termux, note python-hook (menu-bar-mode -1) (setq inhibit-splash-screen t) (setq inhibit-startup-echo-area-message t) (global-set-key "å" 'hippie-expand) (global-set-key "∆" 'toggle-truncate-lines) (global-set-key (kbd " ") 'toggle-truncate-lines) (xterm-mouse-mode 1) (global-set-key (kbd " ") 'scroll-up-command) (global-set-key (kbd " ") 'scroll-down-command) ; (global-set-key (kbd " ") 'scroll-up…

What keyboard are you using? one where å Å ∆ F12 are easily accessible?

Is there a good interface to (GUI?) openscad from termux?

Re: Surprisingly, Emacs on Android is pretty good

#95
post #64

Earlier quoted context omitted.

You may have a very justified reason to switch, including nnot liking one aspect of emacs. But you are presenting it as a general flaw. Which people cannot obviously accept as it’s fine for them and they are not experiencing your issue (and as you know, everyone’s setup and workflow are different) As for the single threaded nature of it, it doesn’t bother me. Because what should be async already is. The only thing le…

> it doesn't bother me Right, so what you're really saying is that you are totally fine with your editor being unresponsive and janky during regular editing workflow, working with modern tooling, and that everyone else is just wrong for not feeling the same way. You do you. I lived with the same copium excuse for years, obviously, but I've moved past that now and into the year 20xx. I love emacs and truly wish that I…

Modern tooling part one: tried using an LSP with emacs (35+ year user) ... gave up after 3 days, it provided absolutely nothing to my workflow.

Modern tooling part two: via M-x grep (bound to F1) use ag(1) or rg(1) instead of grep to explore my codebase, runs async and finishes more or less before my "emacs pinkie" is ready to touch another key.

Re: Surprisingly, Emacs on Android is pretty good

#96
post #52

Earlier quoted context omitted.

I agree with you on UX but disagree with everything else. If you use native elisp compilation, I find its speed to rival an average editor. Completions can be slow in lsp-mode but still faster than VSCode (and emacs itself ships with eglot, a less full featured alternative to lsp-mode, but may be faster. I haven't used it enough to judge.) This is due to shelling out to LSPs and the fact that not all LSPs are particu…

I've been using emacs for 15 years as my daily editor. One thing that never fails is that when I share the fact that I've switched away, emacs users fall over themselves to tell me I'm wrong. I assure you that my emacs setup is as optimized as it can be. Native compilation, all that jazz. I've compiled my own. But emacs is ultimately a lost cause unless something drastic changes. The single threaded nature of it mean…

You get the same behavior from any editor, though? Hell, you'd probably get similar behavior if you switched brands of power tools. People are attached to their tools.

That said, it would help if you didn't have hyperbole there. Many of us do not, in fact, have to live with the editor freezing on a regular basis.

Re: Surprisingly, Emacs on Android is pretty good

#97
post #94

Ultimate .emacs on termux, note python-hook (menu-bar-mode -1) (setq inhibit-splash-screen t) (setq inhibit-startup-echo-area-message t) (global-set-key "å" 'hippie-expand) (global-set-key "∆" 'toggle-truncate-lines) (global-set-key (kbd " ") 'toggle-truncate-lines) (xterm-mouse-mode 1) (global-set-key (kbd " ") 'scroll-up-command) (global-set-key (kbd " ") 'scroll-down-command) ; (global-set-key (kbd " ") 'scroll-up…

What keyboard are you using? one where å Å ∆ F12 are easily accessible? Is there a good interface to (GUI?) openscad from termux?

Å is in Finnish Keyboards, but totally useless. F12 is easily accessible in Hacker's Keyboard. ∆ is in Gboard.

There no gui, you use openscad to generate STL and view that in Android STL-viewer. You can automatize it so that it is almost like the real thing.

  file_to_watch=$1
  last_modified=$(stat -c %Y "$file_to_watch")
  while true; do
      current_modified=$(stat -c %Y "$file_to_watch")
      if [ "$last_modified" != "$current_modified" ]; then
          openscad $1 -o $1.stl
          last_modified="$current_modified"
      fi
      sleep 1  # Check every second
  done

Re: Surprisingly, Emacs on Android is pretty good

#98

Earlier quoted context omitted.

Don't be embarrassed by a setup that works. In the spirit of hopefully constrictive feedback: A/B: Any reason not to do emacs or neovim everywhere? You can copy your dotfiles to the server if needed? C: I wouldn't/don't use Dropbox either. If bash+scp works then great, but have you considered keeping your files in git? Still easy to sync over ssh from one machine to another, but natively handles things like sync conf…

I just haven't found Emacs to be particularly productive over SSH. IMO it works best on a local machine, there's just too much in the GUI which isn't as workable over terminal. Font rendering, images, clickable text links all take a hit. None are really deal breakers, but Emacs TUI just kind of feels like an afterthought. X11 over SSH doesn't feel responsive to me. Its almost more of an aesthetic choice really, its j…

> but Emacs TUI just kind of feels like an afterthought

This reads as a testament to how far the Emacs GUI has progressed!

Re: Surprisingly, Emacs on Android is pretty good

#99
termux is actually a pretty good little linux distro. i still keep wondering if the vm/container thing they shipped in recent versions of android for pixel will subsume it.

i was really hoping that with the display port over usb-c out that appeared in pixel 9 that there would be a useful desktop that could potentially support laptop replacement, but it seems all the desktop mode, termux and termux with x over vnc (or whatever it is) seem not quite mature. could be cool though, although, maybe better if there were a wireless link for the display and a way to have it not interfere with the phone being a phone.

Re: Surprisingly, Emacs on Android is pretty good

#100
post #17

Specifically for org, and specifically for org-roam, it's pretty good, but not good enough. It's not as good as desktop emacs, and it's also somehow not as good as a 1st class android app. the fdroid build of emacs doesn't really work very well with my org-roam, so i use a termux build,,, well nix-on-droid+emacs-overlay... and it's fine, for capture and recall. but i'm not authoring a lot of text with it. a custom ex…

If you swipe left on the shortcut bar ("esc" "/" etc) in the termux keyboard, it switches to a word oriented text input area where you can use predictive text and swipe text. Swipe that area right when done to get back to the modifiers

i find that unless i swipe perfectly, the input is considered in the textbox not the bar, so i can't easily swipe out of it. :( have never really got the hang of it. i wish there was a button to swap in/out, i guess i could do some simple android dev but i'd rather not
Post reply on HN