a friend of mine recomended that I use a program called obsidian to make notes,and I quite liked the idea, but i didn't like the program. I have been searching and it seeams to me that org-roam in emacs is a better alternative, but I lack the graph option that is present on obsidian, searching I found that there is a org-roam-ui package https://github.com/org-roam/org-roam-ui that does just that, but it opens in a web browser outside emacs, which I don't like at all (I find distracting having to manage several programs to get one task done, so much that for writing LaTeX in emacs I have been asking around and got to use pdf-tools to view the pdf inside emacs and now I am trying to get the continuous scrolling in pdf-tools to work without having to type M-x pdf-view-roll-minor-mode whenever I open a new pdf-tools view buffer How to change a variable value imediately after a buffer is open?).

I found https://github.com/org-roam/org-roam-ui/issues/52 that using a compiled version of emacs with xwidgets (--with-xwidgets) I could open the browser graph inside emacs in a somewhat seamless way, so I compiled and did every thing that I needed to do, and following https://www.emacswiki.org/emacs/EmacsXWidgets I tried to use M-x xwidget-webkit-browse-url RET in the usual emacs launch but emacs crashed, then I saw that I needed to launch the src/emacs where src is the src directory inside the directory where I have cloned the Git repository for the compilation of emacs, it crashed again. But again in https://github.com/org-roam/org-roam-ui/issues/52 it said:

If Emacs then proceeeds to crash with SIGTRAP, your WebKitGTK has a bug. See etc/PROBLEMS

which I will probably look into in the far future because I am a complete noob in emacs, and after it said to run emacs in the terminal with SNAP=1 SNAP_NAME=1 SNAP_REVISION=1 src/emacs, since I get confused with the way paths work in general (like I should probably run something like SNAP=1 SNAP_NAME=1 SNAP_REVISION=1 /home/felipe/emacs/src/emacs because this is the "global" path to src/emacs in my computer, right? Or at least it is what shows when I acess the src folder in which that emacs is.),so I actually opened the terminal opened the src folder in it and executed SNAP=1 SNAP_NAME=1 SNAP_REVISION=1 emacs in the terminal, but long story short it opened emacs and using M-x xwidget-webkit-browse-url I was able to acess google inside emacs!!!! It worked!!!

So is there a way to make a shortcut to emacs that runs SNAP=1 SNAP_NAME=1 SNAP_REVISION=1 /home/felipe/emacs/src/emacs in the terminal when I click on it so as to not have to repeat this every time? And is there a way to do this that doesn't keep the terminal window open, only emacs?

Like I said I am a complete noob in this, it is a set of small miracles that I got AUCTeX to work with (a forked version of) pdf-tools and then to have image-roll.el work in that, another set of small miracles was being able to compile emacs from source with xwidgets (which I actually failed at a computer of my university because I think it got to japanese glyphs and there wasn't enough ram and so I got a stack overflow) and to be able to open a browser window inside emacs after.

I know that the way I am approaching this is very inelegant, but I will try to make all things work first and if anyone has any suggestions to make all of this a little bit less of a patchwork I am fully open to sugestions.

  • 1
    Buried in that text is the word "click" -- so by "shortcut" you specifically mean some kind of icon? I don't use desktop icons, but by my recollection you can generally right-click on them and edit the command to be whatever you want, so maybe try doing that? I guess you're using a GNU/Linux version (as you're talking about xwidgets), so I believe your desktop icons may also exist somewhere as *.desktop text files which could be edited, so you may be able to create a new one of those.
    – phils
    Commented May 29, 2022 at 20:54
  • yes a shortcut icon in the taskbar.
    – user38135
    Commented May 29, 2022 at 21:01
  • 1
    This question has nothing to do with Emacs, your web broser, org-roam, or widgets. It has everything to do with your desktop environment, and there are several of them. You’re probably running Gnome, or possibly KDE, or maybe something else. Gnome and KDE both support .desktop files, and follow this specification: specifications.freedesktop.org/desktop-entry-spec/latest. Usually you would place these in ~/.local/share/applications. Consult the documentation of your desktop environment for all the details.
    – db48x
    Commented May 29, 2022 at 21:51
  • @db48x about it having nothing to do with emacs and the rest, well, the icon thing is really just a make do solution, the proper solution would be to resolve the bug and not need to use it. Commented May 29, 2022 at 23:16
  • Perhaps, but the question isn’t asking that, and if the asker could debug the crash in any meaningful way they wouldn’t have had to ask about how to put icons on their desktop.
    – db48x
    Commented May 30, 2022 at 0:36


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.