Help with emacs-lisp programming
Hello everyone!
Lately I have gotten around to rewriting my Emacs config. I basically merged my old one with what DistroTube "Configuring Emacs" series, of course with changes.
Here is the problematic code snippet:
(use-package dired-open
:config
(setq dired-open-extensions '(
;; Images
("jpg" . "okular")
("png" . "okular")
("webp" . "okular")
;; Video
("mkv" . "mpv")
("mp4" . "mpv")
;; Audio
("flac" . "mpv")
)
)
)
As you can see there is a lot of repetition, so I wanted to make it so that I have three variables image-viewer, video-player and audio-player
.
Here is what I have tried:
("mkv" . video-player)
- gives Wrong type argument: sequencep, video-player
("mkv" . 'video-player)
- gives Wrong type argument: characterp quote
I have also tried setting the variable with defvar and setq. None of them worked.
Do any of you know how to do this properly?