Added toggle-case and agenda files

This commit is contained in:
julian 2021-07-05 10:34:28 +02:00
parent 0890209060
commit 89bbb4623d
2 changed files with 42 additions and 2 deletions

View File

@ -30,7 +30,7 @@
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
(setq org-directory "~/org")
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
@ -106,3 +106,43 @@
;; '("\\.m$" . matlab-mode))
;; (setq matlab-indent-function t)
;; (setq matlab-shell-command "/urs/local/bin/matlab")
;; (setq org-agenda-files (list "~/org"))
;; (custom-set-variables
;; '(org-directory "~/org")
;; '(org-agenda-files (list org-directory)))
;; (add-to-list 'org-agenda-files "~/org/anothertest.org" 'append)
;; Adding my org-agenda files
;; TODO Maybe only specify one file where all agenda files are listed => Could be edited via commands
(after! org
(setq org-agenda-files
'("/home/julian/Nextcloud/studium/vorlesungen/SS21/luftundraumfahrtlabor/lrl-fragenkatalog.org"
"/home/julian/Nextcloud/studium/vorlesungen/SS21/borddatenverarbeitung/bdv-fragenkatalog.org")))
(map! :map cdlatex-mode-map
:i "TAB" #'cdlatex-tab)
(map! :desc "Open external terminal" :nv "g C" #'toggle-word-case)
(defun toggle-word-case ()
"Toggle the case of current word or text selection."
(interactive)
(let (
(deactivate-mark nil)
$p1 $p2)
(if (use-region-p)
(setq $p1 (region-beginning) $p2 (region-end))
(save-excursion
(skip-chars-backward "[:alpha:]")
(setq $p1 (point))
(skip-chars-forward "[:alpha:]")
(setq $p2 (point))))
(let ((first-char-prop (get-char-code-property (char-after (point)) 'general-category)))
(cond ((string= "Ll" first-char-prop) ; Lower case
(upcase-region $p1 (+ $p1 1)))
((string= "Lu" first-char-prop) ; Upper case
(downcase-region $p1 (+ $p1 1)))
(t (message "Word does not start with a alphabetic character"))))))

View File

@ -139,7 +139,7 @@
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;; julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
latex ; writing papers in Emacs has never been so fun
(latex +cdlatex) ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices