From d86094cc3d7e17c72f079c5654aa07d29d177448 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Wed, 17 Nov 2021 20:32:28 -0600 Subject: [PATCH] Debian specific emacs 26.1 incompatible changes --- config-ext.org | 19 ++++++++++--------- config-min.org | 5 +++-- init.el | 4 ++++ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/config-ext.org b/config-ext.org index 502b81c..00a9346 100644 --- a/config-ext.org +++ b/config-ext.org @@ -639,16 +639,17 @@ #+end_src ** Youtube-dl #+BEGIN_SRC emacs-lisp - (add-to-list 'load-path "~/.emacs.d/submodule/youtube-dl-emacs/") - (require 'youtube-dl) + (when (executable-find "youtube-dl") + (add-to-list 'load-path "~/.emacs.d/submodule/youtube-dl-emacs/") + (require 'youtube-dl) - (defun youtube-dl-song (url) - (interactive - (list (read-from-minibuffer - "URL: " (or (thing-at-point 'url) - (when interprogram-paste-function - (funcall interprogram-paste-function)))))) - (async-shell-command (format "youtube-dl -x -f \"bestaudio[ext=m4a]\" \"%s\"; tageditor -s album=\"youtube-dl\" -f *.m4a" url))) + (defun youtube-dl-song (url) + (interactive + (list (read-from-minibuffer + "URL: " (or (thing-at-point 'url) + (when interprogram-paste-function + (funcall interprogram-paste-function)))))) + (async-shell-command (format "youtube-dl -x -f \"bestaudio[ext=m4a]\" \"%s\"; tageditor -s album=\"youtube-dl\" -f *.m4a" url)))) #+END_SRC ** set-default-directory #+begin_src emacs-lisp diff --git a/config-min.org b/config-min.org index 8240297..9c1e4e3 100644 --- a/config-min.org +++ b/config-min.org @@ -756,11 +756,12 @@ #+begin_src emacs-lisp (require 'light-default-theme) (require 'dark-default-theme) - (use-package modus-operandi-theme) (defvar current-theme 'dark) - (defvar light-theme 'modus-operandi) + (when (>= emacs-major-version 27) + (use-package modus-operandi-theme) + (defvar light-theme 'modus-operandi)) (defvar dark-theme 'calm-forest) (defun switch-themes () diff --git a/init.el b/init.el index 95da76c..7cd990b 100644 --- a/init.el +++ b/init.el @@ -13,6 +13,10 @@ ;; activate all the packages (in particular autoloads) (package-initialize) +(when (<= emacs-major-version 26) + (setq gnutls-algorithm-priority + "NORMAL:-VERS-TLS1.3")) + (when (not package-archive-contents) (package-refresh-contents)) ;; fetch the list of packages available