nonreligious

joined 11 months ago
[–] nonreligious@alien.top 1 points 9 months ago (1 children)

What config do you have for mastodon.el in your init.el file?

Do you get any warnings or errors when starting Emacs?

[–] nonreligious@alien.top 1 points 10 months ago

If you have the name of the font you want to use in the LaTeX fragments, have you tried using a LaTeX header at the top of the file, e.g.

#+LaTeX_HEADER:\usepackage{mlmodern}

(Replace mlmodern with whatever typeface you prefer)

If you don't want your .org file to become too cluttered at the start, you could alternatively use a setup file via #+SETUPFILE: /path/to/setup-file.org -- create an org file e.g. setup-file.org, and include a line like

#+LaTeX_HEADER:\usepackage{mlmodern}

or whatever your fixed-pitch/monospace font is supposed to be, as well as all the other options you want to use for LaTeX (like other \usepackage declarations, \newcommand definitions etc.).

[–] nonreligious@alien.top 1 points 10 months ago (1 children)

I see. What's the latest version of webkit that doesn't have this problem? Have you been able to downgrade to it to verify?

 

I built Emacs 29.1 from source a few months ago and it was working pretty smoothly as far as I could tell -- I was mainly using the elfeed-webkit package -- until I tried to use it today and my Emacs session crashed. I was mainly using it in daemon mode, but evem just running emacs -Q and then M-x xwidget-webkit-browse-url RET wikipedia.org results in the error at the end of this post (sorry for the wall of text).

From the EmacsWiki and from reading /etc/PROBLEMS, I tried to use xwidgets-webkit again with SNAP=1 SNAP_NAME=1 SNAP_REVISION=1 emacs -Q, but it results in the same error.

It's probably an issue with my system rather than Emacs -- I'm running this on Manjaro Linux, and emacs-version gives:

GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-08-28

What can I do to fix this?

(Below follows the error message referred to previously:)

Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal
X protocol error: GLXBadWindow on protocol request 152
Serial no: 9165

When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221
For details, see etc/PROBLEMS.
Fatal error 6: Aborted

(emacs:1651212): GLib-WARNING **: 19:56:32.608: g_main_context_prepare() called recursively from within a source's check() or prepare() member.

(emacs:1651212): GLib-WARNING **: 19:56:32.608: g_main_context_check() called recursively from within a source's check() or prepare() member.
Backtrace:
emacs(emacs_backtrace+0x53)[0x55895d109393]
emacs(terminate_due_to_signal+0xb1)[0x55895cf87759]
emacs(+0x8e777)[0x55895cf88777]
emacs(+0x1b5484)[0x55895d0af484]
emacs(+0x1b5564)[0x55895d0af564]
emacs(+0x1b583b)[0x55895d0af83b]
/usr/lib/libX11.so.6(_XError+0x11c)[0x7f99d59b374c]
/usr/lib/libX11.so.6(+0x44858)[0x7f99d59b3858]
/usr/lib/libX11.so.6(+0x44915)[0x7f99d59b3915]
/usr/lib/libX11.so.6(_XEventsQueued+0x5a)[0x7f99d59b39aa]
/usr/lib/libX11.so.6(XPending+0x58)[0x7f99d59a62c8]
/usr/lib/libgdk-3.so.0(+0x87a28)[0x7f99d618ea28]
/usr/lib/libglib-2.0.so.0(+0x5a40b)[0x7f99d5b2a40b]
/usr/lib/libglib-2.0.so.0(+0xb8099)[0x7f99d5b88099]
/usr/lib/libglib-2.0.so.0(g_main_context_pending+0x2d)[0x7f99d5b280ad]
/usr/lib/libgtk-3.so.0(gtk_events_pending+0x13)[0x7f99d63ecfe3]
emacs(+0x1a58bd)[0x55895d09f8bd]
emacs(gobble_input+0x109)[0x55895d0f57a9]
emacs(unblock_input+0x56)[0x55895d0f5be6]
emacs(Fmake_xwidget+0x467)[0x55895d223ed7]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d696e73657274_xwidget_insert_0+0x4d)[0x7f99a215a1cd]
emacs(funcall_subr+0x2a4)[0x55895d1912d4]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d2d6372656174652d6e65772d73657373696f6e2d627566666572_xwidget_webkit__create_new_session_buffer_0+0x1d1)[0x7f99a215e971]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d6e65772d73657373696f6e_xwidget_webkit_new_session_0+0x52)[0x7f99a215eae2]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d676f746f2d75726c_xwidget_webkit_goto_url_0+0x106)[0x7f99a215f056]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/home/nonreligous/.emacs.d/eln-cache/29.1-b9da317a/xwidget-9ccb93b3-12fdd1c0.eln(F787769646765742d7765626b69742d62726f7773652d75726c_xwidget_webkit_browse_url_0+0x109)[0x7f99a215b2e9]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
emacs(Ffuncall_interactively+0x37)[0x55895d187737]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
emacs(Fapply+0x149)[0x55895d1918d9]
emacs(Fcall_interactively+0x45b)[0x55895d187bab]
/usr/bin/../lib/emacs/29.1/native-lisp/29.1-b9da317a/preloaded/simple-fab5b0cf-a050dc2b.eln(F636f6d6d616e642d65786563757465_command_execute_0+0x2b5)[0x7f99bc7cb975]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
/usr/bin/../lib/emacs/29.1/native-lisp/29.1-b9da317a/preloaded/simple-fab5b0cf-a050dc2b.eln(F657865637574652d657874656e6465642d636f6d6d616e64_execute_extended_command_0+0x1e9)[0x7f99bc7ca649]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
emacs(Ffuncall_interactively+0x37)[0x55895d187737]
emacs(Ffuncall+0x10b)[0x55895d18efeb]
...
[1]    1651212 IOT instruction (core dumped)  emacs -Q
 

