From c1b5891ae9fa8e501f24123e278a5f8c11ec467e Mon Sep 17 00:00:00 2001 From: Marc Date: Sun, 8 Dec 2019 17:53:58 +0000 Subject: [PATCH] some cleanup --- init.org | 162 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 87 insertions(+), 75 deletions(-) diff --git a/init.org b/init.org index 4729572..d3bfd50 100644 --- a/init.org +++ b/init.org @@ -99,47 +99,56 @@ #+END_SRC #+BEGIN_SRC emacs-lisp - (defvar MY--PATH_USER_LOCAL (expand-file-name "~/.emacs.d/user-local/")) - (defvar MY--PATH_USER_GLOBAL (expand-file-name "~/.emacs.d/user-global/")) - (defvar MY--PATH_ORG_FILES (expand-file-name "~/Archiv/Organisieren/")) - (defvar MY--PATH_ORG_FILES_MOBILE (expand-file-name "~/Archiv/Organisieren/mobile/")) - (defvar MY--PATH_ORG_JOURNAl (expand-file-name "~/Archiv/Organisieren/Journal/")) - (setq bookmark-default-file (concat MY--PATH_USER_LOCAL "bookmarks")) - (setq recentf-save-file (concat MY--PATH_USER_LOCAL "recentf")) - (setq custom-file (concat MY--PATH_USER_LOCAL "custom.el")) ;; don't spam init.e with saved customization settings - (setq abbrev-file-name (concat MY--PATH_USER_GLOBAL "abbrev_defs")) - (setq backup-directory-alist `((".*" . ,temporary-file-directory))) - (setq auto-save-file-name-transforms `((".*" ,temporary-file-directory))) - (setq save-abbrevs 'silently) ;; don't bother me with asking for abbrev saving - (setq-default create-lockfiles nil) ;; disable lock files, can cause trouble in e.g. lsp-mode - (defalias 'yes-or-no-p 'y-or-n-p) ;; answer with y and n - (setq custom-safe-themes t) ;; don't ask me if I want to load a theme - (setq sentence-end-double-space nil) ;; don't coun two spaces after a period as the end of a sentence. - (delete-selection-mode t) ;; delete selected region when typing - (save-place-mode 1) ;; saves position in file when it's closed - (setq save-place-forget-unreadable-files nil) ;; checks if file is readable before saving position - - (setq locale-coding-system 'utf-8) - (set-terminal-coding-system 'utf-8) - (set-keyboard-coding-system 'utf-8) - (set-selection-coding-system 'utf-8) - (if (eq system-type 'windows-nt) - (prefer-coding-system 'utf-8-dos) - (prefer-coding-system 'utf-8)) - (blink-cursor-mode -1) ;; turn off blinking cursor - (show-paren-mode t) ;; show other part of brackets - (column-number-mode t) - (setq uniquify-buffer-name-style 'forward) - (setq-default indent-tabs-mode nil) ;; avoid tabs in place of multiple spaces (they look bad in tex) - (setq-default indicate-empty-lines t) ;; show empty lines - (setq scroll-margin 5 ;; smooth scrolling - scroll-conservatively 10000 - scroll-preserve-screen-position 1 - scroll-step 1) - (global-hl-line-mode t) ;; highlight current line - (menu-bar-mode 0) ;; disable menu bar - (tool-bar-mode 0) ;; disable tool bar - (scroll-bar-mode 0) ;; disable scroll bar +(defvar MY--PATH_USER_LOCAL (expand-file-name "~/.emacs.d/user-local/")) +(defvar MY--PATH_USER_GLOBAL (expand-file-name "~/.emacs.d/user-global/")) +(pcase me/whoami + ("home" + (progn + (defvar MY--PATH_ORG_FILES (expand-file-name "~/Archiv/Organisieren/")) + (defvar MY--PATH_ORG_FILES_MOBILE (expand-file-name "~/Archiv/Organisieren/mobile/")) + (defvar MY--PATH_ORG_JOURNAl (expand-file-name "~/Archiv/Organisieren/Journal/")))) + ("work_remote" + (progn + (defvar MY--PATH_ORG_FILES "p:/Eigene Dateien/Notizen/") + (defvar MY--PATH-ORG-JOURNAL "p:/Eigene Dateien/Notizen/Journal/") + (defvar MY--PATH_START "p:/Eigene Dateien/Notizen/")))) + +(setq bookmark-default-file (concat MY--PATH_USER_LOCAL "bookmarks")) +(setq recentf-save-file (concat MY--PATH_USER_LOCAL "recentf")) +(setq custom-file (concat MY--PATH_USER_LOCAL "custom.el")) ;; don't spam init.e with saved customization settings +(setq abbrev-file-name (concat MY--PATH_USER_GLOBAL "abbrev_defs")) +(setq backup-directory-alist `((".*" . ,temporary-file-directory))) +(setq auto-save-file-name-transforms `((".*" ,temporary-file-directory))) +(setq save-abbrevs 'silently) ;; don't bother me with asking for abbrev saving +(setq-default create-lockfiles nil) ;; disable lock files, can cause trouble in e.g. lsp-mode +(defalias 'yes-or-no-p 'y-or-n-p) ;; answer with y and n +(setq custom-safe-themes t) ;; don't ask me if I want to load a theme +(setq sentence-end-double-space nil) ;; don't coun two spaces after a period as the end of a sentence. +(delete-selection-mode t) ;; delete selected region when typing +(save-place-mode 1) ;; saves position in file when it's closed +(setq save-place-forget-unreadable-files nil) ;; checks if file is readable before saving position + +(setq locale-coding-system 'utf-8) +(set-terminal-coding-system 'utf-8) +(set-keyboard-coding-system 'utf-8) +(set-selection-coding-system 'utf-8) +(if (eq system-type 'windows-nt) + (prefer-coding-system 'utf-8-dos) + (prefer-coding-system 'utf-8)) +(blink-cursor-mode -1) ;; turn off blinking cursor +(show-paren-mode t) ;; show other part of brackets +(column-number-mode t) +(setq uniquify-buffer-name-style 'forward) +(setq-default indent-tabs-mode nil) ;; avoid tabs in place of multiple spaces (they look bad in tex) +(setq-default indicate-empty-lines t) ;; show empty lines +(setq scroll-margin 5 ;; smooth scrolling + scroll-conservatively 10000 + scroll-preserve-screen-position 1 + scroll-step 1) +(global-hl-line-mode t) ;; highlight current line +(menu-bar-mode 0) ;; disable menu bar +(tool-bar-mode 0) ;; disable tool bar +(scroll-bar-mode 0) ;; disable scroll bar #+END_SRC Some windows specific stuff @@ -289,31 +298,31 @@ Some windows specific stuff :ID: 3877251e-5ece-4006-baa6-1f1b4846a8f3 :END: #+BEGIN_SRC emacs-lisp - (use-package org - :ensure org-plus-contrib - :mode (("\.org$" . org-mode)) - :init - (add-hook 'org-mode-hook 'company/org-mode-hook) - :config - (setq org-modules (quote (org-id - org-habit - ))) - (setq org-default-notes-file (concat MY--PATH_ORG_FILES "notes.org") - org-agenda-files (list MY--PATH_ORG_FILES - MY--PATH_ORG_FILES_MOBILE) - org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations") - org-log-into-drawer "LOGBOOK") - - ;; some display customizations - (setq org-pretty-entities t - org-startup-truncated t - org-startup-align-all-tables t) - - ;; some source code blocks customizations - (setq org-src-window-setup 'current-window ;; C-c ' opens in current window - org-src-fontify-natively t ;; use syntax highlighting in code blocks - org-src-preserve-indentation t ;; no extra indentation - org-src-tab-acts-natively t)) +(use-package org + :ensure org-plus-contrib + :mode (("\.org$" . org-mode)) + :init + (add-hook 'org-mode-hook 'company/org-mode-hook) + :config + (setq org-modules (quote (org-id + org-habit + ))) + (setq org-default-notes-file (concat MY--PATH_ORG_FILES "notes.org") + org-agenda-files (list MY--PATH_ORG_FILES + MY--PATH_ORG_FILES_MOBILE) + org-id-locations-file (concat MY--PATH_USER_LOCAL ".org-id-locations") + org-log-into-drawer "LOGBOOK") + + ;; some display customizations + (setq org-pretty-entities t + org-startup-truncated t + org-startup-align-all-tables t) + + ;; some source code blocks customizations + (setq org-src-window-setup 'current-window ;; C-c ' opens in current window + org-src-fontify-natively t ;; use syntax highlighting in code blocks + org-src-preserve-indentation t ;; no extra indentation + org-src-tab-acts-natively t)) #+END_SRC ** languages :PROPERTIES: @@ -429,16 +438,19 @@ Customize the org agenda org-super-agenda ** org-caldav + :PROPERTIES: + :ID: 58aa11ef-80f7-4629-a957-a9e00e070136 + :END: Vorerst deaktiviert, Nutzen evtl. nicht vorhanden -BEGIN_SRC emacs-lisp - (use-package org-caldav - :ensure t - :config - (setq org-caldav-url "https://nextcloud.cloudsphere.duckdns.org/remote.php/dav/calendars/marc" - org-caldav-calendar-id "orgmode" - org-caldav-inbox (expand-file-name "~/Archiv/Organisieren/caldav-inbox") - org-caldav-files (concat MY--PATH_ORG_FILES "tasks"))) -END_SRC +#+BEGIN_SRC emacs-lisp +;;(use-package org-caldav +;; :ensure t +;; :config +;; (setq org-caldav-url "https://nextcloud.cloudsphere.duckdns.org/remote.php/dav/calendars/marc" +;; org-caldav-calendar-id "orgmode" +;; org-caldav-inbox (expand-file-name "~/Archiv/Organisieren/caldav-inbox") +;; org-caldav-files (concat MY--PATH_ORG_FILES "tasks"))) +#+END_SRC ** journal :PROPERTIES: :ID: 0b7243ac-049f-4b9c-a062-7a349c515133