From aeaa01449837248da1bdeccb4c26cc6a1787165e Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Wed, 10 Apr 2024 21:41:07 -0500 Subject: [PATCH 1/3] Adding mu4e to Emacs --- .config/emacs/config.el | 3 --- .config/emacs/config.org | 3 --- .config/emacs/scripts/app-launchers.el | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.config/emacs/config.el b/.config/emacs/config.el index 8edf7d0..140913c 100644 --- a/.config/emacs/config.el +++ b/.config/emacs/config.el @@ -503,9 +503,6 @@ (require 'mu4e) (load-file "~/nc/emacs-stuff/email-mu4e.el") -;; The command used to get your emails (adapt this line, see section 2.3): -(setq mu4e-get-mail-command "mbsync --config ~/.config/emacs/.mbsyncrc distrotube") - (use-package neotree :config (setq neo-smart-open t diff --git a/.config/emacs/config.org b/.config/emacs/config.org index 545aeae..9f3c1e0 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -702,9 +702,6 @@ NOTE For privacy reasons, I'm importing all of my mu4e settings from a separate (require 'mu4e) (load-file "~/nc/emacs-stuff/email-mu4e.el") -;; The command used to get your emails (adapt this line, see section 2.3): -(setq mu4e-get-mail-command "mbsync --config ~/.config/emacs/.mbsyncrc distrotube") - #+end_src * NEOTREE diff --git a/.config/emacs/scripts/app-launchers.el b/.config/emacs/scripts/app-launchers.el index c290791..db57c28 100644 --- a/.config/emacs/scripts/app-launchers.el +++ b/.config/emacs/scripts/app-launchers.el @@ -28,7 +28,7 @@ ;; The 'app-launcher' is a better run launcher since it reads the desktop applications on your system and you can search them by their names as defined in their desktop file. This means that sometimes you have to search for a generic term rather than the actual binary command of the program. (use-package app-launcher - :elpaca '(app-launcher :host github :repo "SebastienWae/app-launcher")) + :ensure '(app-launcher :host github :repo "SebastienWae/app-launcher")) ;; create a global keyboard shortcut with the following code ;; emacsclient -cF "((visibility . nil))" -e "(emacs-run-launcher)" From e2ea74fbde0f1ebafd69d69f0c89580253f99e02 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Fri, 12 Apr 2024 00:26:37 -0500 Subject: [PATCH 2/3] Testing completion-read. --- .config/emacs/config.el | 9 +++++++++ .config/emacs/config.org | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.config/emacs/config.el b/.config/emacs/config.el index 140913c..568eebb 100644 --- a/.config/emacs/config.el +++ b/.config/emacs/config.el @@ -700,3 +700,12 @@ which-key-max-description-length 25 which-key-allow-imprecise-window-fit nil which-key-separator " → " )) + +(defun reader () + (interactive) + (let ((choices '(("First" . 'first-choice) + ("Second" . 'second-choice) + ("Third" . 'third-choice)))) + (alist-get + (completing-read "Choose: " choices) + choices nil nil 'equal))) diff --git a/.config/emacs/config.org b/.config/emacs/config.org index 9f3c1e0..8dad8a4 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -55,6 +55,7 @@ - [[#tldr][TLDR]] - [[#transparency][TRANSPARENCY]] - [[#which-key][WHICH-KEY]] +- [[#test][TEST]] * IMPORTANT PROGRAMS TO LOAD FIRST To keep this =config.org= a reasonable length, I have moved a lot of code to individual scripts that will be sourced by this config. These scripts are found in "~/.config/emacs/scripts" and do not contain any code that most people are likely to need to edit. @@ -1026,3 +1027,15 @@ With Emacs version 29, true transparency has been added. I have turned transpar which-key-separator " → " )) #+end_src + +* TEST +#+begin_src emacs-lisp +(defun reader () + (interactive) + (let ((choices '(("First" . 'first-choice) + ("Second" . 'second-choice) + ("Third" . 'third-choice)))) + (alist-get + (completing-read "Choose: " choices) + choices nil nil 'equal))) +#+end_src From 987492dc041b7a12f6a57be035df64dd74fc6c09 Mon Sep 17 00:00:00 2001 From: Derek Taylor Date: Fri, 12 Apr 2024 09:27:47 -0500 Subject: [PATCH 3/3] Testing completion-read. --- .config/emacs/config.el | 25 +++++++++++++++++++++++-- .config/emacs/config.org | 26 ++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 4 deletions(-) diff --git a/.config/emacs/config.el b/.config/emacs/config.el index 568eebb..690a04c 100644 --- a/.config/emacs/config.el +++ b/.config/emacs/config.el @@ -703,9 +703,30 @@ (defun reader () (interactive) - (let ((choices '(("First" . 'first-choice) + (let ((choices '(("First" . "First") ("Second" . 'second-choice) ("Third" . 'third-choice)))) (alist-get (completing-read "Choose: " choices) - choices nil nil 'equal))) + choices nil t 'equal))) + +(setq yy-keywords + '("touch" + "touch_start" + "touch_end" + "for" + "foreach" + "forall" + )) + + +(defun github-code-search () + "Search code on github for a given language." + (interactive) + (let ((language (completing-read + "Language: " + '("Emacs Lisp" "Python" "Clojure" "R"))) + (code (read-string "Code: "))) + (browse-url + (concat "https://github.com/search?l=" language + "&type=code&q=" code)))) diff --git a/.config/emacs/config.org b/.config/emacs/config.org index 8dad8a4..e363840 100644 --- a/.config/emacs/config.org +++ b/.config/emacs/config.org @@ -1032,10 +1032,32 @@ With Emacs version 29, true transparency has been added. I have turned transpar #+begin_src emacs-lisp (defun reader () (interactive) - (let ((choices '(("First" . 'first-choice) + (let ((choices '(("First" . "First") ("Second" . 'second-choice) ("Third" . 'third-choice)))) (alist-get (completing-read "Choose: " choices) - choices nil nil 'equal))) + choices nil t 'equal))) + +(setq yy-keywords + '("touch" + "touch_start" + "touch_end" + "for" + "foreach" + "forall" + )) + + +(defun github-code-search () + "Search code on github for a given language." + (interactive) + (let ((language (completing-read + "Language: " + '("Emacs Lisp" "Python" "Clojure" "R"))) + (code (read-string "Code: "))) + (browse-url + (concat "https://github.com/search?l=" language + "&type=code&q=" code)))) + #+end_src