summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-11-24 22:08:12 +0000
committerYann Herklotz <git@yannherklotz.com>2022-11-24 22:08:12 +0000
commit3cc9791003364c338cc6d219c5f144210aa76bef (patch)
tree39b4b7a14bbeba121b3e2b0c9133210c801e9d22
parent21fcdbd1b2a8893b6792c2b4bc5fbb03c23cfc3b (diff)
downloadymh-emacs-3cc9791003364c338cc6d219c5f144210aa76bef.tar.gz
ymh-emacs-3cc9791003364c338cc6d219c5f144210aa76bef.zip
Add diary file
-rw-r--r--init.el17
-rw-r--r--ymh-emacs/ymh-diary.el10
2 files changed, 26 insertions, 1 deletions
diff --git a/init.el b/init.el
index b6de11b..0092091 100644
--- a/init.el
+++ b/init.el
@@ -42,6 +42,7 @@
(global-set-key (kbd "C-.") #'other-window)
(global-set-key (kbd "C-,") #'ymhg/prev-window)
(global-set-key (kbd "C-\\") #'undo-only)
+(global-set-key (kbd "M-SPC") (lambda () (interactive)(insert " ")))
(global-set-key (kbd "C-c l") #'org-store-link)
(global-set-key (kbd "C-c c") #'org-capture)
@@ -90,6 +91,12 @@
(calendar-last-day-of-month month year)))
(= day last-day-of-month)))
+(defun ymhg/electric-space ()
+ (interactive)
+ (if (looking-back (sentence-end))
+ (insert "%\n")
+ (self-insert-command 1)))
+
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
@@ -115,6 +122,7 @@
(setq confirm-nonexistent-file-or-buffer nil)
(setq ring-bell-function 'ignore)
(setq sentence-end-double-space t)
+ (setq truncate-partial-width-windows nil)
(setq-default bidi-paragraph-direction 'left-to-right)
(if (version<= "27.1" emacs-version)
(setq bidi-inhibit-bpa t))
@@ -159,6 +167,9 @@
(internal-border-width . 5)))
(setq auth-sources '("~/.authinfo" "~/.authinfo.gpg" "~/.netrc"))
+ (setq wdired-allow-to-change-permissions t)
+
+ (add-hook 'text-mode-hook #'visual-line-mode)
:config
(unless (string= system-type "darwin")
(menu-bar-mode -1))
@@ -859,7 +870,11 @@ https://yannherklotz.com"))
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
(add-hook 'TeX-mode-hook #'reftex-mode)
- (add-hook 'TeX-mode-hook #'outline-minor-mode))
+ (add-hook 'TeX-mode-hook #'outline-minor-mode)
+ (with-eval-after-load 'latex
+ (define-key LaTeX-mode-map
+ " "
+ #'ymhg/electric-space)))
(setq gc-cons-threshold (* 1024 1024 10))
diff --git a/ymh-emacs/ymh-diary.el b/ymh-emacs/ymh-diary.el
new file mode 100644
index 0000000..9654971
--- /dev/null
+++ b/ymh-emacs/ymh-diary.el
@@ -0,0 +1,10 @@
+;;; ymh-diary.el --- Extensions to the Emacs Diary -*- lexical-binding: t; -*-
+
+;;; Commentary:
+
+;; This file contains extensions to the built-in Emacs Diary. Mainly, it adds a
+;; timezone conversion to the diary display function, so that if
+
+;;; Code:
+
+;;; ymh-diary.el ends here