I'm trying to make my Emacs configuration more reproducible, in part by creating variables with paths to packages, directories which depend on what machine I'm on:

(if my/laptop-p
    (progn
      ...
      (defvar my/mu4e-dir            "/usr/share/emacs/site-lisp/mu4e"
  "Location of local `mu4e' files installed by system package manager")
      ...
                ))

 

Here, my/laptop-p tests if (equal (system-name) "my-thinkpad").

This system works well, so that for the relevant example of mu4e (which is apparently quite tricky to set up in straight.el ) I can use:

(use-package mu4e
  :straight
  (:local-repo my/mu4e-dir
               :type built-in)
               ...
               )

 

The package loads and the configuration works fine.

But doing straight-freeze-versions gives:

straight--dir: Wrong type argument: stringp, my/mu4e-dir

This can be fixed by replacing my/mu4e-dir with the string "/usr/share/emacs/site-lisp/mu4e", but I'd like to avoid this if I can.

  Is there a way I can keep using my defined variable my/mu4e-dir instead of the full path name?

 

Does anyone else have the same problem?

If I run sage-shell:run-sage to get a SageMath shell in Emacs, and run help(), I get the standard help message, which starts with "Welcome to Sage 10.1!".

But if I try help(diff) or any other specific function, Emacs hangs. Doing C-g allows me to use Emacs again, but the SageMath session is no longer responsive: trying to enter any other command results in hanging. Even C-c C-d no longer works, I have to try C-c C-\ and wait for the SageMath kernel to crash, or do M-x kill-process.

This all seemed to work before I upgraded Emacs and changed my package manager to straight.el.

I'm on Emacs 29.1, using sage-shell-mode v0.3.

I've covnfigured it as follows:

(use-package sage-shell-mode
  :straight t
  :defer t

  :custom
  (sage-shell:sage-executable (executable-find "sage"))
  (sage-shell:set-ipython-version-on-startup nil)
  (sage-shell:check-ipython-version-on-startup nil)
  (sage-shell:use-prompt-toolkit nil)
  (sage-shell:use-simple-prompt nil)

  )

(However, I find that the custom settings aren't being respected either ...)

I also use ob-sagemath, which allows me to use SageMath in org-src-blocks, which works fine as far as I can tell.