[literate] add/remove newlines in output

This commit is contained in:
contrapunctus 2021-02-17 16:21:12 +05:30
parent 3835a3e300
commit 5c7d2ee9c9
2 changed files with 43 additions and 21 deletions

13
init.el
View File

@ -653,9 +653,7 @@ Return nil (and run `magit-status') if the user answers no."
(load "cp")
;; (if (not (server-running-p)) (server-start))
(server-start)
(use-package general
:commands general-define-key)
@ -665,7 +663,6 @@ Return nil (and run `magit-status') if the user answers no."
;; 2020-01-07T12:43:41+0530
;; update to use general, add M-f8 binding
(general-define-key
"<f8>" 'keyboard-quit
"M-<f8>" 'eval-defun
@ -682,13 +679,11 @@ Return nil (and run `magit-status') if the user answers no."
"C-)" 'abort-recursive-edit)
;;;; UTF-8 magic
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(add-hook 'org-mode-hook 'visual-line-mode)
(add-hook 'erc-mode-hook 'visual-line-mode)
;(global-set-key (kbd "C-x t") 'toggle-truncate-lines)
@ -748,12 +743,9 @@ Return nil (and run `magit-status') if the user answers no."
(cp/re-search-line "http")
(forward-char -4)
(kill-new (thing-at-point 'url))))))
(setq truncate-partial-width-windows nil
truncate-lines t)
(add-hook 'erc-mode-hook 'visual-line-mode)
(add-hook 'comint-mode-hook 'visual-line-mode)
;; commented out on 2018-03-19T14:18:34+0530
@ -764,16 +756,12 @@ Return nil (and run `magit-status') if the user answers no."
;;;; Tab settings
;; (setq default-tab-width 4)
(setq tab-width 4)
;(define-key text-mode-map (kbd "TAB") 'self-insert-command)
(setq-default indent-tabs-mode nil)
(setq scroll-conservatively 10000
scroll-preserve-screen-position t
auto-window-vscroll nil)
(add-hook 'isearch-mode-hook 'recenter)
(add-hook 'isearch-update-post-hook 'recenter)
(defadvice isearch-repeat-forward
@ -1074,7 +1062,6 @@ and eval it."
(with-eval-after-load 'text-mode
(define-key text-mode-map (kbd "M-p") 'org-drag-line-backward)
(define-key text-mode-map (kbd "M-n") 'org-drag-line-forward))
(autoload 'byte-recompile-file "bytecomp" "byte-recompile-file" t)
;; (2017-12-29T13:21:57+0530
;; TODO - watch Org and MD files and recompile it if they are newer

View File

@ -13,6 +13,7 @@ And =org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time
(use-package cp-ui
:demand
:load-path "~/.emacs.d/contrapunctus/")
#+END_SRC
** ediff
#+BEGIN_SRC emacs-lisp
@ -24,6 +25,7 @@ And =org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time
(lambda ()
(define-key ediff-mode-map (kbd "i") 'ediff-previous-difference)
(define-key ediff-mode-map (kbd "o") 'ediff-next-difference))))
#+END_SRC
** atomic-chrome
#+BEGIN_SRC emacs-lisp
@ -31,6 +33,7 @@ And =org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time
(atomic-chrome-start-server)
(setq atomic-chrome-url-major-mode-alist
'(("wikisource" . mediawiki-mode)))
#+END_SRC
** emacs settings
#+BEGIN_SRC emacs-lisp
@ -42,17 +45,20 @@ And =org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time
history-length 1000
use-file-dialog nil)
(setq-default undo-limit (* 80 1000)))
#+END_SRC
** esup, the Emacs StartUp Profiler
#+BEGIN_SRC emacs-lisp
(use-package esup
:config (setq esup-depth 0))
#+END_SRC
** doc-view
#+BEGIN_SRC emacs-lisp
(use-package doc-view
:config
(setq doc-view-resolution 300))
#+END_SRC
** gnutls
#+BEGIN_SRC emacs-lisp
@ -60,6 +66,7 @@ And =org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time
:config
;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36749
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
#+END_SRC
** ag, the Silver Searcher
#+BEGIN_SRC emacs-lisp
@ -69,6 +76,7 @@ And =org-babel-tangle= takes nearly 27 seconds to tangle this file, at the time
("<f2> P" . ag-project-regexp)
:config
(setq ag-highlight-search t))
#+END_SRC
** modal editing
*** active boon config
@ -486,6 +494,7 @@ Return nil (and run `magit-status') if the user answers no."
"sed-tangle"
(generate-new-buffer-name "sed-tangle")
(format "sed -n '/#+BEGIN_SRC emacs-lisp$/,/#+END_SRC$/{//!p;}' ~s.org > ~s.el" base base)))))
#+END_SRC
** comint
#+BEGIN_SRC emacs-lisp
@ -493,12 +502,14 @@ Return nil (and run `magit-status') if the user answers no."
:bind (:map comint-mode-map
("M-p" . #'comint-previous-matching-input-from-input)
("M-n" . #'comint-next-matching-input-from-input)))
#+END_SRC
** company-emoji
#+BEGIN_SRC emacs-lisp
(use-package company-emoji
:hook (text-mode . company-emoji-init)
:config (add-to-list 'company-backends 'company-emoji))
#+END_SRC
** counsel
#+BEGIN_SRC emacs-lisp
@ -509,6 +520,7 @@ Return nil (and run `magit-status') if the user answers no."
;; (use-package elsa
;; :commands flycheck-elsa-setup)
#+END_SRC
** misc keybindings
#+BEGIN_SRC emacs-lisp
@ -524,6 +536,7 @@ Return nil (and run `magit-status') if the user answers no."
:disabled
:bind (("M-w" . easy-kill)
("M-d" . easy-kill-delete-region)))
#+END_SRC
** elpher :application:
#+BEGIN_SRC emacs-lisp
@ -534,6 +547,7 @@ Return nil (and run `magit-status') if the user answers no."
("b" . elpher-back)
("w" . elpher-copy-current-url)
("W" . elpher-copy-link-url)))
#+END_SRC
** elfeed :application:
#+BEGIN_SRC emacs-lisp
@ -543,11 +557,13 @@ Return nil (and run `magit-status') if the user answers no."
:config
(add-to-list 'boon-special-mode-list 'elfeed-show-mode)
(add-to-list 'boon-special-mode-list 'elfeed-search-mode))
#+END_SRC
** hydra
#+BEGIN_SRC emacs-lisp
(use-package hydra
:commands defhydra)
#+END_SRC
** WISH emms :application:
1. [ ] make toggle command for emms-start/emms-stop
@ -644,6 +660,7 @@ Return nil (and run `magit-status') if the user answers no."
#+BEGIN_SRC emacs-lisp
(use-package eshell
:config (setq eshell-history-size 999))
#+END_SRC
** eww :application:
#+BEGIN_SRC emacs-lisp
@ -665,6 +682,7 @@ Return nil (and run `magit-status') if the user answers no."
("b" . #'eww-back-url)
("f" . #'eww-forward-url)
("v" . nil)))
#+END_SRC
** url-cookie
Ask for confirmation before saving cookies. I'd rather just disallow them all though 🤔
@ -672,6 +690,7 @@ Ask for confirmation before saving cookies. I'd rather just disallow them all th
(use-package url-cookie
:config
(setq url-cookie-confirmation t))
#+END_SRC
** image-mode
#+BEGIN_SRC emacs-lisp
@ -681,6 +700,7 @@ Ask for confirmation before saving cookies. I'd rather just disallow them all th
("o" . nil))
(:map image-mode-map
("o" . nil)))
#+END_SRC
** flx-ido :disabled:
#+BEGIN_SRC emacs-lisp
@ -689,6 +709,7 @@ Ask for confirmation before saving cookies. I'd rather just disallow them all th
:init (flx-ido-mode 1)
(setq ido-enable-flex-matching t
ido-use-faces nil))
#+END_SRC
** flx-isearch :disabled:
#+BEGIN_SRC emacs-lisp
@ -791,6 +812,7 @@ Ask for confirmation before saving cookies. I'd rather just disallow them all th
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
#+END_SRC
** Linewrapping
@ -803,6 +825,7 @@ Ask for confirmation before saving cookies. I'd rather just disallow them all th
'(dired-mode-hook prog-mode-hook diff-mode-hook message-mode-hook)
do (add-hook hook (lambda () (toggle-truncate-lines 1))))
(global-visual-line-mode -1)
#+END_SRC
** markdown-mode :editing:
@ -1190,6 +1213,7 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
#+BEGIN_SRC emacs-lisp
(use-package mediawiki
:commands mediawiki-mode)
#+END_SRC
** midnight-mode
#+BEGIN_SRC emacs-lisp
@ -1202,17 +1226,20 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
clean-buffer-list-delay-special (* 60 60 12))
:hook
(midnight . clean-buffer-list))
#+END_SRC
** nodejs-repl :disabled:
#+BEGIN_SRC emacs-lisp
(use-package nodejs-repl
:disabled
:config (setq nodejs-repl-command "nodejs"))
#+END_SRC
** nov.el
#+BEGIN_SRC emacs-lisp
(use-package nov
:mode ("\\.epub\\'" . nov-mode))
#+END_SRC
** package
#+BEGIN_SRC emacs-lisp
@ -1224,6 +1251,7 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
(when (featurep 'boon)
(general-def package-menu-mode-map
"X" 'package-menu-execute)))
#+END_SRC
** feather
#+BEGIN_SRC emacs-lisp
@ -1231,16 +1259,14 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
:diminish
:hook (package-menu-mode . feather-mode)
:bind ("<f5> p " . list-packages))
#+END_SRC
**
#+BEGIN_SRC emacs-lisp
(use-package powerline)
#+END_SRC
**
#+BEGIN_SRC emacs-lisp
(use-package rainbow-delimiters
:hook (prog-mode . rainbow-delimiters-mode))
#+END_SRC
**
@ -1253,6 +1279,12 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
(setq swiper-action-recenter t))
#+END_SRC
** mode line
*** powerline :disabled:
#+BEGIN_SRC emacs-lisp
(use-package powerline)
#+END_SRC
** sxiv :application:
#+BEGIN_SRC emacs-lisp
(use-package sxiv
@ -1278,11 +1310,8 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
(require 'cp-nav)
;; (ispell-change-dictionary "en")
#+END_SRC
**
#+BEGIN_SRC emacs-lisp
(setq ispell-dictionary "en")
#+END_SRC
** undo-tree
@ -1292,6 +1321,7 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
:if (not (featurep 'evil))
:diminish undo-tree-mode
:init (global-undo-tree-mode))
#+END_SRC
**
@ -1353,6 +1383,7 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
file-path-shell))))))
(add-hook 'after-save-hook 'cp/after-save)
#+END_SRC
**
@ -1363,12 +1394,14 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
;; (lambda (proc)
;; (delete-other-windows)))
(setq compilation-always-kill t))
#+END_SRC
**
#+BEGIN_SRC emacs-lisp
(require 'cp-hindi)
(require 'cp-parens)
#+END_SRC
**
@ -1400,6 +1433,7 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
;; (add-hook
;; 'input-method-deactivate-hook
;; (lambda () (open-dribble-file nil)))
#+END_SRC
** recentf
@ -1420,6 +1454,7 @@ It'd be really cool to (recenter 3) when you /open/ a section, and (recenter) wh
"\\.umstuff"))
:hook
(kill-emacs . recentf-cleanup))
#+END_SRC
**