2 커밋 01f555b8ea ... c659f9e237

작성자 SHA1 메시지 날짜
  Eiyeron Fulmincendii c659f9e237 Using use-package everywhere was a mistake. 5 년 전
  Eiyeron Fulmincendii c830acc397 Grab some customization from work 5 년 전
2개의 변경된 파일74개의 추가작업 그리고 47개의 파일을 삭제
  1. 70 43
      config.org
  2. 4 4
      init.el

+ 70 - 43
config.org

@@ -78,6 +78,16 @@ Experimenting with that package. I might need to fork it in the future to add th
 (package! pico8-mode :recipe (:host github :repo "Kaali/pico8-mode"))
 #+end_src
 * TODO Config variables to make stuff easily tweakable
+*** Powershell
+#+begin_src emacs-lisp
+(package! powershell.el :ignore (not (eq system-type 'windows-nt)) :recipe (:host github :repo "jschaf/powershell.el"))
+#+end_src
+*** Wikinforg
+#+begin_src emacs-lisp
+(package! wikinfo :recipe (:host github :repo "progfolio/wikinfo"))
+(package! wikinforg :recipe (:host github :repo "progfolio/wikinforg"))
+#+end_src
+* TODO Config variables to make stuff easily tweakable
 * Helper functions
 I had issues before dealing with specific patterns at configuration time. At
 this moment, I don't have all the packages nor do I want to deal with them
@@ -230,8 +240,7 @@ I'm disabling the font icons when one of the fonts (here GitHub's) isn't present
 so I can directly fallback on the unicode symbols. Allows me to tone down the
 visual noise.
 #+BEGIN_SRC emacs-lisp
-(use-package! doom-modeline
-  :config
+(after! doom-modeline
   (if (member "github-octicons" (font-family-list))
       (progn
         (setq doom-modeline-icon t)
@@ -268,6 +277,7 @@ file locations are derived from the org directory), so the ~after!~ hook won't
 update those variables.
 #+BEGIN_SRC emacs-lisp
 (use-package! org
+  :after doom
   :init
   (let ((base-folder-name "Notes"))
     (when (eq system-type 'windows-nt)
@@ -298,8 +308,7 @@ using a different background color.
 Also tweaking the ellipsis character to actually use an ellipsis character and
 disabling the line numbers.
 #+begin_src emacs-lisp
-(use-package! org
-  :config
+(after! org
   (setq org-ellipsis "…")
   (custom-set-faces! '(org-block :extend t))
   (add-hook 'org-mode-hook (lambda () (setq-local display-line-numbers nil))))
@@ -308,8 +317,7 @@ disabling the line numbers.
 I kinda like this feature and want it back on C-k on Org. The current snippet is
 broken, I need to find the proper way to turn digraph input back on.
 #+begin_src emacs-lisp :tangle no
-(use-package! org
-  :config
+(after! org
   (map! :map evil-org-mode-map
         :i "C-k" 'evil-insert-digraph))
 #+end_src
@@ -318,8 +326,7 @@ I'd like to track when I finish tasks. I'm not feeling that adding a note each
 time I close an item might be the best thing as I'd get tired of the prompt
 really quickly. I'll reserve this to manual additions.
 #+BEGIN_SRC emacs-lisp
-(use-package! org
-  :config
+(after! org
   (setq org-log-done 'time))
 #+END_SRC
 ** TODO Org Brain
@@ -328,8 +335,9 @@ default brain(s) down. A small fix to avoid org-brain's key bindings be
 overwritten by evil.
 
 #+BEGIN_SRC emacs-lisp
-(use-package! org-brain
-  :config
+(after! org-brain
+;; HACK @work
+  (setq org-brain-path "C:\\Users\\fdormont\\Documents\\Notes\\Brain")
 (evil-set-initial-state 'org-brain-visualize-mode 'emacs)
 (custom-set-faces!
   `(org-brain-child :inherit fixed-pitch :foreground ,(doom-color 'blue))
@@ -341,8 +349,7 @@ overwritten by evil.
 Working icon display with ~all-the-icons~ to have a small icon before various
 kind of resource links.
 #+BEGIN_SRC emacs-lisp
-(use-package! org-brain
-  :config
+(after! org-brain
   (defun org-brain-insert-resource-icon (link)
     "Insert an icon, based on content of org-mode LINK."
     (let ((starts_with_http (string-prefix-p "http" link)))
@@ -358,6 +365,8 @@ kind of resource links.
                        ;; (propertize (all-the-icons-faicon "file-code-o") 'face '(:foreground "red") )
                        ((string-suffix-p ".pdf" link)
                         (all-the-icons-octicon "file-pdf"))
+                       ((string-match "shadertoy\\.com" link)
+                        (all-the-icons-fileicon "vertex-shader"))
                        ((string-match "\\.cpp" link)
                         (all-the-icons-alltheicon "cplusplus"))
                        ((string-match "\\.cs" link)
@@ -431,6 +440,7 @@ characters.
               :localleader
               :desc "brain" "B" nil
               :desc "Get Id" "Bi" #'org-brain-get-id
+              :desc "Ensure ids" "BI" #'org-brain-ensure-ids-in-buffer
               :desc "Visualize" "Bv" #'org-brain-visualize
         )))
 #+end_src
@@ -447,6 +457,15 @@ Here's some keybindings vaguely inspired from my experience with Spacemacs.
       :desc "Narrow to element" "mNb" #'org-narrow-to-block
       :desc "Widen" "mNw" #'widen)
 #+END_SRC
+(map!  :map org-mode-map
+       (:when (featurep! :lang org +brain)
+        :localleader
+        (:prefix ("B" . "brain")
+                :desc "Get Id" "i" #'org-brain-get-id
+                :desc "Ensure ids" "I" #'org-brain-ensure-ids-in-buffer
+                :desc "Visualize" "v" #'org-brain-visualize
+                )))
+#+end_src
 ** TODO Org-Agenga
 *** TODO French day names
 #+begin_src emacs-lisp
@@ -460,8 +479,7 @@ Here's some keybindings vaguely inspired from my experience with Spacemacs.
 #+end_src
 ** TODO Org-Capture
 #+begin_src emacs-lisp
-(use-package! org
-  :config
+(after! org
   (setq chicken/dreamlog-file (concat org-directory "/Dreamlog.org"))
   (setq
    org-capture-templates
@@ -496,6 +514,13 @@ Here's some keybindings vaguely inspired from my experience with Spacemacs.
       "* %U %?\n %i\n %a" :heading "Notes" :prepend t)
      ("oc" "Project changelog" entry #'+org-capture-central-project-changelog-file
       "* %U %?\n %i\n %a" :heading "Changelog" :prepend t))))
+    #+end_src
+** TODO Wikinfoorg
+#+begin_src emacs-lisp
+(use-package! wikinfo
+  :after org)
+(use-package! wikinforg
+  :after wikinfo)
 #+end_src
 * Pico-8
 Using that [[https://github.com/Kaali/pico8-mode][pico-8 mode]] for Emacs might be fun. It even includes an overlay to
@@ -508,10 +533,13 @@ light mode.
 Mimicking Pico's decision to make tabs as short as spaces due to small screen
 space.
 #+begin_src emacs-lisp
+(use-package! pico8-mode
+  :after lua
+  :config
 (add-hook 'pico8-mode-hook
           (lambda ()
             (setq indent-tabs-mode t)
-            (setq tab-width 2)))
+            (setq tab-width 2))))
 #+end_src
 
 ** Proper non-lua text color
@@ -562,25 +590,25 @@ project folder. There is also a check to detect first the presence of a config
 file before attmepting to invoke hugo to give a sensible message.
 
 #+BEGIN_SRC emacs-lisp
-;;;###autoload
-(defun chicken/hugo-goto-draft ()
-  "Opens an ivy-powered search helper to quickly jump on a draft
+(after! org
+  (defun chicken/hugo-goto-draft ()
+    "Opens an ivy-powered search helper to quickly jump on a draft
 if the current project is the root of a Hugo-powered site."
-  (interactive)
-  (if (file-exists-p! "config.toml" (projectile-project-root))
-      (ivy-read "Open a draft: " (chicken/list-hugo-drafts)
-                :require-match t
-                :history 'chicken/hugo-goto-history
-                :action (lambda (file)
-                          (with-ivy-window
-                            (when file
-                              (let*
-                                  ((root (projectile-project-root))
-                                   (full-file (concat root file)))
-                                (find-file full-file)))))
-                :unwind #'counsel-delete-process
-                :caller 'chicken/hugo-goto-draft)
-    (message "The current project doesn't have a config.toml in the root directory.")))
+    (interactive)
+    (if (file-exists-p! "config.toml" (projectile-project-root))
+        (ivy-read "Open a draft: " (chicken/list-hugo-drafts)
+                  :require-match t
+                  :history 'chicken/hugo-goto-history
+                  :action (lambda (file)
+                            (with-ivy-window
+                              (when file
+                                (let*
+                                    ((root (projectile-project-root))
+                                     (full-file (concat root file)))
+                                  (find-file full-file)))))
+                  :unwind #'counsel-delete-process
+                  :caller 'chicken/hugo-goto-draft)
+      (message "The current project doesn't have a config.toml in the root directory."))))
 #+END_SRC
 ** PROJ Convert GIF to videos
 I like GIFs, that's a fact. But neither your bandwidth nor your CPU will
@@ -761,10 +789,10 @@ after giving an argument."""
 Windows' emoji panel is great but not convenient enough when focusing on the
 keyboard. Let's add a mapping to quickly insert various kaomojis.
 #+BEGIN_SRC emacs-lisp
-(map! (:leader ; Use leader key from now on
-       :desc "Kaomoji" "iK" nil
-       :desc "Shrug" "iKs" (lambda ()(interactive) (insert "¯\\_(ツ)_/¯"))
-       :desc "Shrug (clip)" "iKS" (lambda ()(interactive) (kill-new "¯\\_(ツ)_/¯"))))
+(map! :leader
+      :desc "Kaomoji" "iK" nil
+      :desc "Shrug" "iKs" (lambda ()(interactive) (insert "¯\\_(ツ)_/¯"))
+      :desc "Shrug (clip)" "iKS" (lambda ()(interactive) (kill-new "¯\\_(ツ)_/¯")))
 #+END_SRC
 
 I have further questions adressed to myself regarding the mental sanity behind
@@ -785,12 +813,11 @@ First, the function that will feed ~ivy-read~. It assumes ~es.exe~ is in your
 #+BEGIN_SRC emacs-lisp
 (when (eq system-type 'windows-nt)
   (defun chicken/counsel-es-function (str)
-    (or
-     (ivy-more-chars)
-     (progn
-       (counsel--async-command
-        (format "es.exe %s" str))
-       '("" "working...")))))
+    (or (ivy-more-chars)
+        (progn
+          (counsel--async-command
+           (format "es.exe %s" str))
+          '("" "working...")))))
 #+END_SRC
 
 Then the search function. It is defined when the executable ~es.exe~ can be

+ 4 - 4
init.el

@@ -45,7 +45,7 @@
 
        ;;tabs              ; an tab bar for Emacs
        treemacs          ; a project drawer, like neotree but cooler
-       ;;unicode           ; extended unicode support for various languages
+       unicode           ; extended unicode support for various languages
        vc-gutter         ; vcs diff in the fringe
        vi-tilde-fringe   ; fringe tildes to mark beyond EOB
        ;;window-select     ; visually switch windows
@@ -63,7 +63,7 @@
        ;;objed             ; text object editing for the innocent
        ;;parinfer          ; turn lisp into python, sort of
        ;;rotate-text       ; cycle region at point between text candidates
-       ;; snippets          ; my elves. They type so I don't have to
+       snippets          ; my elves. They type so I don't have to
        ;;word-wrap         ; soft wrapping with language-aware indent
 
        :emacs
@@ -149,7 +149,7 @@
         +dragndrop       ; drag & drop files/images into org buffers
         ;;+hugo            ; use Emacs for hugo blogging
         +jupyter         ; ipython/jupyter support for babel
-        ;;+pandoc          ; export-with-pandoc support
+        +pandoc          ; export-with-pandoc support
         ;;+pomodoro        ; be fruitful with the tomato technique
         ;;+present)        ; using org-mode for presentations
         )
@@ -180,7 +180,7 @@
        ;;(wanderlust +gmail)
 
        :app
-       ;;calendar
+       calendar
        ;;irc               ; how neckbeards socialize
        ;;(rss +org)        ; emacs as an RSS reader
        ;;twitter           ; twitter client https://twitter.com/vnought