aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/init/ycp-editing.el2
-rw-r--r--emacs/.emacs.d/init/ycp-markup.el6
-rw-r--r--emacs/.emacs.d/init/ycp-org.el2
-rw-r--r--emacs/.emacs.d/lisp/my/my-nov.el5
4 files changed, 10 insertions, 5 deletions
diff --git a/emacs/.emacs.d/init/ycp-editing.el b/emacs/.emacs.d/init/ycp-editing.el
index 907c80b..d497f42 100644
--- a/emacs/.emacs.d/init/ycp-editing.el
+++ b/emacs/.emacs.d/init/ycp-editing.el
@@ -30,6 +30,8 @@
;; line wrap at window edge
(setq-default truncate-lines nil)
(setq kill-do-not-save-duplicates t)
+(setq kill-transform-function
+ (lambda (s) (when (string-match-p "[^ \t\n]" s) s)))
(setq bidi-inhibit-bpa t)
(setq save-interprogram-paste-before-kill t)
(setq kill-ring-max 200)
diff --git a/emacs/.emacs.d/init/ycp-markup.el b/emacs/.emacs.d/init/ycp-markup.el
index fcb98ff..548461d 100644
--- a/emacs/.emacs.d/init/ycp-markup.el
+++ b/emacs/.emacs.d/init/ycp-markup.el
@@ -93,11 +93,13 @@
(my-package nov
(:delay 15)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
- (setq nov-text-width 76)
+ ;; No fill, so it requires visual line mode to look nice
+ (setq nov-text-width t)
+ (add-hook 'nov-mode-hook 'visual-line-mode)
(add-hook 'nov-mode-hook 'follow-mode)
(add-hook 'nov-mode-hook (lambda ()
(setq next-screen-context-lines 4)))
- (add-hook 'nov-post-html-render-hook 'my-nov-set-left-margin)
+ (add-hook 'nov-post-html-render-hook 'my-nov-set-margins)
(require 'my-nov)
(my-override nov-render-title)
(my-override nov-scroll-up)
diff --git a/emacs/.emacs.d/init/ycp-org.el b/emacs/.emacs.d/init/ycp-org.el
index ea95d2a..6385a46 100644
--- a/emacs/.emacs.d/init/ycp-org.el
+++ b/emacs/.emacs.d/init/ycp-org.el
@@ -532,7 +532,7 @@
(my-keybind nov-mode-map
"M-n" #'org-remark-next
"M-p" #'org-remark-prev
- "<return>" #'my-org-remark-open-or-create
+ "M" #'my-org-remark-open-or-create
"o" #'org-remark-view
"d" #'org-remark-delete)
(with-eval-after-load 'nov
diff --git a/emacs/.emacs.d/lisp/my/my-nov.el b/emacs/.emacs.d/lisp/my/my-nov.el
index d893017..1bc8eca 100644
--- a/emacs/.emacs.d/lisp/my/my-nov.el
+++ b/emacs/.emacs.d/lisp/my/my-nov.el
@@ -64,8 +64,9 @@ chapter title."
(my-copy-file-with-staging
nov-file-name dest staging)))
-(defun my-nov-set-left-margin ()
- (set-left-margin (point-min) (point-max) 2))
+(defun my-nov-set-margins ()
+ (set-window-margins nil 3 2)
+ (set-window-fringes nil 0 0))
(provide 'my-nov)
;;; my-nov.el ends here