From e7f35f0cc1a4468792264a35ac98b0ba4ebc184d Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Sun, 16 Feb 2020 13:06:42 +0100 Subject: [PATCH 1/8] Add new bookmarks --- eww-bookmarks | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eww-bookmarks b/eww-bookmarks index b3e51a1a..d3ca4108 100644 --- a/eww-bookmarks +++ b/eww-bookmarks @@ -1,2 +1,3 @@ ;; Auto-generated file; don't edit -((:url "https://htdp.org/2018-01-06/Book/" :title "How to Design Programs, Second Edition" :time "Sat Feb 15 10:57:02 2020")) +((:url "https://www.emacswiki.org/emacs/EmacsCrashShortcuts" :title "EmacsWiki: Emacs Crash Shortcuts" :time "Sun Feb 16 13:02:34 2020") + (:url "https://htdp.org/2018-01-06/Book/" :title "How to Design Programs, Second Edition" :time "Sat Feb 15 10:57:02 2020")) From 0b7c3327c5e1b7620b46c685e7773803c08ca18f Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Sun, 16 Feb 2020 13:26:17 +0100 Subject: [PATCH 2/8] Use functions and add comments --- bundle/display.el | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/bundle/display.el b/bundle/display.el index 2b67795c..651332ca 100644 --- a/bundle/display.el +++ b/bundle/display.el @@ -1,11 +1,19 @@ -(add-to-list 'default-frame-alist '(fullscreen . maximized)) -(add-to-list 'default-frame-alist '(width . 82)) -(add-to-list 'default-frame-alist '(height . 42)) -(add-to-list 'default-frame-alist '(vertical-scroll-bars)) -(add-to-list 'default-frame-alist '(horizontal-scroll-bars)) -(add-to-list 'default-frame-alist '(menu-bar-lines . 0)) +;; General userinterface and appearance +(tool-bar-mode -1) ; No toolbar +(menu-bar-mode -1) ; No Menubar +(scroll-bar-mode -1) ; No scrollbar +(set-scroll-bar-mode 'right) ; Scrollbar on the right +(global-font-lock-mode t) ; Color enabled +(global-prettify-symbols-mode t) ; Prettify symbols +(global-hl-line-mode 1) ; Highlight cursor line +(global-whitespace-mode 1) ; Show whitespace globally +(show-paren-mode 1) ; Visual matching parens +(column-number-mode 1) ; Display column number in the mode line +(size-indication-mode -1) ; Display buffer size in the mode line + +(add-to-list 'default-frame-alist '(fullscreen . maximized)) ; Maximize Window (add-to-list 'default-frame-alist '(font . "Iosevka Term-14")) -(add-to-list 'default-frame-alist '(undecorated . t)) + (setq-default echo-keystrokes 0.02 column-number-indicator-zero-based nil @@ -15,16 +23,7 @@ whitespace-style '(tab-mark) indicate-buffer-boundaries 'left) -(global-font-lock-mode) -(global-prettify-symbols-mode) -(global-hl-line-mode) -(global-whitespace-mode) -(size-indication-mode) -(column-number-mode) -(show-paren-mode) - -(when (eq system-type 'windows-nt) - (add-to-list 'default-frame-alist '(undecorated . nil))) +(when (eq system-type 'windows-nt)) (when (eq system-type 'gnu/linux) (when (display-graphic-p))) From 2295264afe7632b7dde9866c3246f2e96841a859 Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Sun, 16 Feb 2020 13:30:20 +0100 Subject: [PATCH 3/8] Set correct loading sequence --- bundle/display.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bundle/display.el b/bundle/display.el index 651332ca..338047be 100644 --- a/bundle/display.el +++ b/bundle/display.el @@ -1,8 +1,8 @@ ;; General userinterface and appearance (tool-bar-mode -1) ; No toolbar (menu-bar-mode -1) ; No Menubar -(scroll-bar-mode -1) ; No scrollbar (set-scroll-bar-mode 'right) ; Scrollbar on the right +(scroll-bar-mode -1) ; No scrollbar (global-font-lock-mode t) ; Color enabled (global-prettify-symbols-mode t) ; Prettify symbols (global-hl-line-mode 1) ; Highlight cursor line @@ -14,7 +14,6 @@ (add-to-list 'default-frame-alist '(fullscreen . maximized)) ; Maximize Window (add-to-list 'default-frame-alist '(font . "Iosevka Term-14")) - (setq-default echo-keystrokes 0.02 column-number-indicator-zero-based nil prettify-symbols-unprettify-at-point 'right-edge From 350289134939a7dbf04dd13790ebe341c4d1e5dd Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Sun, 16 Feb 2020 13:30:45 +0100 Subject: [PATCH 4/8] No need for os specific settings --- bundle/display.el | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bundle/display.el b/bundle/display.el index 338047be..6e08bbbc 100644 --- a/bundle/display.el +++ b/bundle/display.el @@ -22,11 +22,6 @@ whitespace-style '(tab-mark) indicate-buffer-boundaries 'left) -(when (eq system-type 'windows-nt)) - -(when (eq system-type 'gnu/linux) - (when (display-graphic-p))) - (provide 'display) ;; Local Variables: From 163eb914e144e19bbc1b62d2f9f06e226c3858f1 Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Sun, 16 Feb 2020 13:50:06 +0100 Subject: [PATCH 5/8] Move display stuff from custom to display --- bundle/custom.el | 16 ++++++---------- bundle/display.el | 26 +++++++++++++++++++------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/bundle/custom.el b/bundle/custom.el index 6d8e4f91..1aed71e0 100644 --- a/bundle/custom.el +++ b/bundle/custom.el @@ -14,12 +14,8 @@ '(delete-selection-mode t) '(desktop-save-mode nil) '(diary-file "~/Documents/Diary/diary") - '(display-battery-mode t) - '(display-line-numbers nil) - '(display-line-numbers-grow-only t) - '(display-line-numbers-type (quote relative)) - '(display-line-numbers-widen nil) - '(display-time-mode t) + + '(display-time-world-list (quote (("America/Los_Angeles" "Seattle") @@ -28,17 +24,17 @@ ("Europe/Paris" "Paris") ("Asia/Calcutta" "Bangalore") ("Asia/Tokyo" "Tokyo")))) - '(fill-column 79) - '(font-lock-maximum-decoration t) + + '(global-auto-revert-mode t) - '(global-display-line-numbers-mode nil) + '(history-delete-duplicates t) '(icomplete-mode t) '(indent-tabs-mode nil) '(inferior-lisp-program (executable-find "sbcl") t) '(inhibit-startup-screen t) '(kill-read-only-ok t) - '(line-number-mode t) + '(linum-relative-backend (quote display-line-numbers-mode)) '(load-prefer-newer t) '(major-mode (quote text-mode)) diff --git a/bundle/display.el b/bundle/display.el index 6e08bbbc..f827aabb 100644 --- a/bundle/display.el +++ b/bundle/display.el @@ -8,19 +8,31 @@ (global-hl-line-mode 1) ; Highlight cursor line (global-whitespace-mode 1) ; Show whitespace globally (show-paren-mode 1) ; Visual matching parens +(global-display-line-numbers-mode 1) ; Display line numbers +;; Mode line specific (column-number-mode 1) ; Display column number in the mode line (size-indication-mode -1) ; Display buffer size in the mode line +(line-number-mode 1) ; Display line number in the mode line +(display-battery-mode 1) ; Display battery status in the mode line +(display-time-mode 1) ; Display time in the mode line (add-to-list 'default-frame-alist '(fullscreen . maximized)) ; Maximize Window (add-to-list 'default-frame-alist '(font . "Iosevka Term-14")) -(setq-default echo-keystrokes 0.02 - column-number-indicator-zero-based nil - prettify-symbols-unprettify-at-point 'right-edge - show-paren-delay 0 - show-paren-style 'expression - whitespace-style '(tab-mark) - indicate-buffer-boundaries 'left) +(setq-default + echo-keystrokes 0.02 + column-number-indicator-zero-based nil + prettify-symbols-unprettify-at-point 'right-edge + show-paren-delay 0 + show-paren-style 'expression + whitespace-style '(tab-mark) + font-lock-maximum-decoration t + fill-column 72 + indicate-buffer-boundaries 'left + display-line-numbers-grow-only t + display-line-numbers-type (quote relative) + display-line-numbers-widen nil +) (provide 'display) From 305cea6bee335e89c90c10d36c6f5a334a732723 Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Sun, 16 Feb 2020 14:33:28 +0100 Subject: [PATCH 6/8] Show line numbers for specific hooks --- bundle/display.el | 2 +- bundle/hooks.el | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/bundle/display.el b/bundle/display.el index f827aabb..4d406be5 100644 --- a/bundle/display.el +++ b/bundle/display.el @@ -8,7 +8,7 @@ (global-hl-line-mode 1) ; Highlight cursor line (global-whitespace-mode 1) ; Show whitespace globally (show-paren-mode 1) ; Visual matching parens -(global-display-line-numbers-mode 1) ; Display line numbers +(global-display-line-numbers-mode -1) ; Display line numbers ;; Mode line specific (column-number-mode 1) ; Display column number in the mode line (size-indication-mode -1) ; Display buffer size in the mode line diff --git a/bundle/hooks.el b/bundle/hooks.el index a9863915..0b2db8ab 100644 --- a/bundle/hooks.el +++ b/bundle/hooks.el @@ -1,16 +1,26 @@ (add-hook 'diary-display-hook 'fancy-diary-display) (add-hook 'today-visible-calendar-hook 'calendar-mark-today) (add-hook 'write-file-hooks 'delete-trailing-whitespace) -(add-hook 'markdown-mode-hook 'turn-on-font-lock) -(add-hook 'python-mode-hook 'turn-on-font-lock) -(add-hook 'org-mode-hook 'turn-on-font-lock) (add-hook 'org-mode-hook 'turn-on-auto-fill) -(add-hook 'elpy-mode-hook (lambda () (highlight-indentation-mode -1))) +(add-hook 'elpy-mode-hook + (lambda () + (highlight-indentation-mode -1))) (elpy-enable) (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) (add-hook 'js2-mode-hook #'js2-imenu-extras-mode) +;; (add-hook 'newsticker-plainview-hooks (lambda () (display-line-numbers-mode -1))) +;; (add-hook 'python-mode-hook (lambda () (display-line-numbers-mode 1))) + +(setq my-hooks '(python-mode-hook emacs-lisp-mode-hook)) +(while my-hooks (add-hook (car my-hooks) + (lambda () + (display-line-numbers-mode 1))) + (setq my-hooks (cdr my-hooks))) + +(add-hook 'newsticker-mode-hook 'imenu-add-menubar-index) + (provide 'hooks) ;; Local Variables: From a6d0503a6a6d71b20bfe87282212e2f448a5dd79 Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Sun, 16 Feb 2020 14:43:06 +0100 Subject: [PATCH 7/8] Load display settings first --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.el b/init.el index ba8a6ed1..698aefc3 100755 --- a/init.el +++ b/init.el @@ -49,11 +49,11 @@ There are two things you can do about this warning: ;; Load my custom bundles (add-to-list 'load-path (expand-file-name "~/.emacs.d/bundle")) (require 'os) +(require 'display) (require 'fill-column-indicator) (require 'calendar-settings) (require 'org-mode-settings) (require 'sbcl-settings) -(require 'display) (require 'hooks) ;; UTF-8 FTW From ac84cd77fb6861685c983c6e6580a1accddfe186 Mon Sep 17 00:00:00 2001 From: Marcus Kammer <2262664-marcus-kammer@users.noreply.gitlab.com> Date: Sun, 16 Feb 2020 14:43:25 +0100 Subject: [PATCH 8/8] Add bookmark --- eww-bookmarks | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eww-bookmarks b/eww-bookmarks index d3ca4108..a2b689dd 100644 --- a/eww-bookmarks +++ b/eww-bookmarks @@ -1,3 +1,4 @@ ;; Auto-generated file; don't edit -((:url "https://www.emacswiki.org/emacs/EmacsCrashShortcuts" :title "EmacsWiki: Emacs Crash Shortcuts" :time "Sun Feb 16 13:02:34 2020") +((:url "https://www.emacswiki.org/emacs/EmacsCrashCode" :title "EmacsWiki: Emacs Crash Code" :time "Sun Feb 16 14:42:11 2020") + (:url "https://www.emacswiki.org/emacs/EmacsCrashShortcuts" :title "EmacsWiki: Emacs Crash Shortcuts" :time "Sun Feb 16 13:02:34 2020") (:url "https://htdp.org/2018-01-06/Book/" :title "How to Design Programs, Second Edition" :time "Sat Feb 15 10:57:02 2020"))