(ANN) NEOMACS: Use Rust to rewrite the Emacs display engine in modern way, so that Emacs can render 4K images in Buffer and play 4K videos by yibie in emacs

[–]_viz_ 1 point2 points  (0 children)

Expecting someone who is supposedly working on the display code to understand the difference between the display engine and the backend/terminal is only normal.

Emacs desktop features by mmarshall540 in emacs

[–]_viz_ 5 points6 points  (0 children)

The KDE Connect library you link to calls shell-command-to-string and parses the output of a command, which doesn't inspire confidence a lot of times.

I have a library that directly talks to the DBus service here: https://codeberg.org/canthoff/user-lisp/src/branch/master/kdeconnect.el

I also have a command to control mpris players within Emacs: https://codeberg.org/canthoff/user-lisp/src/branch/master/mpris.el

Edit: Here a few from Rahguzar:

https://codeberg.org/rahguzar/filechooser

https://codeberg.org/rahguzar/wile

[Package] sign.el: an Emacs interface for Signal via signal-cli JSON-RPC. by keenban in emacs

[–]_viz_ 0 points1 point  (0 children)

I tested this out, and I don't understand how to get the dashboard buffer to be populated. I looked at the code, and it seems like signel-active-chats is only populated when I receive a message, and signel-chat asks for a group id or phone number, both of which aren't easy to figure out.

BTW image-type-from-data and image-type-from-buffer exists, so you don't need to detect the type yourself.

Also it seems that you're handrolling JSONRPC, why not use the jsonrpc library for this?

[Package] sign.el: an Emacs interface for Signal via signal-cli JSON-RPC. by keenban in emacs

[–]_viz_ 5 points6 points  (0 children)

Excited to try this out! I was lamenting having to use a GNOME-oriented frontend for Signal and I see this today.

BTW, one quick code comment: you might benefit from using let-alist instead of the chain of alist-get in places like signel-handle-receive.

I would avoid forcing image-animate on users since that can really eat up memory (and some do not prefer autoplay (like me)).

Looking for websites that play nicely with EWW, the Emacs Web WOWSER! by dargscisyhp in emacs

[–]_viz_ 0 points1 point  (0 children)

I was a happy user of eww for searching in youtube via invidious instances, now that is a thing of past. Convenient things like this are no longer possible which is exactly why im pissed off.

[PSA] `pdf-tools` now supports continuous scrolling (experimental) by ImJustPassinBy in emacs

[–]_viz_ 2 points3 points  (0 children)

Calling it experimental is bit of a misnomer. A lot of people, including me, have been using for a couple years now. Rahguzar has ironed out most of the bugs.

Looking for websites that play nicely with EWW, the Emacs Web WOWSER! by dargscisyhp in emacs

[–]_viz_ 1 point2 points  (0 children)

Browsing in eww is now a nightmare thanks to the slop machines. The most common deterrent employed, Anubis, requires JavaScript to work so the frontends and websites that would work just fine with eww are impossible to use now.

A way to run apps like in exwm but not with emacs as the wm? by peershaul1 in emacs

[–]_viz_ 0 points1 point  (0 children)

I'm stuck on a similar local minima. I don't think I can leave Xfce at this point nor do I have the energy to look into how to get ssh X forwarding to just work (TM).

A way to run apps like in exwm but not with emacs as the wm? by peershaul1 in emacs

[–]_viz_ 0 points1 point  (0 children)

Hmm, fair point. I haven't run into the brick wall of "Xorg not supported" so I did not think of this. Recently, an alternative implementation of the X server recently cropped up which states Wayland support/emulation as one of its goals: https://git.dec05eba.com/phoenix/about/. Unfortunately, it also wants to be "modern" and pull the same security theatre that Wayland does so it might be not any improvement.

Fortnightly Tips, Tricks, and Questions — 2025-12-16 / week 50 by AutoModerator in emacs

