@@ -676,9 +676,9 @@ ref: https://github.com/manateelazycat/auto-save
676
676
:defer t
677
677
:bind ("C-j" . rime-force-enable)
678
678
:init
679
- (setq rime--module-path
680
- (expand-file-name (concat "librime-emacs" module-file-suffix) my-lib-dir))
681
679
(when sys-is-windows
680
+ (setq rime--module-path
681
+ (expand-file-name (concat "librime-emacs" module-file-suffix) my-lib-dir))
682
682
(setq rime-share-data-dir (expand-file-name "rime-data" my-etc-dir)))
683
683
684
684
(defun my-*require-rime(&rest _)
@@ -716,7 +716,9 @@ ref: https://github.com/manateelazycat/auto-save
716
716
(fixed-pitch
717
717
((t (:inherit default))))
718
718
:config
719
- (set-fontset-font t 'emoji (font-spec :family "Segoe UI Symbol"))
719
+ (set-fontset-font t 'symbol (font-spec :family "Segoe UI Symbol"))
720
+
721
+ (set-fontset-font t 'emoji (font-spec :family "Segoe UI Emoji"))
720
722
721
723
(set-fontset-font t 'chinese-gbk (font-spec :family "微软雅黑"))
722
724
@@ -2315,31 +2317,49 @@ ref:https://github.com/manateelazycat/toggle-one-window
2315
2317
*** denote
2316
2318
2317
2319
#+begin_src elisp
2318
- (use-package denote
2319
- :ban minimal?
2320
- :straight t
2321
- :custom
2322
- (denote-directory my-notes-dir)
2323
- :config
2324
- (defun denote-blog ()
2325
- "Create blog for publish."
2326
- (declare (interactive-only t))
2327
- (interactive)
2328
- (let ((denote-directory my-blogs-org-dir)
2329
- (denote-prompts '(title))
2330
- (denote-org-front-matter
2331
- "#+title: %1$s
2332
- ,#+date: %2$s
2333
- ,#+author: xhcoding
2334
- ,#+identifier: %4$s
2335
- ,#+hugo_locale: zh
2336
- ,#+hugo_tags: %3$s
2337
- ,#+hugo_categories: %3$s
2338
- ,#+hugo_draft: true
2339
-
2340
- "
2341
- ))
2342
- (call-interactively #'denote-open-or-create))))
2320
+ (use-package denote
2321
+ :ban minimal?
2322
+ :straight t
2323
+ :custom
2324
+ (denote-directory my-notes-dir)
2325
+ :config
2326
+ (defun denote-blog ()
2327
+ "Create blog for publish."
2328
+ (declare (interactive-only t))
2329
+ (interactive)
2330
+ (let ((denote-directory my-blogs-org-dir)
2331
+ (denote-prompts '(title))
2332
+ (denote-org-front-matter
2333
+ "#+title: %1$s
2334
+ ,#+date: %2$s
2335
+ ,#+author: xhcoding
2336
+ ,#+identifier: %4$s
2337
+ ,#+hugo_locale: zh
2338
+ ,#+hugo_tags: %3$s
2339
+ ,#+hugo_categories: %3$s
2340
+ ,#+hugo_draft: false
2341
+
2342
+ "
2343
+ ))
2344
+ (call-interactively #'denote-open-or-create)))
2345
+
2346
+ (defun denote-blog-image-insert (file)
2347
+ "Insert image file to blog."
2348
+ (declare (interactive-only t))
2349
+ (interactive "fImage file: ")
2350
+ (let* ((blog-file-title (denote-retrieve-filename-title (buffer-file-name)))
2351
+ (blog-image-dir (concat (expand-file-name blog-file-title my-blogs-image-dir) "/"))
2352
+ (blog-image-ext (concat "." (file-name-extension file)))
2353
+ (blog-default-image-title (concat blog-file-title (format-time-string "-%H%M%S")))
2354
+ (blog-image-title (read-string "Image title: " "" nil blog-default-image-title))
2355
+ (blog-image-new-name (denote-format-file-name blog-image-dir (denote-get-identifier) nil blog-image-title blog-image-ext nil)))
2356
+
2357
+ (unless (file-directory-p blog-image-dir)
2358
+ (make-directory blog-image-dir t))
2359
+ (copy-file file blog-image-new-name)
2360
+ (org-insert-link "" (concat "file:" blog-image-new-name) "")
2361
+ ))
2362
+ )
2343
2363
2344
2364
#+end_src
2345
2365
@@ -2353,7 +2373,7 @@ ref:https://github.com/manateelazycat/toggle-one-window
2353
2373
(defconst my-hugo-root-dir (expand-file-name "/mnt/d/Blog"))
2354
2374
(defconst my-hugo-root-dir (expand-file-name "~/Blog"))))
2355
2375
2356
- (defconst my-hugo-image-url "https://images.xhcoding.cn/blog/ ")
2376
+ (defconst my-hugo-image-url "https://images.xhcoding.cn/blog")
2357
2377
2358
2378
(defconst my-hugo-post-url "https://xhcoding.cn/post/")
2359
2379
@@ -2386,21 +2406,23 @@ ref:https://github.com/manateelazycat/toggle-one-window
2386
2406
(cond
2387
2407
((and (string-equal type "file") (my-hugo--blogs-image-path-p raw-path))
2388
2408
(progn
2389
- (let* ((image-url (my-blog--convert- image-url raw-path))
2409
+ (let* ((image-url (my-hugo-- image-path-to -url raw-path))
2390
2410
(new-link (org-element-put-property link :path image-url )))
2391
2411
`(,new-link ,desc ,info))))
2392
2412
(t `(,link ,desc ,info))
2393
2413
)))
2394
2414
2395
2415
(advice-add #'org-hugo-link :filter-args #'my-hugo*convert-path-to-url)
2396
2416
2397
- ;; ;; front matter author => authors
2398
- ;; (defun my-blog*convert-author-to-authors(front-matter)
2399
- ;; "Convert author to authors."
2400
- ;; (let ((ret (replace-regexp-in-string "author" "authors" front-matter)))
2401
- ;; ret))
2417
+ (defun my/hugo-export-all-blogs ()
2418
+ "Export all blogs."
2419
+ (interactive)
2420
+ (dolist (file (directory-files my-blogs-org-dir))
2421
+ (when (string-equal "org" (file-name-extension file))
2422
+ (with-temp-buffer
2423
+ (find-file (expand-file-name file my-blogs-org-dir))
2424
+ (org-hugo-export-to-md)))))
2402
2425
2403
- ;; (advice-add #'org-hugo--get-front-matter :filter-return #'my-blog*convert-author-to-authors)
2404
2426
)
2405
2427
2406
2428
(use-package easy-hugo
@@ -2431,6 +2453,7 @@ ref:https://github.com/manateelazycat/toggle-one-window
2431
2453
2432
2454
#+begin_src elisp
2433
2455
(use-package org-download
2456
+ :disabled t
2434
2457
:ban minimal?
2435
2458
:straight t
2436
2459
:after org
@@ -2503,6 +2526,7 @@ ref:https://github.com/manateelazycat/toggle-one-window
2503
2526
#+begin_src elisp
2504
2527
(use-package eaf
2505
2528
:ban minimal?
2529
+ :disabled t
2506
2530
:straight (emacs-application-framework :type git :host github :repo "emacs-eaf/emacs-application-framework"
2507
2531
:files ("*")
2508
2532
:build nil)
@@ -2535,6 +2559,7 @@ ref:https://github.com/manateelazycat/toggle-one-window
2535
2559
2536
2560
#+begin_src elisp
2537
2561
(use-package popweb
2562
+ :disabled t
2538
2563
:ban minimal?
2539
2564
:straight (popweb :type git :host github :repo "manateelazycat/popweb" :build nil)
2540
2565
:commands (popweb-dict-eudic-input popweb-import-browser-cookies)
@@ -2563,17 +2588,20 @@ ref:https://github.com/manateelazycat/toggle-one-window
2563
2588
2564
2589
#+begin_src elisp
2565
2590
(use-package websocket
2591
+ :disabled t
2566
2592
:ban minimal?
2567
2593
:straight t
2568
2594
:defer t)
2569
2595
2570
2596
(use-package websocket-bridge
2597
+ :disabled t
2571
2598
:ban minimal?
2572
2599
:straight (websocket-bridge :type git :host github :repo "ginqi7/websocket-bridge")
2573
2600
:defer t)
2574
2601
2575
2602
2576
2603
(use-package dictionary-overlay
2604
+ :disabled t
2577
2605
:ban minimal?
2578
2606
:straight (dictionary-overlay :type git :host github :repo "ginqi7/dictionary-overlay"
2579
2607
:build nil)
@@ -2592,6 +2620,7 @@ Wanderlust + offlineimap3 + mu
2592
2620
2593
2621
#+begin_src emacs-lisp
2594
2622
(use-package wl
2623
+ :disabled t
2595
2624
:ban minimal?
2596
2625
:straight (wanderlust)
2597
2626
:defer t
@@ -2670,7 +2699,7 @@ Wanderlust + offlineimap3 + mu
2670
2699
2671
2700
#+begin_src emacs-lisp
2672
2701
(when full?
2673
-
2702
+
2674
2703
(defun my-*require-wanderlust (&rest _)
2675
2704
(require 'wl))
2676
2705
@@ -2681,6 +2710,7 @@ Wanderlust + offlineimap3 + mu
2681
2710
2682
2711
#+begin_src emacs-lisp
2683
2712
(use-package alert-toast
2713
+ :disabled t
2684
2714
:ban minimal?
2685
2715
:straight t
2686
2716
:after wl
@@ -2755,6 +2785,7 @@ Wanderlust + offlineimap3 + mu
2755
2785
2756
2786
#+begin_src elisp
2757
2787
(use-package tex
2788
+ :disabled t
2758
2789
:ban minimal?
2759
2790
:straight (auctex)
2760
2791
:defer t
@@ -2772,6 +2803,11 @@ Wanderlust + offlineimap3 + mu
2772
2803
:straight t
2773
2804
:defer t)
2774
2805
2806
+ (use-package websocket
2807
+ :ban minimal?
2808
+ :straight t
2809
+ :defer t)
2810
+
2775
2811
(use-package aichat
2776
2812
:ban minimal?
2777
2813
:defer t
@@ -2948,4 +2984,3 @@ Wanderlust + offlineimap3 + mu
2948
2984
(load (expand-file-name "config.el" my-private-dir)))
2949
2985
2950
2986
#+end_src
2951
-
0 commit comments