reddit / emacs

A web frontend for your org-files (100% faithful to GNU+Emacs!)

Gopiandcoshow · 2022-12-02 13:05
Gopiandcoshow · 2022-12-02 13:11
This is a little project I've been working on the past week, for a web-frontend for org-mode. [https://github.com/Gopiandcode/emacs-viewer](https://github.com/Gopiandcode/emacs-viewer) Before you bring the pitchforks, hear me out. I'm not suggesting replacing GNU+Emacs with a web page, or heaven forbid an electron app, rather, this is meant to complement an existing Emacs workflow by allowing you to quickly view your current org file in a nicer way. In particular, this application doesn't attempt to parse or understand org-mode in any way - rather it uses emacsclient to ask a running emacs instance to return its internal representation of your org files and then simply presents these in a prettified form in your web browser. My main motivation for this has been envy of a colleague's nice electron-based time-tracking software - keeping track of clocking in and out of tasks has been quite difficult for me in org mode because it's quite hard to see which task you are clocked into, making it very easy to start work on another task, and often leading me to abandon tracking time altogether.
the_sealed_tanker · 2022-12-02 13:36
Late 2000 vibes, thanks
FrozenOnPluto · 2022-12-02 14:38
Way cool. Can’t see from my phone well but with some css’ing it could look really sharp, and fit into the ecosystem in a similar fashion to say org roam ui that shows the mind map link bubbles 3d insane yet awesome thing.. alternate visualizations always fun without the manual export and load step. Fun!
grimscythe_ · 2022-12-02 15:08
I was actually going to build something like this, guess I don't have to! Well done!
andyjda · 2022-12-02 16:21
This looks really cool! I'm fascinated by this, but it's way out of my areas of expertise, so I have some questions that might be a bit dumb, apologies in advance. * I was expecting to see a lot of JS in your code, and was pleasantly surprised to see CL and OCaml. I'm interested in the idea of using Lisps for UI and Web Dev, can you share a quick overview of the tools you're using? and how does OCaml fit into the picture? * what do you mean by "100% faithful to GNU+Emacs"? * would the UI still be customizable from Emacs? * you say the main motivation was to make it easier to see which tasks you're clocked into. Do you think it'd be possible to make a 'leaner' solution that just addresses this specific concern by, for example, changing the color or face of clocked-in tasks inside the org buffer? I think your program is great: seeing your org file with a different GUI is very cool, just wondering if this specific problem could be addressed in a simpler way
Vash265 · 2022-12-02 18:48
Holy shit, thank you. I have a collection of org files I use to take notes about movies I've watched, stuff I did, etc., and I like to reference them in conversation from time to time. But the currently workflow is a PITA since I have to pull it from a dropbox or seafile sync, which isn't one-click, then open it in some janky iOS app. Something like this (perhaps with slightly more polish) would be a godsend.
reckgiven · 2022-12-02 19:22
Very nice! I've also been thinking about something like this for a while. I want to be able to see my todos and quickly capture notes from my phone. My idea is to have a headless emacs running on a server alongside something like this which I can access when I'm away from my computer. I'll definitely give this a go!
vidbina · 2022-12-02 20:48
So dope this, I've been tinkering on https://proto.formation.tools where we show org files as a webpage (with Kanban views as well) to allow no Emacs users to get a "taste" and to lift org out of the Emacs-only personal usage box into the "collab within a diverse team" box. Loving to see multiple projects in this space all with different angles that will make differents groups of folks really happy. I guess there is something in the air for more folks to be looking at this atm. Great work!
vidbina · 2022-12-02 20:51
Off-topic-ish: but I'd be curious to understand how folks collab in general. Especially in the context of the tool I listed before and also in the context of understanding how other org-related tools can help teams collab better. Posted a 3min survey earlier on this and would love the input from anyone in this thread as well. 🙏 https://www.reddit.com/r/emacs/comments/zaed7x/asking_for_how_tech_teams_solved_intel_progress/?utm_source=share&utm_medium=android_app&utm_name=androidcss&utm_term=1&utm_content=share_button
HumanBrainMapper · 2022-12-02 21:18
If it is just for viewing, why not export your org file to html?
KuangPoulp · 2022-12-02 21:31
Nice. Thanks for the work!
rswgnu · 2022-12-02 23:08
u/vidbina, your collaboration tool leveraging Org mode looks very good. Keep at it.
lightshadow1984 · 2022-12-02 23:12
Wow this is awesome, that's for sure I will give a try this week. Thank you for the great work.
noman_032018 · 2022-12-03 04:31
[According to the repo](https://github.com/Gopiandcode/emacs-viewer/tree/master/js), [Js_of_ocaml](http://ocsigen.org/js_of_ocaml/latest/manual/overview) is the answer to where Ocaml fits in for the UI part, and most of the backend is Ocaml. Github appears to be [misclassifying test data](https://github.com/Gopiandcode/emacs-viewer/search?l=common-lisp) for Emacs as Common Lisp.
Gopiandcoshow · 2022-12-03 05:28
Thanks! With regards to your questions, 1. norman_032018 is correct, the entirety of the project is implemented in OCaml, using JS_of_OCaml for compiling OCaml to javascript for the frontend, and the misleading statistics is due to github misclassifying test data as Common lisp. The semantics and specifics of javascript frameworks isn't something that I particularly want to spend much time exploring, so writing everything in OCaml worked out for me. If you wanted to do something similar in Lisp, you could try something like Parenscript. 2. By 100% faithful, I'm referring to the fact that the application doesn't try to parse your org-files itself - it uses Emacs to do that, which means that irrespective of how you customise your org files, it should still be able to understand the org files exactly as Emacs does. 3. Not at the moment, but that could be done and was my initial plan: the server uses emacsclient to communicate with your running emacs instance, so it wouldn't be too hard to make it load a color scheme from the colour scheme of your emacs instance. 4. Certainly, that could be possible, but the problem is that these UI niceties would require additional complexity on top of the org-mode buffer, and I wanted to avoid putting too much strain on my Emacs instance. Changing the colour of tasks when clocked in would go part of the way, but ideally I also wanted to also see a live updated listing of the time I've spent on the task, and implementing this in elisp would probably require an additional timer and overlay for tracking. I usually use EXWM as my window manager, so if Emacs ends up hanging while doing a computation, then my whole window manager hangs.
enilkcals · 2022-12-03 07:27
Neat, great work and thanks for sharing. Have you come across [organice](https://organice.200ok.ch/) which dies similar. They've a channel over on Element(/Matrix).
TheGramm · 2022-12-03 09:16
Awesome!! Is there a dockerfile or should i make one myself?
stoopidjonny · 2022-12-03 10:40
When I used clocking, I had a table that showed how much time I had spent doing all my tasks. It is in the documentation. Does the web interface send any information to emacs? It would be useful to clock in and out using the web interface. But really, if you went this far, might as well make a web app to replace clocking in org mode.
mlk · 2022-12-03 13:43
have you tried [organice](https://organice.200ok.ch/) ? It's quite decent and it loads the org files from Dropbox if you want to, it's the best mobile org-viewer/editor I found. it's not perfect and it's a bit too focused on task management than I care, but I'm happy with it
mlk · 2022-12-03 13:52
I love organice because it's the best solution for me to view and edit my notes, but It wish the UI were more streamlined, I wish I could disable task management entirely; the icons also make no sense whatsoever.
cat-head · 2022-12-03 23:09
> electron app What if I enjoy not having any free ram on my pc?
andyjda · 2022-12-04 16:08
very cool, thanks for the detailed explanation