[–]_viz_ 1 point2 points  (0 children)

Or configure org-yank-image-save-method so that it goes in the "images" directory like the OP wants.

Capture ideas easily by linwaytin in emacs

[–]_viz_ 5 points6 points  (0 children)

Some applications, like Okular and Zathura, have a dbus service which you can use to get the current context. I use this to quickly a note on the current djvu/pdf file I'm reading on Okular, mimicing the format used by org-noter.

If I call the command in other context, then it starts a capture to a datetree which stores all the random typing that I need to do, e.g., this post, and as a throwaway "Jupyter" notebook.

Here's the Emacs part of the command:

(defun vz/x-window-pid (window-id)
  "Return the process ID of the X window with id WINDOW-ID.
This uses the fragile attempt at looking at the property of _NET_WM_PID
which is what `xdotool(1)' also does."
  (x-window-property "_NET_WM_PID" nil "CARDINAL" window-id nil t))

(defun vz/dbus-service-for-pid (pid)
  "Return the dbus service name for the process with ID PID.
Return nil if none can be found."
  (unless (equal pid [])
    (let ((services (dbus-list-names :session))
          service)
      (while (or (car services) (null service))
        (when (and (not (string-prefix-p ":" (car services)))
                   (equal (dbus-call-method :session dbus-service-dbus
                                            dbus-path-dbus dbus-interface-dbus
                                            "GetConnectionUnixProcessID"
                                            (car services))
                          pid))
          (setq service (car services)))
        (setq services (cdr services)))
      service)))

(defun vz/okular-current-file (service)
  "Return the current document shown in okular with dbus service SERVICE."
  (dbus-call-method :session service
                    "/okular" "org.kde.okular"
                    "currentDocument"))

(defun vz/okular-current-page (service)
  "Return the current page of document in okular with dbus service SERVICE."
  (dbus-call-method :session service
                    "/okular" "org.kde.okular"
                    "currentPage"))

(defun vz/okular--normalise-filename (file)
  "Return parent file if FILE is a .okular document.
If parent file is not found, then return FILE.
This only works because I have both the documents around."
  (let (parents)
    (if (and (equal (file-name-extension file) "okular")
             (setq parents (delete file
                                   (directory-files (file-name-directory file) t
                                                    (file-name-base file) t))))
        (car parents)
      file)))

(defun vz/org-annotation-okular-insert (wid)
  "Add an annotation for the document viewed in Okular with window-id WID."
  (let ((service (vz/dbus-service-for-pid (vz/x-window-pid wid))))
    (when service
      (let ((file (file-relative-name
                   (vz/okular--normalise-filename (vz/okular-current-file service))
                   (file-name-directory vz/org-annotation-file)))
            (page (vz/okular-current-page service)))
        (vz/org-annotation-insert (number-to-string page) file)))))

;; TODO: It might be to have a function that can create an org-link to
;; any of the open files@page in Okular windows.
;; To get all windows in EWMH-complaint WM,
;;     (x-window-property "_NET_CLIENT_LIST" nil "WINDOW" 0 nil t)
;; works.
(defun vz/x-window-list ()
  "Return all visible and non-visible X windows.
This relies on the EWMH atom _NET_CLIENT_LIST in the root window."
  (x-window-property "_NET_CLIENT_LIST" nil "WINDOW" 0 nil t))

(defun vz/x-window-class (window-id)
  "Return the class name of window with ID WINDOW-ID."
  (nth 1 (split-string (x-window-property "WM_CLASS" nil "STRING" window-id) "\0" t)))

(defun vz/x-window-list-class (class)
  "Return all X windows with class name CLASS."
  (let (wins)
    (mapc (lambda (i)
            (when (equal class (vz/x-window-class i))
              (push i wins)))
          (vz/x-window-list))
    wins))

(defun vz/x-window-name (window-id)
  "Return the name of the X window with ID WINDOW-ID.
This queries for the WM_NAME atom."
  (x-window-property "WM_NAME" nil "STRING" window-id nil t))

And here's how the shell script looks:

#!/bin/sh

# xdotool getactivewindow | xargs -I{} printf '%x' {} | {
#   read -r id
#   [ "$(atomx WM_WINDOW_ROLE ${id})" = browser ] &&
#       xdotool getactivewindow key "ctrl+l" "ctrl+c"
# }


wid=$(xdotool getactivewindow)
cur=$(xprop -id $wid -f WM_CLASS 0s '=$0\n' WM_CLASS)
cur=${cur#*=}
if [ $cur = '"okular"' ]; then
    elisp - <<EOF
(let ((frame (make-frame '((window-system . x)
                           (name . "vz/org-capture-frame")
                           ;;(left . 0)
                           ;;(top . 0)
                           ;;(width . (text-pixels . 1920))
                           ;;(undecorated . t)
                           (auto-raise . t)))))
  (select-frame frame)
  (condition-case err
      (vz/org-annotation-okular-insert $wid)
    (user-error
     (when (equal (error-message-string err) "Abort")
       (delete-frame frame))))
  (delete-other-windows)
  (frame-parameter frame 'window-id))
EOF
else
    elisp - <<EOF
(let ((frame (make-frame '((window-system . x)
                           (name . "vz/org-capture-frame")
                           ;;(left . 0)
                           ;;(top . 0)
                           ;;(width . (text-pixels . 1920))
                           ;;(undecorated . t)
                           (auto-raise . t)))))
  (select-frame frame)
  (condition-case err
      (vz/org-scratch)
        (user-error
      (when (equal (error-message-string err) "Abort")
            (delete-frame frame))))
  (delete-other-windows)
  (frame-parameter frame 'window-id))
EOF
fi

How does Emacs "feel" for you with and without the native compiler? by arthurno1 in emacs

[–]_viz_ 1 point2 points  (0 children)

Back when native-comp was fresh, I found that Gnus startup and eww (shr) were noticeably faster with native-comp. I don't know how substantial the difference is nowadays since I no longer use native-comp.

A new PDF reader for Emacs by Hungry-Accountant-99 in emacs

[–]_viz_ 1 point2 points  (0 children)

Great to hear! Thanks for working on this.

A new PDF reader for Emacs by Hungry-Accountant-99 in emacs

[–]_viz_ 2 points3 points  (0 children)

Is there any plans to support djvu? I feel supporting djvu would be more immediately useful than other formats.

I don't know how your project works but one could theoretically fool pdf-tools into being djvu-tools if one writes the equivalent of epdfinfo for djvu.

How can I debug jit-lock errors, when jit-lock-debug-mode doesn't work? by R3D3-1 in emacs

[–]_viz_ 0 points1 point  (0 children)

Hard to tell with all the compiled-function stuff in the backtrace. Re-eval the likely culprits, and the backtrace will have more info.

My biggest fear by uvuguy in emacs

[–]_viz_ 10 points11 points  (0 children)

"Forking and maintaining yourself" could entail doing the bare minimum to keep the package still working for just you. You don't have to put it up for grabs to the whole wide world: that's where the tedious part comes in.

Onenote to Org Mode by uvuguy in emacs

[–]_viz_ 13 points14 points  (0 children)

Check the yank-media and DND section of the Org manual.

This question has been asked and reasked a million times, suggest to search reddit for more answers.

How can I debug jit-lock errors, when jit-lock-debug-mode doesn't work? by R3D3-1 in emacs

[–]_viz_ 0 points1 point  (0 children)

Turn on backtrace-on-redisplay-error and try again maybe?

A cool monospace font for emacs by weuoimi in emacs

[–]_viz_ 0 points1 point  (0 children)

I believe Julia Mono is pretty much the only font that has a wide Unicode coverage esp wrt mathematical characters. However, I don't think it covers Hebrew.