diff options
-rw-r--r-- | config.org | 1889 | ||||
-rw-r--r-- | falalalalanguage.org | 64 | ||||
-rw-r--r-- | lang.org | 108 | ||||
-rw-r--r-- | media.org | 434 | ||||
-rw-r--r-- | tanklobsters.org | 60 | ||||
-rw-r--r-- | tj.org | 60 | ||||
-rw-r--r-- | urls.org | 90 | ||||
-rw-r--r-- | uses.org | 108 | ||||
-rw-r--r-- | zhongwen.org | 14 | ||||
-rw-r--r-- | 乐团用语中英翻译对照.org | 28 |
10 files changed, 0 insertions, 2855 deletions
diff --git a/config.org b/config.org deleted file mode 100644 index a5eb931..0000000 --- a/config.org +++ /dev/null @@ -1,1889 +0,0 @@ -#+TITLE: My configurations -#+PROPERTY: header-args :tangle ~/.config/emacs/init.el -#+OPTIONS: toc:2 - -* Introduction -This is an experiment in using literate programming to generate my computer configurations. I want to try it out because my emacs configuration already has a large number of comments, and it seems more fitting to make them first class citizens. Furthermore, i want to reorder some parts of the configurations to put relevant information close together, rather than having to arbitrarily split configuration from different programs into different files. - -The system should be generated using this command: - -#+begin_src sh :tangle no - emacs config.org --batch -f org-babel-tangle -#+end_src - -** Inspiration -I have consulted [[https://raw.githubusercontent.com/rasendubi/dotfiles/master/README.org][Oleksii's configuration]] heavily to get used to how to work with literate programming. Lots of literate configuration attempts are disappointing in that they feature almost no commentary and are strictly linear. In my eyes, these are the two biggest advantages of the literate programming model to begin with. Oleksii's configuration is nice in that it has both lots of commentary, and is non-linear. It also features configuration for more than one program, mixed together with the parts that matter. - -For this initial test, my configuration fails on both counts. All i've done is put every section of elisp into a code block and turned the comments into normal org text. Over time, i hope to expand it into something which ticks both of those boxes. - -** Emacs installation -What libraries do we need? Quite a few: - -#+begin_src sh :tangle no - sudo apt install libmagickwand-6.q16-dev libwebkit2gtk-4.0-dev libtree-sitter-dev -#+end_src - -#+begin_src sh :tangle no - git clone https://github.com/emacs-mirror/emacs - cd emacs - git checkout emacs-30 -#+end_src - -#+begin_src sh :tangle no - BUILD_OPTS=$(emacs \ - --batch \ - --eval "(prin1 system-configuration-options)") - - ./autogen.sh - echo "$BUILD_OPTS" | sed 's/^"\(.*\)"$/\1/' \ - | xargs ./configure - make bootstrap - sudo make install -#+end_src - -#+begin_src sh :tangle no - ./autogen.sh - ./configure --with-x-toolkit=gtk3 --with-imagemagick --with-tree-sitter --with-xwidgets --with-native-compilation=aot --with-mailutils -#+end_src - -We should use all the cores we have to compile. - -#+begin_src sh :tangle no - make --jobs=$(nproc) -#+end_src - -** What is the purpose of a computer? -I think it's a good exercise to consider what exactly i want to use the computer for. This not only gives me some areas to build this configuration around, it also helps me not to lose track of computers as tools, as bicycles for the mind, rather than as an end in themselves. - -** Todo -- Look at completion-preview-mode -- Look at grep-use-headings -- Look at elpa-openwith - -* Configuration -I can easily insert new source blocks with ~C-c C-,~. - -#+begin_src elisp - ;;; init.el --- my emacs configuration -*- lexical-binding: t; -*- - ;; This file is auto-generated. Please edit ~/data/share/config.org -#+end_src - -#+begin_src elisp -(add-to-list 'load-path (expand-file-name (concat user-emacs-directory "site-lisp"))) -#+end_src - -I like to see garbage collection messages. I keep meaning to set up something like the [[https://akrl.sdf.org/#orgc9536b4][garbage collector magic hack]] so that emacs hangs less when i'm running a macro or opening a big web page or whatever. But for now, the default values are adequate. - -#+begin_src elisp - (setq garbage-collection-messages t) - #+end_src - -We set the ~gc-cons-threshold~ and ~gc-cons-percentage~ to be really high in the ~early-init.el~ file. This makes loading emacs a little bit faster. But obviously i don't want that in general usage, so once emacs has finished starting up, i make sure to lower the values again. - -#+begin_src elisp - (add-hook 'emacs-startup-hook - #'(lambda () - (message (format "Initialised in %s seconds with %s garbage collections." (emacs-init-time) gcs-done)) - ;;; reset garbage collector - (setq - gc-cons-threshold 800000 - gc-cons-percentage 0.2))) -#+end_src - -#+begin_src elisp - (setopt user-full-name "noa") - (setopt user-mail-address "noa@noa.pub") -#+end_src - -Properly distinguish these chords from their ascii legacy - -#+begin_src elisp -(define-key input-decode-map [?\C-m] [C-m]) -#+end_src - -* Packages -For a long time i used use-package to manage emacs package configuration. Over time, i decided it was a bit too magic for me. The syntax is quite different to everything else in the configuration, and most of the options i was using were fairly simple. - -I had a very brief excursion into using ~package-vc-install~ to manage packages directly from source, but i found this was too fragile, especially without relying on use-package. For now, i've modified a little defun from acdw i used for that purpose to simply install packages using package.el. - -#+begin_src elisp - (defun package-ensure (pkg) - (unless (package-installed-p pkg) - (package-install pkg))) -#+end_src - -** Installed packages -These are the packages i use that aren't packaged in the debian repositories: - -- 0x0 -- isearch-mb -- jinx -- org-modern -- ox-rss -- valign - -#+begin_src sh :tangle no - sudo apt install elpa-aggressive-indent elpa-consult elpa-dired-du elpa-htmlize elpa-jabber elpa-marginalia elpa-markdown-mode elpa-nov elpa-orderless elpa-vertico elpa-visual-fill-column elpa-ebib elpa-vc-fossil -#+end_src - -* Modern keybindings -A lot of people say that you get used to emacs keybindings over time, and this is true. But i find it hard to maintain two sets of keybindings in my head: those for emacs, and those for everything else. So i think that it's best to make emacs use the same bindings as everything else. For now, we do that with wakib mode. - -#+begin_src elisp - (require 'wakib-keys) - (setopt wakib-keys t) -#+end_src - -#+begin_src elisp - (with-eval-after-load 'wakib-keys - (add-hook 'after-change-major-mode-hook 'wakib-update-major-mode-map) - (add-hook 'menu-bar-update-hook 'wakib-update-minor-mode-maps) - ;; Modifying other modules - ;; When remap is used it exits isearch abruptly after first instance - ;; Use explicit keybindings instead - (define-key isearch-mode-map (kbd "C-f") 'isearch-repeat-forward) - (define-key isearch-mode-map (kbd "C-S-f") 'isearch-repeat-backward) - (define-key isearch-mode-map (kbd "M-;") 'isearch-repeat-forward) - (define-key isearch-mode-map (kbd "M-:") 'isearch-repeat-backward) - (define-key isearch-mode-map (kbd "C-v") 'isearch-yank-kill) - (define-key isearch-mode-map (kbd "M-d") 'isearch-delete-char)) -#+end_src - -* Executing commands -I make my caps lock a menu key, so i can open the command palette with it: - -#+begin_src elisp - (define-key context-menu-mode-map (kbd "<menu>") nil) - (global-set-key (kbd "<menu>") 'execute-extended-command) -#+end_src - -It is often useful to be able to run a command while i am already in the process of running a command in the minibuffer. This is rarely two extended commands; usually it is completion. - -#+begin_src elisp -(setopt minibuffer-depth-indicate-mode t) -#+end_src - -* Aesthetic changes -** Colour theme -This is my emacs theme. It's a monochrome theme which, unlike most monochrome themes, really does have only two colours. I define a few faces, and set every other face as one of them. There are a few things i want to do with it before i make it properly public: make the colours configurable and able to update on the fly, and in general iron out some of the janky parts. A few things defined it are quite specific to this configuration, like the way i define the borders for the tab and header bars, and there is no mode line configuration because i don't use it. - -#+begin_src elisp - (require 'tubthumping-theme) - (load-theme 'tubthumping t) -#+end_src - -** Fonts -Using a proportional font is the right way to do things, but emacs is very old and comes from a time before the innovation of legibility. As a result, there are some things that require a monospaced font, so i set one here. - -#+begin_src elisp - (custom-set-faces - '(default ((t (:family "Noto Sans" :height 120)))) - '(variable-pitch ((t (:family "Noto Sans" :height 120)))) - '(fixed-pitch ((t (:family "Noto Sans Mono" :height 120))))) -#+end_src - -For some frustrating reason, emacs does not respect fontconfig font settings. What this means in practice is that emacs by default draws cjk characters with the korean variant. Luckily emacs has its own obscure and poorly documented way of doing things, so i can iterate over the relevant charsets and set the font specifically for those characters. - -#+begin_src elisp - (dolist (charset '(han cjk-misc)) - (set-fontset-font t charset (font-spec :family "Noto Sans CJK SC"))) -#+end_src - -Similar to the above, we have to manually set the font we want to be used for emoji. I like the cute style of the emoji in fsd emoji, but it doesn't have very good coverage, so we also set noto emoji as the backup. Note that noto emoji is not the same as noto color emoji, which uses coloured emoji. That's clearly against the vibe of this emacs! - -#+begin_src elisp -(set-fontset-font t 'emoji (font-spec :family "FSD Emoji") nil 'prepend) -(set-fontset-font t 'emoji (font-spec :family "Noto Emoji") nil 'append) -#+end_src - -While we're here, let's set up emoji input. - -#+begin_src elisp - (global-set-key (kbd "C-.") #'emoji-search) -#+end_src - -Describe a key based on a string like "C-SPC" - -#+begin_src elisp -(defun describe-key-shortcut (shortcut) - (interactive "MShortcut: ") - (describe-key (kbd shortcut))) -#+end_src - -Update the calendar. We want weeks to start on a monday, the first day of the week. Holidays should be highlighted, and the date format should put the year first. - -#+begin_src elisp -(setopt calendar-week-start-day 1 - calendar-mark-holidays-flag t - calendar-date-style 'iso) -#+end_src - -Ensure the calendar always displays at the bottom of the screen, rather than wrapping weirdly and looking bad when it shows up in a side window. - -#+begin_src elisp - (add-to-list 'display-buffer-alist - '("\\*Calendar\\*" - (display-buffer-in-side-window) - (side . bottom))) -#+end_src - -The default for this is eight, and i hoped that by setting it to nine there would never be a jump when there were extra weeks in a month and the calendar took up an extra line. It doesn't seem to have worked out that way, though. - -#+begin_src elisp - (setopt calendar-minimum-window-height 9) -#+end_src - -Don't add anything to the mode line. - -#+begin_src elisp :tangle no - (setopt calendar-mode-line-format nil) -#+end_src - -*** Monospace font fallback - -This is my own version of fixed-pitch, which has some changes to it. No hooks are added by default. Updating the whitelist automatically applies the hooks. And there is no functionality for changing the cursor type. - -#+begin_src elisp - (use-package fixed-pitch) - (setopt fixed-pitch-whitelist-hooks '(calendar-mode-hook - dired-mode-hook - ibuffer-mode-hook - magit-mode-hook - profiler-report-mode-hook - jabber-roster-mode-hook - mu4e-headers-mode-hook - proced-mode-hook - rmail-summary-mode-hook - ebib-index-mood-hook)) -#+end_src - -*** Transient variable font - -While we're at it, ensure that transients look nice with a variable pitch font. - -#+begin_src elisp -(setopt transient-align-variable-pitch t) -#+end_src - -** Replace the mode line with a header line -First, we set the mode line to nil. On my graphical display, this collapses it so all i get is a thin black line separating the buffer from the echo area. But the mode line still holds some useful information that i want to see. I would rather that be in the header line, because to me it makes sense for this kind of metadata to be /above/ the buffer it is describing. - -First, in white on black text, i want the information about the state of the file. This will show three hyphens in the top left corner of the header line. The first two hyphens mean that the file is both writable and unchanged. If the buffer has been changed, they will change to two asterisks. If the buffer is read only, they will change two percentage symbols. And if the buffer is read only and has been changed, the first will change to a percentage symbol, and the second will change to an asterisk. The final hyphen represents that the file is local, specifically that the default-directory variable is local. If it is remote, an at symbol will be displayed instead. - -Next, we want to display the buffer name. For buffers which belong to files, this will usually be the file name, but it is likely to be something more informative for special buffers. - -Below that, show a line and column coördinate. There are special minor modes that will enable or disable this for the default mode line, but i ignore that and put the formatting code here directly. The docstring for the mode-line-format variable suggests that the column might not be displayed correctly in some situations without enabling the minor mode, but i haven't noticed that yet so i don't bother. This column number is zero-indexed; a capital c would make it one-indexed. For now i stick with zero-indexed as that's the emacs default and i'm not sure which is better. I guess it makes a bit more sense that the first character on a line is labeled "1". - -I don't know exactly what the final variable covers, so i keep it here so that if something shows up i know that it gets put here. Because i have a global mode line in my tab bar, some of the things that would otherwise be here (like the time, battery percentage, and notifications for chat buffers) don't show up. - -#+begin_src elisp :tangle no - (setq-default mode-line-format nil) - (setq-default header-line-format - '("%1*%1+%1@ " - "%b:%l,%c ")) -#+end_src - -** Flash the current line -This function was taken from a karthinks blog post. Previously i was using an external package, [[https://github.com/Malabarba/beacon][beacon]], and i still think that functions better. But this is adequate enough that i'm happy. - -I'd like to change the face, but ~pulse-highlight-face~ has *DO NOT CUSTOMIZE* in the docstring so what am i meant to do!? - -#+begin_src elisp -(defun pulse-line (&rest _) - "Pulse the current line." - (pulse-momentary-highlight-one-line (point))) -(dolist (command '(scroll-up-command scroll-down-command recenter-top-bottom other-window)) - (advice-add command :after #'pulse-line)) -#+end_src - -** Make wide windows narrow with visual-fill-column -Reading prose with long lines is a chore. Luckily there are several packages in emacs to make the windows squeeze text into a more legible sliver. Previously i used olivetti, which is a really nice package, but it's quite heavyweight and broke on me with no explanation more frequently than i appreciated. I've switched to visual-fill-column and been quite satisfied. - -#+begin_src elisp - ;; (package-ensure 'visual-fill-column) - (setopt visual-fill-column-enable-sensible-window-split t) - (setopt visual-fill-column-center-text t) - (advice-add 'text-scale-adjust :after #'visual-fill-column-adjust) - - (add-hook 'text-mode-hook #'visual-line-fill-column-mode) - (add-hook 'eww-after-render-hook #'visual-line-fill-column-mode) - (add-hook 'nov-post-html-render-hook #'visual-line-fill-column-mode) -#+end_src - -The fringes of a window can show useful icons relating to the text in the buffer. For example, when using org modern, blocks get a line in the left fringe to show their content more clearly, Because of this, i prefer for them to be right next to the buffer text. - -#+begin_src elisp - (setopt visual-fill-column-fringes-outside-margins nil) -#+end_src - -Adaptive wrap will indent visually wrapped text to match the indent at the start of the line, for example in lists. This works... fine. However it's adapting the prefix, it doesn't indent nicely with proportional fonts, but you can't win them all. - -#+begin_src elisp - ;; (use-package adaptive-wrap :ensure t) - ;; (add-hook 'visual-fill-column-mode-hook #'visual-wrap-prefix-mode) -#+end_src - -** Wider scrollbars -I want to make sure that various bits of the interface are hidden. but this isn't an "all gui chrome is useless" rampage. I personally think the scrollbar is useful, i like the visual indication it gives of how far i am through a file. - -First we can change the style of the scrollbars to be a bit chunkier. This is done in css. Unfortunately i can't figure out how to change the colour of the slider, which apparently can be done with the usual attributes, but this doesn't actually affect the colour shown on my scrollbars. - -For some programs, it might be necessary to set ~gsettings set org.gnome.desktop.interface overlay-scrolling false~ to ensure that the scrollbars show up properly. - -#+begin_src css :tangle ~/.config/gtk-3.0/gtk.css :tangle no - scrollbar { - -GtkScrollbar-has-backward-stepper: false; - -GtkScrollbar-has-forward-stepper: false; - - border: none; - border-left: 1px solid black; - background-color: white; - - -GtkRange-slider-width: 30; - } - scrollbar trough { - border: none; - border-radius: 0; - } - scrollbar slider { - border-radius: 0; - border: 1px solid black; - width: 90%; - box-shadow: none; - background-color: white; - } -#+end_src - -** No menu and tool bar - -At the moment, explicitly disabling the menu bar and tool bar does nothing, because i already set there to be no lines displayed for the tool and menu bars in my early-init.el file. - -#+begin_src elisp - (setopt menu-bar-mode nil - tool-bar-mode nil) -#+end_src - -** Consistent tooltip location - -Tooltips are little popups next to the mouse cursor. I think this information is helpful, but i like it to appear in a more consistent position, because i find it frustrating when popups cover parts of the ui that i wanted to see. By disabling tooltip-mode, the contents that would be in a popup is instead shown in the echo area. - -#+begin_src elisp -(setopt tooltip-mode nil) -#+end_src - -** Show keystrokes - -I see no reason not to immediately show which chords in a key sequence i have already pressed. Emacs does, however, and instead of letting me set the value of echo-keystrokes to zero to wait zero seconds to show that information, it repurposes zero as a method of disabling the functionality altogether, and provides no special functionality for setting it to nil that would explain why that's not an acceptable method of disabling a feature. Instead, i have to deal with setting it to nearly zero, and luckily i can't tell the difference. - -#+begin_src elisp -(setopt echo-keystrokes 0.1) -#+end_src - -** Highlight matching parentheses - -A useful feature when programming is to show matching parentheses. Show-paren-mode is a global mode. By default it runs in all buffers except those inheriting from special mode. - -#+begin_src elisp -(setopt show-paren-mode t) -#+end_src - -This variable means that if there is no non-whitespace character in between the point and the paren, it will be highlighted. It's useful to highlight parentheses if the point is at the start of the line and the paren is indented. - -#+begin_src elisp -(setopt show-paren-when-point-in-periphery t) -#+end_src - -By default, the point has to be after a paren for it to be highlighted. But often the point will be just inside, in which case it's also helpful for the pair to be highlighted. - -#+begin_src elisp -(setopt show-paren-when-point-inside-paren t) -#+end_src - -** Tab bar - -#+begin_src elisp :tangle no - (setopt tab-bar-mode t) - (setopt tab-bar-format '(tab-bar-format-menu-bar - tab-bar-format-history - tab-bar-format-tabs - tab-bar-separator - tab-bar-format-add-tab - tab-bar-format-align-right - tab-bar-format-global)) - (setopt tab-bar-tab-hints t) - (setopt tab-bar-select-tab-modifiers '(control)) -#+end_src - - -#+begin_src elisp :tangle no - (global-set-key (kbd "C-t") 'tab-new) -#+end_src - -** Syntax highlighting - -#+begin_src elisp -(setopt global-font-lock-mode t) -(setopt font-lock-maximum-decoration nil) -#+end_src - -** Further options - -#+begin_src elisp - (setopt inhibit-startup-screen t - mouse-drag-and-drop-region nil - mouse-yank-at-point t - ;; deleting should be an explicit action - delete-selection-mode nil) -#+end_src - -** Mouse selection - -Shift click to select region with the mouse. This annoyingly rings the bell for an error. It also interferes with my input method switcher, which doesn't notice the mouse click and thinks i've pressed shift with no other keys. - -#+begin_src elisp -(global-unset-key (kbd "S-<down-mouse-1>")) -(global-set-key (kbd "S-<down-mouse-1>") 'mouse-save-then-kill) -#+end_src - -* Xmpp -Jabber.el is an xmpp client in emacs. I don't actually use xmpp as xmpp that much. But i do use it to connect to irc, and this package lets me do that. Unfortunately, it's not a particularly well-behaved package; by default it clobbers some keybindings and floods the echo area with unhelpful messages. - -#+begin_src elisp - ;; (package-ensure 'jabber) - (require 'jabber) - (setopt jabber-account-list '(("noa@noa.pub"))) -#+end_src - -So now what we're going to do is get it to stop showing a bunch of channels in the mode line, because there will always be new activity and i want to drop in when i feel like it, and not always have a reminder of that fact. The defun below is copied from jabber-activity-show-p-default but with an extra condition plopped in. - -#+begin_src elisp - (defcustom noa/jabber-activity-dont-show - '("#tildetown%town@irc.hmm.st" - "#meta%tilde.chat@irc.hmm.st" - "hmm@conference.hmm.st") - "List of JIDs not to show in the modeline." - :group 'jabber-activity)(defun noa/jabber-activity-show-p (jid) - "Return non-nil if JID should be hidden. - A JID should be hidden when there is an invisible buffer for JID, - when JID is not in `noa/jabber-activity-dont-show', - and when JID is not in `jabber-activity-banned'." - (let ((buffer (jabber-activity-find-buffer-name jid))) - (and (buffer-live-p buffer) - (not (get-buffer-window buffer 'visible)) - (not (cl-dolist (entry jabber-activity-banned) - (when (string-match entry jid) - (cl-return t)))) - (not (cl-dolist (entry noa/jabber-activity-dont-show) - (when (string-match entry jid) - (cl-return t)))))))(setopt jabber-activity-show-p #'noa/jabber-activity-show-p) -#+end_src - -Because i have a lot of irc channels shown, a lot of the jids are quite long and ugly. Mostly i know what irc server a channel belongs to, so i want to cut off the parts after the percentage symbol. - -I might want to look at the jabber-jid-username function which seems to do this. - -#+begin_src elisp - (defun noa/jabber-activity-make-string (jid) - "Return the nick of the JID. - If no nick is available, return the user name part of the JID. In - private MUC conversations, return the user's nickname." - (if (jabber-muc-sender-p jid) - (jabber-jid-resource jid) - (let ((nick (jabber-jid-displayname jid)) - (user (jabber-jid-user jid)) - (username (jabber-jid-username jid))) - (if (and username (string= nick user)) - username - nick)))) - (setopt jabber-activity-make-string #'noa/jabber-activity-make-string) -#+end_src - -I'm on a laptop, so whenever i shut it i get disconnected. Jabber can query auth-source for my password, so automatically reconnecting is useful and doesn't need me to do anything. - -#+begin_src elisp -(setopt jabber-auto-reconnect t) -#+end_src - -Because my xmpp server supports message history, i don't need to worry about exiting without seeing all messages, as they'll be there when i get back. - -#+begin_src elisp -(setopt jabber-activity-query-unread nil) -#+end_src - -The default buffer names are a bit ugly to look at, so i change them to a similar format as eww. Which is still pretty ugly, welcome to emacs - -#+begin_src elisp -(setopt jabber-chat-buffer-format "*%n | jabber*" - jabber-groupchat-buffer-format "*%n | jabber*") -#+end_src - -As alluded to above, jabber.el also has a terrible terrible habit of sending a message to the echo area for every change in online state of my contacts, and every single message in any channel. Obviously this gets annoying fast, especially if i'm using the minibuffer at that time. Thank you to acdw for pointing me towards these helpful hooks to remove. - -#+begin_src elisp -(remove-hook 'jabber-alert-muc-hooks #'jabber-muc-echo) -(remove-hook 'jabber-alert-presence-hooks #'jabber-presence-echo) -#+end_src - -Also stop jabber from clobbering the dired-jump binding and instead use something on C-c like a good child. - -#+begin_src elisp -(with-eval-after-load 'jabber - (keymap-global-set "C-x C-j" #'dired-jump)) -#+end_src - -Finally, have a binding to jump to a buffer in which there's been some new activity. Better than always using switch-to-buffer to get there. - -#+begin_src elisp -(keymap-global-set "C-c C-j" #'jabber-activity-switch-to) -#+end_src - -* Reading epubs -#+begin_src elisp :tangle no - ;; (package-ensure 'nov) - (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode)) -#+end_src - -* Writing prose -The majority of the work i do in emacs is writing documents, so it's nice to know that the words coming out of my fingers are the ones i expect them to be. - -** Org mode - -I thought it would be a good idea to have the ability to set headings in my notes as things i wanted to recall later, as i store most of the things i think about in an org file. I still do think that, but the package isn't in melpa right now and i'm lazy and i'm not in education, so i haven't got around to it yet. - -#+begin_src elisp - (setopt org-modules '(org-habit org-id org-mouse ol-doi ol-bibtex ol-docview ol-info ol-rmail ol-eww)) -#+end_src - -#+begin_src elisp :tangle no - (use-package org-fc - :disabled - :ensure t - :custom - (org-fc-directories (expand-file-name "~/data/notes/"))) -#+end_src - -When creating links between org documents, it's better to create and use unique ids rather than search for a headline, because that headline could change. - -#+begin_src elisp - (setopt org-id-link-to-org-use-id 'create-if-interactive) -#+end_src - -If we enable this, emphasis markers will be hidden for a more word processor feel. This has the downside of meaning you have to delete a hidden character to get rid of bold or italic text. I don't have much of a problem with seeing the emphasis markers so i'm willing to put up with any aesthetic shortcomings for a better user experience. The package org-appear solves this by hiding them, but showing them when the point is over them, but i don't think having a whole package just for that is worth it. - -#+begin_src elisp -(setopt org-hide-emphasis-markers nil) -#+end_src - -#+begin_src elisp - (setopt org-startup-folded t) - (setopt org-startup-with-inline-images t) - (setopt org-image-actual-width '(300)) - (setopt org-tags-column 0) - (setopt org-catch-invisible-edits 'show-and-error) - (setopt org-insert-heading-respect-content t) - (setopt org-ellipsis "↴") ;; ↩ ⤦ - (setopt org-extend-today-until 4) - (setopt org-adapt-indentation nil) - (setopt org-log-done 'time) - (setopt org-return-follows-link t) - (setopt org-agenda-files '("~/data/notes/notes.org")) - (setopt org-capture-bookmark nil) - (setopt org-capture-templates - '(("j" "Journal" entry (file "~/data/notes/notes.org") "* %T %?\n" :empty-lines 1))) -#+end_src - -#+begin_src elisp - (setopt org-agenda-block-separator nil) - (setopt org-agenda-include-deadlines t) - ;; Always start the weekly agenda for a week from today - (setopt org-agenda-start-on-weekday nil) - ;; Show week of agenda by default - (setopt org-agenda-span 'week) - (setopt org-agenda-prefix-format '((agenda . " %i %?-12t% s") - (todo . " %i ") - (tags . " %i ") - (search . " %i "))) -#+end_src - -The default agenda time grid has thick lines which i don't think add anything to the output. Similarly, the arrow pointing to the current time has a long line which helps me to find it more easily, but by getting rid of the excess of colour and making it bold, i never struggle to find it anyway. - -#+begin_src elisp - (setopt org-agenda-time-grid '((daily today require-timed) - (800 1000 1200 1400 1600 1800 2000) - " " " ")) - (setopt org-agenda-current-time-string "◀ you are here") - (setopt org-support-shift-select 'always) -#+end_src - -Show calendar agenda and todos in the same buffer - -#+begin_src elisp - (setopt org-agenda-custom-commands - '(("n" "Todo list and agenda" - ((alltodo "") - (agenda ""))))) -#+end_src - -#+begin_src elisp - ;; Make org html export more pleasant by default - (setopt org-export-with-smart-quotes t) - (setopt org-export-with-entities nil) - (setopt org-export-headline-levels 5) - (setopt org-export-with-toc nil) - (setopt org-export-with-section-numbers nil) - (setopt org-html-doctype "html5") - (setopt org-html-html5-fancy t) - (setopt org-html-container-element "section") - (setopt org-html-divs '((preamble "header" "preamble") - (content "main" "content") - (postamble "footer" "postamble"))) - (setopt org-export-with-sub-superscripts t) - (setopt org-html-head-include-default-style nil - org-html-head-include-scripts nil - org-html-validation-link "") -#+end_src - -It's a controversial opinion, but i want hard line breaks to only appear because i want a hard line break in the finished document. This is not quite so respectful of the content/presentation distinction, but it makes some things work in a much more pleasant way for me. - -#+begin_src elisp - (setopt org-export-preserve-breaks t) -#+end_src - -This doesn't work with code blocks at the moment. - -#+begin_src elisp - (setopt org-html-indent nil) - #+end_src - -#+begin_src elisp - (global-set-key (kbd "C-c c") #'org-capture) - (global-set-key (kbd "<menu>") #'noa/org-capture) - (defun noa/org-capture () - "Capture a simple note without the dispatcher." - (interactive) - (org-capture nil "j")) - (defun noa/org-agenda () - "Directly open the agenda with todo list." - (interactive) - (org-agenda nil "n")) - (global-set-key (kbd "C-c a") #'noa/org-agenda) - (global-set-key (kbd "C-c l") #'org-store-link) -#+end_src - -*** Nicer org-mode tables - -#+begin_src elisp - (package-ensure 'valign) - (add-hook 'markdown-mode-hook #'valign-mode) - (add-hook 'org-mode-hook #'valign-mode) - - (setopt valign-fancy-bar t) - (setopt valign-max-table-size 0) -#+end_src - -** Markdown - -#+begin_src elisp - ;; (package-ensure 'markdown-mode) - (add-to-list 'auto-mode-alist - '("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode)) - -#+end_src - -** Autocorrection -Abbrev mode expands one string into another string. I use it as a simple autocorrect mode. If i misspell a word, i run C-x a i g which will prompt me for what to expand the previous word into. I type the correct spelling, and whenever i make that mistake again, it will automatically be corrected. It's important to be careful not to set something that could be a typo for two words though, because otherwise it gets even more annoying. Luckily it's easy to update the abbrevs which are stored in ~/.config/emacs/abbrev_defs. M-x list-abbrevs is also a nice command which shows all the saved abbrevs and how many times they've been expanded. - -#+begin_src elisp -(add-hook 'text-mode-hook #'abbrev-mode) -#+end_src - -** Spellcheck -Jinx is a package for spellchecking. Previously i used [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Spelling.html][flyspell]], which is built in, and [[https://codeberg.org/ideasman42/emacs-spell-fu][spell-fu]]. Flyspell is not ideal because it only checks the word under the point. Furthermore, the correction interface is not pleasant to look at with a proportional font as it uses spaces to align the candidates. Spell-fu checks all the words that are visible, thereby behaving much more like a traditional spell checker. Jinx improves on spell-fu by interacting with the spellcheck process in a more efficient way, and has a nicer interface to corrections. - -#+begin_src elisp - (package-ensure 'jinx) - (setopt global-jinx-mode t) -#+end_src - -Replace the default spellcheck binding with jinx - -#+begin_src elisp -(keymap-global-set "M-$" #'jinx-correct) -(keymap-global-set "C-M-$" #'jinx-languages) -#+end_src - -*** Add corrected words to abbrev - -This is a cool function i took from the jinx wiki. It automatically creates an abbrev for words i correct, so if i make the same error again, it gets fixed without me having to do anything! - -#+begin_src elisp -(defun jinx--add-to-abbrev (overlay word) - "Add abbreviation to `global-abbrev-table'. -The misspelled word is taken from OVERLAY. WORD is the corrected word." - (let ((abbrev (buffer-substring-no-properties - (overlay-start overlay) - (overlay-end overlay)))) - (message "Abbrev: %s -> %s" abbrev word) - (define-abbrev global-abbrev-table abbrev word))) -(advice-add 'jinx--correct-replace :before #'jinx--add-to-abbrev) -#+end_src - -*** Consistent face on hover -Almost everywhere else, the ~highlight~ face is used for interactive text on mouse over. However, jinx reuses its own ~jinx-highlight~ face, which i don't really like. This face clashes with the face i use for the active region, which means selecting text across a misspelled word can be a bit confusing. If i change the ~jinx-highlight~ face, it looks wrong when i've activated jinx to correct the word. - -#+begin_src elisp - (put 'jinx-overlay 'mouse-face '(jinx-misspelled highlight)) -#+end_src - -I mentioned that i thought this wasn't the best default behaviour [[https://github.com/minad/jinx/discussions/184][in the jinx repository]], but Daniel seems happy with it. I appreciate that he's made it so easy to change the behaviour to something i prefer. - -* Publishing my website -I generate my website using org mode. I use the built in ox-publish subsystem for convenience. However, it isn't all that convenient, as it doesn't actually work very well at the moment. - -#+begin_src elisp -(defun read-file-as-string (filename) - "Read file contents from FILENAME." - (with-temp-buffer - (insert-file-contents filename) - (buffer-string))) -#+end_src - -#+begin_src elisp - ;; (setq noa/website-header (read-file-as-string "/home/noa/projects/org-website/templates/header.html")) - (setq noa/website-footer "<strong><a href=\"/\">noa.pub</a></strong> · - <a href=\"https://creativecommons.org/licenses/by-sa/4.0/\">cc by-sa</a> · - <a href=\"/index.xml\">feed</a> · - <a href=\"/archive.html\">archive</a> · - <a href=\"/friends.html\">friends</a> - <!-- - <br/> - <a href=\"/\">go travelling</a> - --> - ") -#+end_src - -#+begin_src elisp - (setq org-publish-project-alist - `(("website" - :components ("website-pages" "website-assets" "website-feed")) - ("website-pages" - :publishing-function org-html-publish-to-html - :base-directory "~/data/website" - :publishing-directory "~/data/public_html" - :base-extension "org" - :with-drawers t - :html-link-home "/" - :html-head-include-default-style nil - :html-head-include-scripts nil - :html-doctype "html5" - ;; :html-validation-link nil - :html-preamble "" - :html-postamble ,noa/website-footer - :html-home/up-format "" - :html-link-up "" - :html-html5-fancy t - :html-indent nil ;; breaks <pre> tag - :html-head "<meta name=\"color-scheme\" content=\"light dark\"> - <link rel=\"stylesheet\" type=\"text/css\" href=\"love.css\" />" - :auto-sitemap t - :sitemap-filename "~/data/website/index.org" - :sitemap-title "noa.pub" - :sitemap-style list - :sitemap-sort-folders ignore - :sitemap-ignore-case t - ) - ("website-assets" - :publishing-function org-publish-attachment - :base-directory "~/data/website" - :publishing-directory "/home/noa/data/public_html" - :base-extension "css\\|js\\|png|\\jpg|\\ico" - :recursive t) - ("website-feed" - :base-directory "~/data/website" - :base-extension "org" - :publishing-directory "~/data/public_html" - :publishing-function (org-rss-publish-to-rss) - :html-link-home "https://noa.pub/" - :html-link-use-abs-url t - :exclude ".*" - :include ("index.org" "boke.org")))) -#+end_src - -We also need to install a newer version of htmlize so that we can properly convert syntax highlighted code into html. I wish there was a way to turn this off, but i couldn't easily find it, so we're stuck with it for now. - -#+begin_src elisp - ;; (package-ensure 'htmlize) -#+end_src - -* Getting help -Emacs is great because of its great built in help system! - -** Close help buffers more easily -By default, opening a help buffer keeps the original window active, but this means that i have to go into the help buffer to close it. Some people might like to always have the help buffer hanging around, but i like my screen empty of distractions. Luckily there's a simple setting to select the help window so that i can easily close it again with q. - -#+begin_src elisp -(setopt help-window-select t) -#+end_src - -Also to that end, we use the same window as the help buffer to open source files. - -#+begin_src elisp - (setopt help-window-keep-selected t) -#+end_src - -** Better aesthetics -Help buffers put quotes around links in the buffer. I don't think this adds anything to the output. - -#+begin_src elisp - (setopt help-clean-buttons t) - #+end_src - -The arguments are shown in upper case. I don't want to be shouted at! I already define them to be bold, this is all the attention they need. - -#+begin_src elisp - (setopt help-downcase-arguments t) - #+end_src - -** Edit variables from help buffers -Often, i will look at the documentation for a variable and immediately want to play with it. This removes one step between wanting that and being able to do that. - -#+begin_src elisp - (setopt help-enable-variable-value-editing t) -#+end_src - -* Web browsing -I hear it's now possible to run a full fat browser inside emacs. But this is surely quite heavyweight, and doesn't get to take advantage of things like ublock origin. When it comes to alternative browsers, it's always the same story; i like the concept, but most websites are a horrific experience without a good ad blocker. - -Instead, i use eww, a browser more closely aligned with browsers for the terminal. Despite the name, eww is a delight to use for text-heavy websites. If a website doesn't render well in it, because it uses fancy layout tricks or lots of javascript, we can press ~&~ to open the url in firefox. - -#+begin_src elisp - (setopt browse-url-browser-function 'eww-browse-url - browse-url-secondary-browser-function 'browse-url-default-browser) -#+end_src - -For the kind of sites i use eww to visit, i've not had a use for cookies. We can tell emacs that we don't trust cookies from any sites, we don't trust cookies from all sites, and frankly, we don't want to use cookies. - -#+begin_src elisp - (setopt url-cookie-trusted-urls '() - url-cookie-untrusted-urls '(".*") - shr-cookie-policy nil) -#+end_src - -Eww has rudimentary support for colours. But i don't want web pages to be able to specify their own colours, because i like the colours i already have set. - -#+begin_src elisp - (setopt shr-use-colors nil) -#+end_src - -Shr has the ability to break paragraphs to fit on the screen. Instead of this, we set it to not break any lines, and use visual-fill-column-mode to do this for us instead. - -#+begin_src elisp - (setopt shr-max-width nil) -#+end_src - -We can set what the maximum size of an image in a window should be. This is a fraction of the total window width or height, and if the image would be bigger than this, it'll be resized to fit. It's useful to have it smaller because emacs still sort of chokes on scrolling when there are large images in a buffer. This is the default value of this option. - -#+begin_src elisp - (setopt shr-max-image-proportion 0.9 - shr-discard-aria-hidden t) -#+end_src - -#+begin_src elisp - (setopt shr-bullet " • ") -#+end_src - -The default name for the eww buffer is *eww*. This is unhelpful because it makes having more than one eww buffer open a bit of a chore to navigate. We can set it to 'url, 'title, or a function. I set it to 'title because marginalia already shows me the url. However, this means that i can't search for a url name when switching buffers. See the help for this variable for an example of a function which gives the page title and the url. - -#+begin_src elisp -(setopt eww-auto-rename-buffer 'title) -#+end_src - -Goto address mode makes urls and email address in a buffer clickable. I want these clickable links to look like links, because that's what they are. The two mouse face variables are what face is used on hover, which at the moment i ignore. It might also be worth setting them to 'highlight. - -#+begin_src elisp -(setopt global-goto-address-mode t) -(setopt goto-address-mail-face 'link) -(setopt goto-address-mail-mouse-face 'highlight) -(setopt goto-address-url-face 'link) -(setopt goto-address-url-mouse-face 'highlight) -#+end_src - -#+begin_src elisp -(setopt global-eldoc-mode t) -#+end_src - -Use a bar cursor and blink it and don't stop blinking it. i don't know how i feel about this yet to be honest, but it helps me know which window is active so for now i'm keeping it - -#+begin_src elisp -(setopt - cursor-type 'bar - blink-cursor-mode t - blink-cursor-interval 0.7) -#+end_src - -* File management -Dired is a really nice package which, as with a lot of emacs, has some dodgy defaults. Here we round off some of the sharp edges to make it more enjoyable to use. - -By default, dired permanently deletes files. But i have quite a bit of storage and also make bad decisions regularly, so it seems fitting to make use of the wonderful invention that is the trash. People who have used systems from the last forty years or so will likely be familiar with this innovation. - -#+begin_src elisp -(setopt delete-by-moving-to-trash t) -#+end_src - -It's not fun to be asked every time whether we want to delete a directory recursively. It's an understandable default for safety reasons, but because we are not deleting permanently but rather just moving to the trash, it's not such a concern. - -#+begin_src elisp -(setopt dired-recursive-deletes 'always) -#+end_src - -Recursive copying isn't even destructive, so i definitely don't want to be asked about that. - -#+begin_src elisp -(setopt dired-recursive-copies 'always) -#+end_src - -After we delete some files or directories, it makes sense to get rid of any buffers which are looking at those files or directories. - -#+begin_src elisp -(setopt dired-clean-up-buffers-too nil) -#+end_src - -With this set, if we have two dired buffers open next to one another, a rename operation in one will default to the directory shown in the other. In this way, we can pretend we are using some kind of norton commander like file browser instead of slumming it in emacs. - -#+begin_src elisp -(setopt dired-dwim-target t) -#+end_src - -These are some useful ls switches. We have to keep -l. To show dotfiles as well, we use -a. To sort numbers by number order instead of lumping together ones, twos, and so on, we use -v. Because we don't have colour, it's nice to have a clear indicator of what is a file and what is a directory, as well as other different things like symlinks which i never remember. By using -F, a forward slash is appended to every directory. And to get more easily understandable file sizes, we use -h, which will tell us the file size in kilobytes or megabytes rather than a huge number that means nothing to me. I won't explain the meaning of the long flag. - -#+begin_src elisp -(setopt dired-listing-switches "-alvFh --group-directories-first") -#+end_src - -By default, don't show dired details - -#+begin_src elisp -(add-hook 'dired-mode-hook #'dired-hide-details-mode) -#+end_src - -I find it useful to see the recursive sizes of directories. This can be a little slow, so setting it as always on might not be the best idea, but the longest i've had to wait is about a second, and that's only if i run it on my home directory, so i think it's worth it at the moment. - -#+begin_src elisp - ;; (package-ensure 'dired-du) - (setopt dired-du-size-format t) - (add-hook 'dired-mode-hook #'dired-du-mode) -#+end_src - -** Version control -I don't use magit. I tried it once, but my use of version control is very limited to just making some changes and then committing them. I don't work in programming and my projects are simple. - -** Tramp - -Some tramp settings. - -#+begin_src elisp - (setopt remote-file-name-inhibit-locks t) - (setopt tramp-inline-compress-start-size 1000) - (setopt tramp-verbose 3) - ;; (add-to-list 'tramp-remote-path 'tramp-own-remote-path) -#+end_src - -The version control system will try each of these methods in order. Because almost everything source controlled i do uses git, i put it first in the list. But at the moment, because i don't think i actually use any of the other methods, i remove the rest of them from the list. - -#+begin_src elisp - (setopt vc-handled-backends '(Git)) - ;; (setopt vc-handled-backends '(Git RCS CVS SVN SCCS SRC Bzr Hg)) -#+end_src - - It seems that tramp can also be made faster with these .ssh/config settings. - -#+begin_src conf-unix :tangle no - Host * - ControlMaster auto - ControlPath ~/.ssh/master-%h:%p - ControlPersist 10m - ForwardAgent yes - ServerAliveInterval 60 -#+end_src - -* Behaviour -** Switching buffers - -There is a distinction in emacs between manual buffer switching that i initiate, and automatic buffer switching when emacs wants to show a buffer. In practice this means that any rules i write for where to display buffers get ignored if i try to show that buffer myself. This line changes that behaviour. - -#+begin_src elisp - (setopt switch-to-buffer-obey-display-actions t) -#+end_src - -** History -#+begin_src elisp -(setopt history-length 250 - kill-ring-max 25) -#+end_src - -#+begin_src elisp -(setopt savehist-file "~/.config/emacs/savehist") -(setopt savehist-additional-variables - '(kill-ring - command-history - set-variable-value-history - custom-variable-history - query-replace-history - read-expression-history - minibuffer-history - read-char-history - face-name-history - bookmark-history - file-name-history)) -(setopt savehist-mode t) -#+end_src - -#+begin_src elisp -(setopt window-divider-mode t) -(setopt window-divider-default-right-width 1) -(setopt window-divider-default-bottom-width 1) -(setopt window-divider-default-places t) -#+end_src - -Taken from configuration for the vertico stack: -Add prompt indicator to `completing-read-multiple'. -We display [CRM<separator>], e.g., [CRM,] if the separator is a comma. -#+begin_src elisp -(defun crm-indicator (args) - (cons (format "[CRM%s] %s" - (replace-regexp-in-string - "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" "" - crm-separator) - (car args)) - (cdr args))) -(advice-add #'completing-read-multiple :filter-args #'crm-indicator) -#+end_src - -Do not allow the cursor in the minibuffer prompt - -#+begin_src elisp - (setopt minibuffer-prompt-properties - '(read-only t cursor-intangible t face minibuffer-prompt)) - (add-hook 'minibuffer-setup-hook #'cursor-intangible-mode) -#+end_src - -Support opening new minibuffers from inside existing minibuffers. - -#+begin_src elisp - (setopt enable-recursive-minibuffers t) -#+end_src - -Whether to drop into the debugger on any error. This seems cool, but in practice is a bit annoying. - -#+begin_src elisp - (setopt debug-on-error nil) -#+end_src - -Hide commands in M-x which do not work in the current mode. - -#+begin_src elisp -(setopt read-extended-command-predicate 'command-completion-default-include-p) -#+end_src - -#+begin_src elisp -(setopt recentf-max-menu-items 25 - recentf-save-file "~/.config/emacs/recentf" - recentf-mode t - bookmark-default-file "~/.config/emacs/bookmarks") -#+end_src - -** Undo - -Undo is on C-/ and redo is on C-S-/. It's not standard, but these bindings are easier to remember. And with this setting, it behaves for the most part like undo in other programs, which isn't as good as i'd really want, but is something i can reason about much more easily than the default undo. - -#+begin_src elisp -(setopt undo-no-redo t) -#+end_src - -** Saving -Backups are pointless in long emacs sessions imo, but autosaves are useful. - -#+begin_src elisp - (setopt remote-file-name-inhibit-auto-save t) - (setopt remote-file-name-inhibit-auto-save-visited t) - (setopt backup-directory-alist '(("." . "~/.config/emacs/backups/")) - make-backup-files nil - backup-by-copying t - create-lockfiles nil - auto-save-mode t - auto-save-interval 6 ;; every six keystrokes - auto-save-timeout 5 ;; every 5 seconds - auto-save-default t - auto-save-no-message t - save-silently t - version-control t - ;; this will auto save to the current file - auto-save-visited-mode t) - (add-hook 'focus-out-hook (lambda () (interactive) (save-some-buffers t))) - (add-hook 'mouse-leave-buffer-hook (lambda () (interactive) (save-some-buffers t))) -#+end_src - -** Unfill commands - -#+begin_src elisp -(defun unfill-paragraph () - "Takes a multi-line paragraph and makes it into a single line of text." - (interactive) - (let ((fill-column (point-max))) - (fill-paragraph nil))) -(global-set-key (kbd "M-Q") #'unfill-paragraph) -#+end_src - -The following functions were written by acdw for use with buffers like dict and help, where it's often ugly to read them with their hard wrapping - -#+begin_src elisp -;; unfill/refill a buffer - -;; unfill makes all paragraphs 1 line -(defun unfill-region (beg end) - (let ((fill-column most-positive-fixnum)) - (fill-region beg end))) - -;; this command is what you'd run in a hook -;; visual-line-mode makes it so it doesn't look shit -(defun unfill-buffer-force () - (interactive) - (let ((buffer-read-only nil)) - (unfill-region (point-min) (point-max)) - (visual-line-mode))) - -;; refill makes the width equal to the window-width minus 2 -;; (you could change it ofc) -(defun refill-region (beg end) - (let ((fill-column (- (window-width) 2))) - (fill-region beg end))) - -;; this command is what you'd run in a hook or w/e -(defun refill-buffer-force () - (interactive) - (let ((buffer-read-only nil)) - (refill-region (point-min) (point-max)))) -#+end_src - -** Better control l -C-l goes in order, rather than first centering the cursor. This is particularly pleasant with a ~scroll-margin~ greater than the default of zero, which serves to keep a line of context at each edge of the screen, as well as triggering a scroll when the point is that far away from the screen edge. - -#+begin_src elisp - (setopt recenter-positions '(top middle bottom)) - (setopt scroll-margin 1) -#+end_src - -** Smooth scrolling - -Emacs uses choppy scrolling by default. If i scoll with my trackpad, it's nice to have it move tiny amounts at the same time as my fingers, which pixel-scroll-precision-mode allows for. This also has the benefit of making scrolling over images a little bit of a nicer experience. - -This doesn't work well sometimes for some reason, so i've disabled it for now. - -#+begin_src elisp :tangle no -(setopt pixel-scroll-precision-mode t - pixel-scroll-precision-use-momentum t) -#+end_src - -** Remember my position in files - -#+begin_src elisp -(setopt save-place-mode t) -#+end_src - -** More pleasant prompts - -The former means that when given a list of choices, we can use single character abbreviations to answer. The latter is a fancy way of defaliasing yes-or-no-p to y-or-n-p. - -#+begin_src elisp -(setopt read-answer-short t) -(setopt use-short-answers t) -#+end_src - -** Disable disabled commands - -#+begin_src elisp - (setq disabled-command-function nil) -#+end_src - -** Don't save changes in the customize interface - -#+begin_src elisp - (setopt custom-file (make-temp-file "custom")) -#+end_src - -** Scrolling in compilation - -Scroll along with text in compilation mode, and stop scrolling at the first error. - -#+begin_src elisp - (setopt compilation-scroll-output 'first-error) -#+end_src - -** Don't advertise gnu on startup - -#+begin_src elisp - (setq inhibit-startup-echo-area-message "noa") ;; #userfreedom -#+end_src - -** Better buffer naming - -#+begin_src elisp - (setopt uniquify-after-kill-buffer-p t - uniquify-buffer-name-style 'forward - uniquify-ignore-buffers-re "^\\*" - uniquify-separator "/") -#+end_src - -** Emacs server - -#+begin_src elisp :tangle no -(unless (server-running-p) (server-start))) -#+end_src - -** Automatic help at point - -This puts some help in the minibuffer when we leave the point on some interactive text. - -#+begin_src elisp -(setopt help-at-pt-display-when-idle 'never) -#+end_src - -** Long lines - -Better support for long lines. - -#+begin_src elisp - (setopt global-so-long-mode t) -#+end_src - -** Kill processes without asking - -This will stop us being prompted before killing a buffer with a running process: - -#+begin_src elisp - (setopt kill-buffer-query-functions - (remq 'process-kill-buffer-query-function - kill-buffer-query-functions)) -#+end_src - -** Automatically revert buffers - -Automatically revert buffers when they change on disk. This doesn't apply to tramp. - -#+begin_src elisp - (setopt global-auto-revert-mode t) -#+end_src - -** Visit symlinks - -This behaviour changes how we visit symlinks. - -#+begin_src elisp - (setopt find-file-visit-truename t) - (setopt vc-follow-symlinks 'ask) -#+end_src - -** Ibuffer - -Use ibuffer instead of list-buffers - -#+begin_src elisp - (global-set-key [remap list-buffers] 'ibuffer) -#+end_src - -** Clicking around -By default, clicking on a character will always put the point in front of that character. But it generally feels nicer for a click to put the point on the nearest side of the character to where the mouse clicked, to allow for slightly sloppier clicking. - -#+begin_src elisp - (setopt mouse-prefer-closest-glyph t) -#+end_src - -** Completing-read everywhere with consult -Consult is a package to provide navigation commands that take advantage of completing-read. I set up a nice completing-read environment earlier with vertico. There are a lot of commands built in to consult, and it's possible to define more. But i use it very simply. - -#+begin_src elisp - ;; (package-ensure 'consult) - ;; (package-activate 'consult) -#+end_src - -Consult buffer can be used instead of the default buffer menu. It lists recently used files and bookmarks as well as open buffers. - -#+begin_src elisp - (autoload #'consult-buffer "consult" nil t) - (global-set-key [remap switch-to-buffer] #'consult-buffer) -#+end_src - -These are some other almost default functions but with extra interactivity. - -#+begin_src elisp - (global-set-key [remap yank-pop] #'consult-yank-pop) - (global-set-key [remap goto-line] #'consult-goto-line) - (global-set-key [remap imenu] #'consult-imenu) - (with-eval-after-load 'org - (bind-key [remap imenu] #'consult-org-heading #'org-mode-map)) -#+end_src - -#+begin_src elisp - (global-set-key [remap info] #'consult-info) -#+end_src - -** Annotations for completing-read -Marginalia provides us with annotations for candidates in completing read functions. This is things like docstrings for functions, file permissions in find-file, and so on. It's a small quality of life improvement. - -#+begin_src elisp - ;; (package-ensure 'marginalia) - (setopt marginalia-mode t) -#+end_src - -We want to always show the relative age of a file. By default, files which haven't been modified for more than two weeks will display an absolute date. - -#+begin_src elisp -(setopt marginalia-max-relative-age most-positive-fixnum) -#+end_src - -My keyboard has a tab key and an i key. For legacy reasons, by default emacs converts C-i to mean the same thing as the tab key, but i don't really want that. The tab key is called <tab> and it gets translated to TAB. C-i is TAB, but i'd rather it by C-i. That's what this decode line does. - -#+begin_src elisp -(define-key input-decode-map [?\C-i] [C-i]) -#+end_src - -Now that tab and C-i are properly distinguished, i can bind C-i to completion at point. - -#+begin_src elisp -(global-set-key (kbd "<C-i>") 'completion-at-point) -#+end_src - -I also want to make the completion at point function a bit more friendly than the default, so i ask consult to provide the completion functionality. - -#+begin_src elisp -(setopt completion-in-region-function 'consult-completion-in-region) -#+end_src - -** Minibuffer candidate completion -Vertico is a package for a nice minibuffer completion experience. It displays a vertical list of candidates. It integrates well with the emacs ecosystem and lets me use other packages that also play nicely. - -#+begin_src elisp - ;; (package-ensure 'vertico) - (setopt vertico-mode t) -#+end_src - -We want vertico to take up a maximum of 12 lines on the display. My screen is quite small, so that's fine, but if i had a bigger screen, i might want to look into setting a percentage or increasing this. - -#+begin_src elisp - (setopt vertico-count 12) -#+end_src - -By default, vertico uses a font-face trick to put a horizontal line across group titles. It looks quite nice, but doesn't really conform to my design sensibilities, so here i redefine the group format to not have this. Because we no longer have the line, we also align the group name to the left edge. - -#+begin_src elisp -(setopt vertico-group-format #("%s " 0 3 (face vertico-group-title))) -#+end_src - -We also want to be able to jump to the bottom of the list by moving up from the top of the list, and the opposite. I've rarely made use of this functionality and i don't know if it's actually a best practice from an interaction perspective, but i'm going to keep it on until it causes an issue for me. - -#+begin_src elisp -(setopt vertico-cycle t) -#+end_src - -And of course, i want to be able to interact with vertico with the mouse. - -#+begin_src elisp - (with-eval-after-load 'vertico - (setopt vertico-mouse-mode t)) -#+end_src - -When completing a filename, i want to be able to easily delete directories in one fell swoop, instead of character by character or word by word. Usually C-<backspace> would be fine, but if directories have a hyphen or space in their name, i have to press multiple times, which is almost never desirable. - -#+begin_src elisp - (with-eval-after-load 'vertico - (bind-key (kbd "RET") #'vertico-directory-enter 'vertico-map) - (bind-key (kbd "<backspace>") #'vertico-directory-delete-char 'vertico-map) - (bind-key (kbd "<C-<backspace>") #'vertico-directory-delete-word 'vertico-map)) -#+end_src - -If i type ~/ etc in a find-file prompt, get rid of the preceding directory names for a cleaner look. - -#+begin_src elisp -(add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy) -#+end_src - -** Better default completion - -Some settings for nicer completion with the default emacs completion buffer. I don't use this, because i use vertico. - -#+begin_src elisp :tangle no - (setopt completion-auto-help 'lazy - completion-auto-select 'second-tab - completion-show-help nil - completions-sort nil - completions-header-format nil) -#+end_src - -** Completion styles -When given a prompt to select from a list of candidates, there are quite a lot of things we can tweak to improve the experience. - -The first thing we do is to ignore case, which in these cases is rarely useful. I find that thinking about the case of a candidate is slower than just typing more to narrow down the options. I don't actually know if these make any difference when i've specified a different completion style. - -#+begin_src elisp -(setopt read-buffer-completion-ignore-case t) -(setopt read-file-name-completion-ignore-case t) -(setopt completion-ignore-case t) -#+end_src - -Next, we want to set orderless and basic as the two completion style. Basic matches candidates with the same text before the point, and the text after the point as a substring. Orderless takes any number of space separated components and displays candidates that much every component in any order. We specify basic first. What this means in practice is that first we will try and complete exactly what i've input, and if that fails, widen the search with orderless to pick up more options. - -#+begin_src elisp - ;; (package-ensure 'orderless) - (setopt completion-styles '(orderless basic)) - (setopt completion-category-overrides '((file (styles basic partial-completion)))) -#+end_src - -By default, emacs overrides the completion styles for email address, but i'm happy with my configuration above. - -#+begin_src elisp - (setopt completion-category-defaults nil) -#+end_src - -* Programming -** Indentation: tabs and whitespace settings -In general, my rules for inserting tabs are that the tab key should insert tabs. I personally prefer tabs to spaces, because tabs work reasonably well whatever font or tab width one chooses to set, whereas spaces are the same width for everyone, except when someone uses a proportional font in which case they are narrower than expected. Furthermore, people tend to use spaces for alignment, which looks bad when you can't rely on every character being the same width. - -However, i'm in the minority, and fighting with the very complicated emacs indentation systems is simply not fun. That said, i refuse to use a monospaced font. Luckily the minority is more than one and someone has already done the hard work for me of writing a mode to make spaces for indentation work reasonably well with a proportional font. That mode is elastic-indent-mode, and it very simply makes leading whitespace characters the same width as the characters on the line above. It's a simple solution but most of the time it does what i want. - -#+begin_src elisp -(require 'elastic-indent) -(add-hook 'prog-mode-hook #'elastic-indent-mode) -#+end_src - -Elastic-table-mode is similar; for tab characters within lines, ensure that they change width to make subsequent lines form a table-like layout. - -#+begin_src elisp - (require 'elastic-table) - (add-hook 'prog-mode-hook #'elastic-table-mode) -#+end_src - -Previously i used a function to naïvely copy the whitespace from the line above. This is the way that vi, nano, and acme all implement auto-indentation. However, for now i'm experimenting with using the built-in indentation functions again. I'm leaving this defun here for posterity. - -#+begin_src elisp :tangle no -(defun noa/naive-return-and-indent () - "Insert a newline and copy the indentation of the previous line, vi/nano style." - (interactive) - (open-line 1) - (let* ((start (progn (beginning-of-line) (point))) - (indent (progn (back-to-indentation) (point))) - (end (progn (end-of-line) (point))) - (whitespace (buffer-substring start indent))) - (delete-trailing-whitespace start end) - (beginning-of-line 2) - (insert whitespace))) -#+end_src - -We will only be trying to indent at the start of a line, and sometimes we will want to insert a standard tab character. We can also set this option to 'complete, which will run completion at point if the region is already indented. - -#+begin_src elisp -(setopt tab-always-indent nil) -#+end_src - -Usually, we want indentation to be done with tabs. Some modes make more sense to use spaces to indent. Lisp is a particular example, and emacs's default behaviour of converting tabs into spaces is frankly horrific. I've taken the below code from acdw to use spaces in these modes. - -#+begin_src elisp -(defvar space-indent-modes '(emacs-lisp-mode - lisp-interaction-mode - lisp-mode - scheme-mode - python-mode) - "Modes to indent with spaces, not tabs.") -(add-hook 'prog-mode-hook - (defun indent-tabs-mode-maybe () - (setq indent-tabs-mode - (if (apply #'derived-mode-p space-indent-modes) nil t)))) -#+end_src - -* Sentences -I prefer to double space sentences. But it seems that most other people do not, and the sentence navigation commands still work for my sentences with this set to nil, but don't work for other people's with it set to t. There are of course some little errors with this, like ending a title with a full stop, but for the most part it's fine. - -#+begin_src elisp -(setopt sentence-end-double-space nil) -#+end_src - -If i write a script, i will always run chmod +x after saving it. This command means i don't have to do that. - -#+begin_src elisp -(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p) -#+end_src - -We are on a unix system, so it makes sense to end files in the unix system way. I'm surprised this isn't the default. - -#+begin_src elisp -(setopt require-final-newline t) -#+end_src - -#+begin_src elisp -(setopt window-min-height 1 - window-combination-resize t - window-resize-pixelwise t - frame-resize-pixelwise t) -#+end_src elisp - -* Keybindings -** Zap up to char - -#+begin_src elisp -(global-set-key (kbd "M-z") 'zap-up-to-char) -#+end_src - -* Search in buffer -Isearch is good, but it has some rough edges. The easiest way forward was just to use ctrlf, which fixes most of them. But i still had some gripes with ctrlf, like that it doesn't play well with a lot of other commands and packages and the general ecosystem built around isearch. So i've tried to fix as many of the issues as i can while keeping real isearch. - -It makes more sense to go to the start of the match, because i start searching where i want to be. - -#+begin_src elisp -(defun isearch-exit-at-front () - "always exit isearch, at the front of search match." - (interactive) - (isearch-exit) - (when isearch-forward - (goto-char isearch-other-end))) -(defun isearch-exit-at-end () - "Always exit isearch, at the end of search match." - (interactive) - (isearch-exit) - (when (not isearch-forward) - (goto-char isearch-other-end))) -#+end_src - -My preferred behaviour is for the point to be at the start of the match. Because the search is incremental, usually i won't finish typing something useful before exiting the search, but i always start searching at a place i can reason about. However, i can't figure out how to get this to work along with isearch-mb - -#+begin_src elisp -;; (define-key isearch-mb-minibuffer-map (kbd "<return>") #'isearch-exit-at-front) -;; (define-key isearch-mb-minibuffer-map (kbd "C-<return>") #'isearch-exit-at-end) -;; Make isearch always quit on C-g -(define-key isearch-mode-map (kbd "C-g") #'isearch-cancel) -(define-key isearch-mode-map (kbd "C-o") #'isearch-occur) -(setopt search-whitespace-regexp ".*?") -(setopt isearch-lax-whitespace t) -(setopt isearch-lazy-count t) -(setopt isearch-allow-motion t) -(setopt isearch-repeat-on-direction-change t) -(setopt isearch-wrap-pause 'no) -#+end_src - -Okay, i lied about being vanilla. I want isearch to use the minibuffer like a good normal part of emacs - -#+begin_src elisp :tangle no - (package-ensure 'isearch-mb) - (setopt isearch-mb-mode t) -#+end_src - -#+begin_src elisp -(global-set-key (kbd "M-o") 'other-window) -(global-set-key (kbd "C-x k") 'kill-current-buffer) -#+end_src - -** Smart scan -This is a nice package to easily jump between identical things at point, like the * operator in vim. I disabled it because i'm trying out using the same keybindings to jump between compile mode errors. - -#+begin_src elisp :tangle no - (use-package smartscan) - (global-set-key (kbd "M-n") #'smartscan-symbol-go-forward) - (global-set-key (kbd "M-p") #'smartscan-symbol-go-backward) - (global-set-key (kbd "M-n") #'next-error) - (global-set-key (kbd "M-p") #'previous-error) -#+end_src - -** Jef Raskin's leap -As a concept, i really like the canon cat. As described [[https://news.ycombinator.com/item?id=33286408][here]], it has two leap keys to navigate the buffer. [[https://dercuano.github.io/notes/eink-design.html][According to Kragen Javier Sitaker]], you could move side to side with the arrow keys, but not up and down. The idea was that any up and down movement would be better served by incremental search. This is something that i want to explore. - -#+begin_quote -If you press and release the LEAP key, it advances the cursor one character forward (or backwards if you hit the left leap key.) - -If you press down (but do not release) the LEAP key you enter a search semi-mode. As you type a search term in this semi-mode, the cursor moves to the first instance of that search term it finds. After moving to the first instance of the search term, you release the leap key to exit the search semi-mode. - -If you want to move the cursor to a subsequent instance of the search term, you press (and do not release) the "USE FRONT" key and press the leap key again (whose key front is labeled "Leap Again.") -#+end_quote - -Semi-modes seem hard to implement in emacs, although in a lot of ways they are already here. I am not a fan of modes in the vi-sense at all, and isearch in emacs is a mode like this. That is, keybindings work differently when isearching, and you have to press C-g or RET to go back to the normal editing flow. - -* Window management -My computer has a small screen, so i find that it's more beneficial for me to split the frame into columns, so i get more context. However, splitting in this way only gives me a (window-width) of 61, so emacs will always split into vertically stacked windows. By setting this to 80, the first split should always be vertical. - -#+begin_src elisp -(setopt split-width-threshold 80) -#+end_src - -* Global text search -Define a handy function that allows me to do a full text search of every file in my home directory. For the most part, this works well; ripgrep avoids binary files. However, in some files with embedded images, it can add a lot of junk to the output. - -#+begin_src elisp - (defun noa/consult-rg-home () - (interactive) - (consult-ripgrep "~/")) - (global-set-key (kbd "M-<menu>") #'noa/consult-rg-home) -#+end_src - -#+begin_src elisp -(setopt shell-file-name "/bin/sh") -#+end_src - -#+begin_src elisp -(defun snarf-song (url) - (interactive "sYoutube url:") - (async-shell-command - (concat "yt-dlp -x --audio-format=mp3 -o " - (shell-quote-argument "~/media/music/%(title)s [%(id)s].%(ext)s") - " " - (shell-quote-argument url)))) -#+end_src - -Put a quote in the scratch buffer - -#+begin_src elisp -(setopt cookie-file "~/Documents/quotes") -(setopt initial-scratch-message - (concat (with-temp-buffer - (emacs-lisp-mode) - (insert (cookie cookie-file)) - (mark-whole-buffer) - (comment-region (mark) (point)) - (buffer-substring (mark) (point))) - "\n\n")) -#+end_src - -* Password management -I mostly don't use emacs for passage management. Instead i use the wonderful [[https://keepassxc.org/][keepassxc]]. Keepassxc has many great features i make use of, including one time passwords, an ssh agent, and checking if my password appears in leaks. - -I used keepassxc for over a year, before deciding to throw the towel in and move to bitwarden for the convenience of having my passwords easily on multiple devices. It turns out that things i took for granted with keepassxc, like not having to pay for one time password support, the ssh agent, browser integration that worked well all the time, and a decent desktop application, were not present in bitwarden. Instead of running back to bitwarden, i moved again, first to pass, the so-called standard unix password manager, and then to passage, which does the same thing but uses age encryption instead of the fire-engine-on-fire that is gpg. - -The motivation for this move was because i wanted to start using a hardware token as extra protection for the passwords. But sadly, the infrastructure around this solution just isn't there and it became a pile of jank. I stopped accessing my email and xmpp from my computer, because it felt like too much of a headache. - -And so i'm back with keepassxc. Luckily keepassxc supports the secret service api, and so does emacs's very own auth-source package, so everything should be perfect. Right? - -Not quite. The keys that auth-source expects don't quite align with the keys that keepassxc has. So any passwords i want emacs to be able to easily deal with have to be moved around a little. Luckily the passwords key itself is just where it should be, but i had to go the advanced options in my keepassxc entry and add things in the :user, :host, and :port slots. I probably won't be updating these very often, so it's not a big deal. But i'm writing it here because otherwise i will forget. - -#+begin_src elisp - ;; (start-process-shell-command "keepassxc" nil "keepassxc") - - (require 'secrets) - ;; (secrets-open-session) - (setopt auth-sources '("secrets:Passwords")) - (auth-source-forget-all-cached) -#+end_src - -* Other - -#+begin_src elisp -(setopt confirm-kill-emacs 'y-or-n-p) -#+end_src - -#+begin_src elisp - (global-set-key (kbd "C-=") #'calc) -#+end_src - -* Email -I like to have my email offline. Of course my preference is also to have it inside of emacs for consistency with everything else. I use some external tools to fetch and send the mail. - -#+begin_src sh :tangle no - sudo apt install mpop msmtp -#+end_src - -** Fetching mail -#+begin_src conf-unix :tangle ~/.config/mpop/config - defaults - tls on - tls_starttls off - auth on - port 995 - uidls_file ~/Documents/mail/mpop-uidls/%U_at_%H - - account noa.pub - keep on - host mail.noa.pub - user noa@noa.pub - delivery mbox ~/Documents/mail/inbox/noa.pub.mbox - - account gaiwan.org - keep on - host pop.fastmail.com - user noa@gaiwan.org - delivery mbox ~/Documents/mail/inbox/gaiwan.mbox - passwordeval "cat ~/.mpop-pass" -#+end_src - -** Reading mail -I have experimented with lots of different methods of reading mail, both in and out of emacs. But i keep coming back to rmail, despite its many, many warts. - -#+begin_src elisp - (setopt rmail-primary-inbox-list - (directory-files "~/Documents/mail/inbox" t "^[^\.]")) - (setopt rmail-file-name "~/Documents/mail/rmail.mbox") - (setopt rmail-user-mail-address-regexp - (rx "noa@noa.pub")) - (setopt rmail-mime-prefer-html nil) - (setopt rmail-mime-attachment-dirs-alist '(("" "~/media"))) - (setopt rmail-displayed-headers - (rx bol (or "To" "Cc" "From" "Date" "Subject") ":")) - (setopt rmail-secondary-file-directory "~/Documents/mail/archive/") - (setopt rmail-secondary-file-regexp "\\.mbox\\'") - (setopt rmail-delete-after-output t) - (setopt rmail-default-file "~/Documents/mail/archive/") - (setopt mail-dont-reply-to-names rmail-user-mail-address-regexp) - - (add-hook 'rmail-show-message-hook #'visual-line-fill-column-mode) - - (setopt rmail-display-summary nil) - (setopt rmail-redisplay-redisplay-summary t) - (setopt rmail-summary-line-count-flag nil) - (setopt rmail-summary-window-size 12) - - (defun noa/message-default-headers () - (format "Fcc: ~/Documents/mail/outbox/%s.mbox" - (format-time-string "%Y-%m"))) - (setopt message-default-headers #'noa/message-default-headers) -#+end_src - -** Composing mail -Setting this to nil stops auto-fill from being automatically enabled in message buffers. - -#+begin_src elisp - (setopt message-fill-column nil) -#+end_src - -It's nice to have a message signature. I want the signature to be loaded from a file, which is stored in my configuration directory. - -#+begin_src elisp - (setopt message-signature t) - (setopt message-signature-file "~/.config/signature") -#+end_src - -#+begin_src text :tangle ~/.config/signature - ~noa (https://noa.pub) - I queue replies and batch send them at intervals; excuse my untimeliness. -#+end_src - -** Sending mail -#+begin_src elisp - (setopt message-send-mail-function 'message-send-mail-with-sendmail) - (add-to-list 'exec-path "/home/noa/.config/Scripts") - (setopt sendmail-program (executable-find "msmtpq")) - - (setopt message-sendmail-extra-arguments '("--read-envelope-from")) - (setopt message-sendmail-envelope-from 'header) - (setopt message-kill-buffer-on-exit t) - (setopt message-sendmail-f-is-evil t) - (setopt message-forward-as-mime t) - (setopt message-interactive t) -#+end_src - -#+begin_src elisp - (setopt message-auto-save-directory "~/Documents/mail/drafts") -#+end_src - -#+begin_src conf-unix :tangle ~/.config/msmtp/config - defaults - auth on - tls on - - account fastmail - host smtp.fastmail.com - port 465 - tls_starttls off - from noa@gaiwan.org - user noa@gaiwan.org - passwordeval "pass msmtp-baby | head -n1" - - account noa.pub - host mail.noa.pub - port 465 - tls_starttls off - from noa@noa.pub - user noa@noa.pub - - account default: noa.pub -#+end_src - -* System administration -** Eshell -Eshell is a command shell written in elisp. It integrates with emacs in a more consistent manner than the other shells available, although it still has its own quirks. - -In general, i try and avoid using a shell if possible, because i think that bespoke emacs interfaces to different commands tend to have more pleasant interaction methods. But there are still lots of things which are simply easier to do with a shell. - -*** Set the eshell banner -This is equivalent to the message of the day present in some shells. I wanted it to print a new quote every time eshell opened, but when i tried that eshell refused to load. Probably some mistake on my end. - -#+begin_src elisp -(defun noa/eshell-banner-message () - (concat (cookie cookie-file) - "\n\n")) -(setopt eshell-banner-message (noa/eshell-banner-message)) -#+end_src - -*** Environment variables - -#+begin_src elisp -(setenv "PAGER" "cat") -(setenv "TERM" "dumb") -(setenv "NO_COLOR") -(setenv "GPG_AGENT_INFO" nil) -#+end_src - -** Network management -#+begin_src elisp - ;; (package-ensure 'enwc) - ;; (setopt enwc-default-backend 'nm) -#+end_src - -* Dictionary -Emacs has built in support for interfacing with dictd. With dictd and some dictionaries installed on debian, this works fine out of the box. - -Unfortunately, dictionaries in this format tend to be hard wrapped and there isn't a lot of coverage outside of english - -#+begin_src elisp - (setopt dictionary-search-interface nil) -#+end_src - -Dictionary tooltip mode lets me hover over a word to view the definition. - -#+begin_src elisp - (setopt dictionary-tooltip-mode t) -#+end_src - -* Unsorted -Just a few settings i haven't put into another category yet. - -#+begin_src elisp - (setopt save-interprogram-paste-before-kill t - mouse-yank-at-point t - require-final-newline t - load-prefer-newer t - ediff-window-setup-function 'ediff-setup-windows-plain) -#+end_src - -* Bibliography management -We use ebib to browse the bibliography. - -#+begin_src elisp - (setopt ebib-preload-bib-files '("~/Documents/references.bib")) - (setopt org-cite-global-bibliography '("~/Documents/references.bib")) -#+end_src - -The biblio package allows us to import references from online sources. - -#+begin_src elisp - (package-ensure 'biblio) - (require 'ebib-biblio) - (with-eval-after-load 'ebib - (define-key ebib-index-mode-map (kbd "B") #'ebib-biblio-import-doi) - (define-key biblio-selection-mode-map (kbd "e") #'ebib-biblio-selection-import)) -#+end_src - -#+begin_src elisp - (setopt biblio-download-directory "~/media/papers") -#+end_src - -Taking notes on papers: -#+begin_src elisp - (setopt ebib-notes-directory "~/Documents") - (setopt ebib-notes-locations '("~/Documents/references.org")) - (setopt ebib-notes-default-file "~/Documents/references.org") - (setopt ebib-notes-storage 'multiple-notes-per-file) -#+end_src diff --git a/falalalalanguage.org b/falalalalanguage.org deleted file mode 100644 index 2a39a9d..0000000 --- a/falalalalanguage.org +++ /dev/null @@ -1,64 +0,0 @@ -#+TITLE: Falalalalanguage -#+SUBTITLE: Or, efficient discourse. -#+DATE: 2023-06-13 - -Summary: falalalalanguage is a language shorthand for playing out discussions without actually having to consider arguments or opinions. by embracing the concept of "degrees of tangentiality" we can develop a significant conversation wholly in the realm of potentiality. this has significant implications for philosophical investigation as a whole, as whole fields of study can be simulated by a single person in the comfort of eir favourite armchair. - -* What is a conversation? - -Throughout this paper i will be using several everyday words in a particular fashion. a conversation will refer to a set of discourses which can be charted back to a particular utterance. if the topic of conversation changes due to an event external to anything internal to any of the set of discourses of which it is made up, the current conversation ends and a new one is begun. a conversation then can have a dramatically varied array of topics, provided each discourse is derived in some way from a previous discourse. - -As an example, i may be having a conversation with a friend on the subject of whether jam is called jelly or jam. as part of this conversation, i may mention apricot jam, which will lead to us talking about atlantis, the mythical underwater city, by way of atlanta, georgia, the peach state, because i frequently get muddled up between peaches and apricots. while the topic has entirely diverged, the divergence can be entirely measured in single steps of discourse. - -If, on the other hand, the radio was playing in the background during our conversation and i overheard talk of an oil spill in the atlantic ocean, and then started talking about atlantis, the mythical underwater city, this would be an external means of conversational continuance and therefore would signal the start of a new conversation, whenever a discourse was in reference to that excerpt of radio. - -* What is a discourse? - -I have by now mentioned discourse frequently; it is after all central to my theory. a discourse is a pair of utterances, the second in response to the first. typically, these utterances would be from two distinct individuals, however there is no reason why one could not engage in discourse with emself. - -The second utterance in a discourse must be in response to the first, but this does not mean it has to follow on from the first. the human brain works in mysterious ways, and as long as the consensus among those party to the discourse is that the utterance follows, there is no reason to doubt that. we have already touched on the topic of external influence in conversation, and that should be considered here also; when an utterance does not appear to follow on, and can be attributed to a relevant external factor, it should perhaps be considered not constituent of a discourse. - -Discourses are interleaved; each second utterance is the first utterance of the next. this should be an intuitive concept to anyone who has ever engaged in conversation, as the alternative would be much more akin to a shoddy stand-up routine, in which a tired comedian regales us with one-liner after one-liner. but even in that case, there may be discourses to be discovered. as previously established, it is perfectly feasible for one to engage in discourse with emself, and now i propose that not only is it feasible, it is also common. for a conversation is rarely made up of discourses wherein each participant takes a turn; rather, each participant will take several discourses. this allows each individual to develop what ey are saying, provide nuance, or provide a punchline. - -* What is the degree of tangentiality? - -It can be difficult to measure that fine line between nuance and punchline. that is why i propose five degrees of tangentiality which, when used as a manner of speech in themselves as i will describe shortly, i call "falalalalanguage". but first, allow me to explain falalalalanguage as a method of distinguishing different secondary utterances in a discourse. - -The first degree is of course assertion of the utterance. absolute agreement, or repetition, and that is denoted "fa". assuming, as above, that we were conversing about jam and jelly, and i said "jam is a better term than jelly", you might endorse my view with the utterance "jam /is/ a better term than jelly". taking my initial utterance as "fa", your secondary utterance would be written "fa" also. - -The second degree is positive direct continuation. directly continuing with our example, were you to respond to my assertion "jam is a better term than jelly because it allows the distinction between jelly eaten with ice cream and jam eaten on toast", my initial utterance would be denoted "fa", and your secondary utterance as "fala". - -The third degree through the fifth degree are also positive continuations, each successively less direct than the last. were we to denote your secondary utterance as "falala", that is, the third degree, you may perhaps have said "absolutely. what's your favourite flavour of jam?". it is obvious how this continues the thread of utterances through the discourses, but it is not such a wholehearted endorsement of the point i was making. were we to denote your secondary utterance as "falalalala", that is, fifth and final degree, you might merely have acknowledged my claim with a slight chin-tilt, before asking how my mother was, because you recall us once walking through a market selling marrows and me remarking on how my mother once made marrow and ginger jam. for further discussion of these later degrees of tangentiality, see "internal and external conversation" below. - -* But what about dissent? - -For each degree, there is also the possibility of dissent. if for example you were wrong, you might respond to my initial utterance "jam is a better term than jelly" with "no, jam is not a better term than jelly", a dissertion of the utterance. this would be expressed in falalalalanguage as "ga", the negative continuation particle. - -This logically follows through the following four degrees, from "gala", "jam is not a better term than jelly because they have different histories and refer to subtley different things, and if you actually cared that much about jam you'd appreciate that jams and jellies were different and why have you actually not mentioned conserves at all in this conversation?", to "galalalala", "no i don't think so; what do you reckon the best colour of t-shirt is?". - -It should be obvious at this point the value of being able to distill such discussions down to descriptions of each discourse's degree of tangentiality from the previous, leading back to a simple definition of the initial utterance of the form "fa:n(initial utterance)", where n is the number of members of the conversation. an example conversation could therefore look as follows: - -#+BEGIN_SRC -fa:2(jam is a better term than jelly) -fa -fala -falala -fa -fa -fala -fala -falalala -ga -gala -falalalala -fala -fala -fa -fa -#+END_SRC - -A notable part of this conversation is the repeated "fa" on lines five and six; the former is an assertion of the previous utterance "falala", but then the utterer of that "falala" chooses to also assert "fa", meaning nothing got said in a cycle of discourse. this highlights some significant inefficiences in our methods of conversation, and we would do well to further explore the necessity of such. - -* Internal and external conversation - -I mentioned above a larger degree of tangentiality could be the result of a wandering train of thought. i also mentioned above that discourses could, and certainly do, happen with one individual. it makes sense, following this line of reasoning, to be able to recursively represent falalalalanguage models then, so that higher degrees of tangentiality brought about by internal discourse of lower degrees of tangentiality (that is, all of them), can be represented in the schema. diff --git a/lang.org b/lang.org deleted file mode 100644 index 96c174e..0000000 --- a/lang.org +++ /dev/null @@ -1,108 +0,0 @@ -#+TITLE: Lang: smalltalk for introverts -#+DATE: 2024-05-01 - -Lang is a vapourware [[https://en.wikipedia.org/wiki/Retrofuturism][future-retro]] computing environment and my research vessel for exploring interface and system design. It is a [[https://malleable.systems/][malleable]] graphical environment designed with personal computing in mind; i describe it as a *[[https://cuis.st/][smalltalk]] for introverts*. - -[[file:wp-content/lang-screenshot-cropped.jpg]] - -* History - -It should be clear that half the fun is careful consideration, and actual implementation comes second. This is not a huge issue, as the act of designing is in itself a hobby, and one which a working environment would not be able to replace. There is no time limit on the project. - -** A brief timeline - -I've been playing around with ideas for operating systems and computer interfaces for over a decade now, and some of the opinions i developed in that time are still visible in the current concept. - -The current monochrome, [[https://en.wikipedia.org/wiki/Classic_Mac_OS][classic mac os]]-inspired interface design first started to take shape in the summer of 2022. - -* Window system - -See [[https://hack.org/mc/texts/gosling-wsd.pdf][Gosling on window system design]] and [[https://9p.io/magic/man2html/1/rio][Plan 9's rio]]. - -Window and programs should be considered separate, with the windowing system serving two purposes: first, allowing programs to draw pixels to a buffer; second, drawing this buffer to the screen if it's necessary. Programs are not responsible for their decorations, and also should be written with the window system in mind, which can be responsible for tabbing. Having tabs managed by a window manager is a feature i first discovered in [[https://www.haiku-os.org/][haiku]], and then enjoyed in [[http://fluxbox.org/][fluxbox]]. However the best tabbing implementation i have seen is that in [[https://www.google.com/intl/en_uk/chromebook/chrome-os/][chromeos]], which doesn't work quite as universally, but by moving as much as possible into the browser comes quite close to the desired behaviour. This style of tabbing was replicated in [[https://nakst.gitlab.io/essence][essence os]]. - -Because windows are just an area that belongs to a program, every window must have a program running in it. In this system, that default program is the shell. This should not be confused with a [[https://en.wikipedia.org/wiki/Unix_shell][unix shell]], as although the system shell is text-oriented, it is not text-limited. The shell is described in more detail in its own section. - -* Shell - -See: - -- [[https://acko.net/blog/on-termkit/)][termkit]] -- [[https://github.com/withoutboats/notty)][notty]] -- [[https://www.destroyallsoftware.com/talks/a-whole-new-world][a whole new world]] -- [[https://tilde.town/~dzwdz/blog/tui.html)][on tuis]] - -* Brain speed - -Human perception gives us three time limits to work with when designing interaction feedback: anything that is faster than 0.1 seconds will be perceived as an immediate reaction from the system; anything less than 1 second will not feel like a direct interaction, but will not interrupt the user's train of thought; and anything less than ten seconds will feel slow, but will be fast enough that they will be willing to wait for the action to complete. we suggest that two different kinds of acknowledgement from the system are necessary for these different lengths: the cursor should show it is "busy" up to one second; for tasks that would take longer, progress dialgoue should be shown. the progress dialogue should have a progress bar, and text which explains what is currently being done. for actions should not need to care about waiting for, the system should as far as possible try and act as if the action is instantaneous. for example, moving a large directory. - -** Faster isn't better - -eris on the issues of faster hardware, from the perspective of the end user: https://side-effects.neocities.org/anticapitalism/hardware.html - -** A timeline-oriented undo system - -2023-06-13 - -there are two kinds of undo system in common use. both have problems. - -the first and most frequently used is the stack-based undo, where changes are pushed to a stack and undoing pops the last change from the stack. making a new change after undoing discards all popped items and adds to the stack from where the user had undone to. this is usually fine until it isn't, and then it's really frustrating. - -imagine a user undoes some changes, starts making new edits and then regrets the decision. they can't revert to the state past the undo. - -imagine a user is undoing and then accidentally makes a change. they've unintentionally lost access to the forward part of their undo history. - -web browser history is the same principle. it's common to search something and then look in and out of web pages. it's also common to then be frustrated that you cannot see the actual path you took through results, because every time you back out to the results and click a new link, the page you backed out from is removed and you have to head to the browser history page, which is inevitably (though not necessarily) terribly designed. - -this because both undo and browser history are really trees, not stacks, which has been noticed by various people and implemented in various programs, usually those designed for "advanced users". - -that leads us to the issue with the tree: especially in the case of undo, it's usually clumsy to navigate. especially when you factor in the fact that advanced users like keyboard shortcuts, suddenly there a bunch more that are necessary. - -there are also questions that arise: where to go when a user tries to redo at a final node when there were more changes further down the line in a different branch? surely there must be a good way to corroborate the changes (or maybe not). - -both of these solutions violate the harrison human interface guidelines, either by not treating user input and discarding it without explicit consent (which is also something that should be avoided), or by being too complicated. - -my proposed solution is a riff on the emacs way. emacs treats the act of undoing as a reversible editor action just like anything else which manipulates buffer text. so to redo, you actually undo the undo. this is powerful but unintuitive, which is why janky tree view solutions have been built on top of it. - -actually emacs has the right idea, but like a lot of emacs the exposed interface is terrible. - -i propose that instead, we keep the linear system, but make it time-oriented. here's how it works: - -1. the user is always at the end of the timeline after manipulating a buffer. -2. to undo, they move backwards along the timeline, change by change. this is identical to how standard undo works. -3. from any point on the timeline, they can move forward again, as redo would allow. -4. if they manipulate a buffer, that must become the end of the timeline. instead of discarding anything further along, every change between the current point and the end is duplicated, its order reversed, and the new manipulation added. - -time is linear, so keep the history linear. that's a guiding principle i just came up with. if we're calling it an undo history, a browser history, it should respect time first and foremost. - -but won't clicking undo will get tiresome if my history keeps getting duplicated like that? probably. i discovered recently that the mechanical keyboard community were getting quite into rotary encoders (that's twisty knobs in everyday language). that article mentioned scrolling as one use case. i thought that was pretty cool actually, and since i want documents in celeste to only be scrollable in one dimension (up and down) seemed like a good use case. most documents are quite flexible in that regard. well, how amazing would it be to be able to scroll through space as well as time? extremely cool i thought. - -(note: i just noticed that "history scrubbing" is listed on that page already. guess i need to improve my reading comprehension). - -seeing as this proposal is probably not going to get picked up in the mainstream, i may as well propose an alterate reality (celeste) where things were different. one of those things is that scrolling through time with a handy knob is established functionality. - - -* Development tools - -- [[https://www.youtube.com/watch?v=72y2EC5fkcE][Tomorrow corporation tech demo]] - -** Applications for creating and consuming - -2023-10-08 - -I would like to see more applications that let me easily switch between creating and consuming. That is, the same application can be used to easily view some media, and to modify it. - -Ironically, the best examples of this tend to be on mobile platforms. For example, the gallery app usually allows me to view images and videos, and also to annotate and modify them. - -This doesn't have to entail complex creation mechanics, for which more heavyweight tools are often required, and will make the act of opening a file to view it take too long. Although perhaps this is a problem with the current state of computers rather than the concept itself. While i am not keen on the way Mac OS distinguishes between windows and running programs, you can much more pleasantly use a full graphic manipulation program as an image viewer when it is always running in the background. - -When i use Windows, i always set images to open in Paint by default. It loads fast, and lets me annotate the images i am looking at. - -There are a large number of markdown editors available that show the source and the content in two panes. I would like to further expand this concept and be able to write html in the browser itself. The mainstream browsers all have two methods of viewing the source code of a page: the inspector, and the *view source* button. Neither of these does what i want: the inspector doesn't make modification as easy as it could be, as it is more for inspecting than modifying; the *view source* button provides me with an entirely static page. - -If we continue to have distinct applications for creating and consuming, as i think we probably will, i would like to see two buttons in file managers. One to edit, and one to view. As far as i can remember, every file manager i have used has a default application to use for opening any particular file. But i always have the trouble of often wanting to open for example a html page first in a browser, and then in an editor. These two distinct tasks share a button, leading to an experience where i am frequently surprised by which application the file opens in. - -* Philosophy - -See Norma's [[https://normadesign.it/en/log/designing-in-black-and-white/][black and white]]. - diff --git a/media.org b/media.org deleted file mode 100644 index ce8217c..0000000 --- a/media.org +++ /dev/null @@ -1,434 +0,0 @@ -#+TITLE: Media diary -#+DATE: 2024-06-07 - -This is a non-exhaustive list of every piece of media i have engaged with. I also try to record the author, director, or artist, the year of its release, and a rating on a scale from one to five stars. - -In general, the rating is accurate by virtue of being so imprecise. But the categories are quite broad, and things are much more likely to get three or four stars than one or five. - -Engaged with is quite vague, but generally it means to have read, watched, or listened to in full. - -* 2024 - -| 书 | The diary of Lena Mukhina | | | ★★★ | -| 影 | Under paris | | | ★★★ | -| 影 | Parasite | | | ★★★★★ | -| 影 | Billy Elliot | | | ★★★★★ | -| 书 | Hello, stranger | | Will Buckingham | ★★★★★ | -| 影 | Rush hour | 1998 | Brett Ratner | ★★★★ | -| 书 | Camel xiangzi | | Lao She | ★★★★★ | -| 影 | Men in black | | | ★★★ | -| 书 | 活得优雅 | | 刘志雄 | ★★★ | -| 影 | Yellow submarine | | | ★★ | -| 影 | Dr. Strangelove or: how i learned to stop worrying and love the bomb | | | ★★★ | -| 影 | Danny Bhoy live at the Sydney Opera house | 2007 | | ★★★★★ | -| 影 | Before sunrise | | | ★★★★ | -| 影 | 8 Mile | | | ★★★★★ | -| 书 | Tao te ching | | Lao Tsu (tr. D.C. Lau) | ★★★★ | -| 影 | The super mario bros movie | | | ★★★ | -| 书 | Dark spring | | Unica Zurn | ★★★★ | -| 影 | Borat | | | ★★★ | -| 书 | Piranesi | | | ★★★★ | -| 影 | The beanie bubble | 2023 | | ★★★★ | -| 影 | Baby driver | | | ★★★★★ | -| 影 | Flora and son | | | ★★★ | -| 书 | Tomorrow, and tomorrow, and tomorrow | | Gabrielle Zevin | ★★★ | -| 影 | Logorama | 2009 | | ★★★ | -| 影 | The velocipastor | 2018 | | ★★★ | -| 影 | 神女 | 1934 | | ★★★★ | -| 书 | Shanghai baby | | Wei Hui | ★★★★★ | -| 书 | Lord horror | | David Britton | ★ | -| 书 | The dispossessed | | Ursula K Leguin | ★★★★★ | -| 书 | Blood on the siberian snow | | C J Farrington | ★★★ | -| 影 | Wonka | 2023 | | ★★★ | -| 书 | The premonitions bureau | | Sam Knight | ★★★★ | -| 影 | Tetris | 2023 | | ★★★★★ | -| 影 | 9 to 5 | 1980 | | ★★★★ | - -* 2023 - -| 书 | Takeaway | | Angela Hui | ★★★ | -| 影 | 封神 | 2023 | | ★★★ | -| 影 | Barbie | 2023 | Greta Gerwig | ★★★★ | -| 影 | 大鱼海棠 | 2016 | | ★★ | -| 影 | Spider-man: across the spider-verse | 2023 | Joaquim Dos Santos, Kemp Powers, Justin K. Thompson | ★★★ | -| 书 | Ishmael | 1992 | Daniel Quinn | ★★★★★ | -| 书 | Rememberings | | Sinéad O'Connor | ★★★★ | -| 书 | Harlem shuffle | | Colson Whitehead | ★★ | - -* 2022 - -| 剧 | 最亲爱的你 | 2018 | | ★★★★★ | -| 乐 | We can play | | Century Egg | ★★★ | -| 乐 | Echoes of japan | | Minyo Crusaders | ★★★ | -| 乐 | Everything goes numb | | Streetlight Manifesto | ★★★★★ | -| 乐 | Electra heart | | Marina and the Diamonds | ★★★★★ | -| 乐 | The black parade | 2006 | My Chemical Romance | ★★★★★ | -| 乐 | The first glass beach album | | Glass Beach | ★★★★ | -| 书 | A psalm for the wild-build | | Becky Chambers | ★★★★ | -| 乐 | Jubilee | | Japanese Breakfast | ★★★★ | -| 书 | Slaughterhouse-five | | Kurt Vonnegut | ★★★ | -| 乐 | 丑奴人 | | 草东没有排队 | ★★★★★ | -| 乐 | Deception bay | | Milk and Bone | ★★★★★ | -| 乐 | Baby formula | | Baby Formula | ★★★★ | -| 乐 | Showering timing | | Showering Timing | ★★★ | -| 书 | The philosophy of hebrew scripture | | Yoram Hazony | ★★★★★ | -| 书 | The art of biblical narrative | | Robert Alter | ★★★★★ | -| 乐 | Celeste ost | | Lena Raine | ★★★★★ | - -* 2021 - -| 乐 | Oil of every pearl's un-insides | | sophie | ★★★★★ | -| 乐 | Solar power | | lorde | ★★★★ | -| 乐 | Boom | | walker hayes | ★★★★ | -| 乐 | Destituent | | sole | ★★★★ | -| 乐 | 1000 gecs | | 100 gecs | ★★★★★ | -| 乐 | Hey king | | hey king | ★★★★ | -| 乐 | Mbfx | | sole | ★★★★ | -| 书 | random acts of senseless violence | | jack womack | | -| 书 | gilead | | marilynne robinson | | -| 书 | the liar's dictionary | | eley williams | | -| 书 | the way home | | mark boyle | | -| 书 | fütchi perf | | kevin czap | | -| 书 | the master and margarita | | mikhail bulgakov | | -| 书 | linguistics for beginners | | w. terrence gordon | | -| 书 | why i'm no longer talker to white people about race | | reni eddo-lodge | | -| 书 | a history of the world in 10½ chapters | | julian barnes | | -| 书 | ella minnow pea | | mark dunn | | -| 书 | in the miso soup | | ryu murakami | | -| 书 | if on a winter's night a traveller | | italo calvino | | -| 书 | the little prince | | antoine de saint-exupéry | | -| 书 | On the road | | Jack Kerouac | ★ | -| 书 | writing systems | | geoffrey sampson | | -| 影 | pool of london | | | | -| 影 | a quiet place | | | | -| 影 | Princess Mononoke | 1997 | | ★★★★★ | -| 影 | Inside | | Bo Burnham | | -| 影 | Laputa: Castle in the Sky | 1986 | | ★★★ | -| 影 | Tales from Earthsea | 2006 | | ★★ | -| 影 | Ponyo | 2008 | | ★★★ | -| 影 | The Wind Rises | 2013 | | ★★★ | -| 影 | The Tale of the Princess Kaguya | 2013 | | ★★★★ | -| 影 | Ocean Waves | 1993 | | ★★★ | -| 影 | When Marnie Was There | 2014 | | ★★★ | -| 影 | Pom Poko | 1994 | | ★★★★ | -| 影 | Arrietty | 2010 | | ★★★ | -| 影 | pure as snow | | | | -| 影 | the duff | | | | -| 影 | From Up on Poppy Hill | 2011 | | ★★★ | -| 影 | Only Yesterday | 1991 | | ★★★ | -| 影 | eurovision song contest: the story of fire saga | | | | -| 影 | baywatch | | | | -| 影 | bill and ted's excellent adventure | | | | -| 影 | rams | | | | -| 影 | the dictator | | | | -| 影 | une fille facile | | | | -| 影 | the to-do list | | | | -| 影 | the feels | | | | -| 影 | fight club | | | | -| 影 | moxie | | | | -| 影 | Porco Rosso | 1992 | | ★★★ | -| 影 | duck butter | | | | -| 影 | My Neighbours the Yamadas | 1999 | | ★★ | -| 影 | Kiki’s Delivery Service | 1989 | | ★★★★ | -| 影 | Whisper of the Heart | 1995 | | ★★★ | -| 影 | The Cat Returns | 2002 | | ★★★ | -| 影 | monty python and the holy grail | | | | -| 影 | scott pilgrim vs the world | | | | -| 影 | enola holmes | | | | -| 影 | american beauty | | | | -| 影 | Nausicaa of the Valley of the Wind | 1984 | | ★★★★ | -| 影 | educating rita | | | | -| 影 | mean girls | | | | -| 影 | the curious case of benjamin button | | | | -| 影 | the truman show | | | | -| 影 | wild child | | | | -| 影 | blended | | | | -| 影 | yes, god, yes | | | | -| 影 | calamity jane | | | | - -* 2020 - -| 乐 | Born to die: the paradise edition by lana del rey | | | ★★★★ | -| 影 | Spirited Away | 2001 | | ★★★ | -| 影 | My Neighbour Totoro | 1988 | | ★★★★ | -| 书 | Dubliners by James Joyce | | | ★★★★★ | -| 书 | The lord of the rings by J R R Tolkien | | | ★★★★ | -| 书 | The left hand of darkness by Ursula K Leguin | | | ★★★ | -| 书 | Sense and sensibility by Jane Austen | | | ★★★ | -| 书 | Pride and prejudice by Jane Austen | | | ★★★★ | -| 书 | Mansfield park by Jane Austen | | | ★★ | -| 书 | Emma by Jane Austen | | | ★★★★ | -| 书 | Northanger abbey by Jane Austen | | | ★★★★★ | -| 书 | Persuasion by Jane Austen | | | ★★★ | -| 乐 | Cigarettes after sex by cigarettes after sex | | | ★★★★★ | -| 乐 | Closing hour at the cat cafe by catbeats | | | ★★★★ | -| 书 | birdsong by sebastian faulks | | | | -| 书 | Confessions | | St. Augustine | ★★ | -| 书 | the god experiment | | russell stannard | | -| 书 | kolymsky heights | | lionel davidson | | -| 书 | animal liberation | | peter singer | | -| 书 | hello world | | hannah fry | | -| 书 | reasons to stay alive | | matt haig | | -| 书 | sophie's world | | jostein gaarder | | -| 书 | d is for digital | | brian w. kernighan | | -| 书 | if only it were true | | marc levy | | -| 书 | the phantom tollbooth | | norton juster | | -| 书 | the jesus i never knew | | philip yancey | | -| 书 | animals strike curious poses | | elena passarello | | -| 书 | the colour of magic | | terry pratchett | | -| 书 | the five people you meet in heaven | | mitch albom | | -| 乐 | miles of aisles | | joni mitchell | | -| 书 | how to be right in a world gone wrong | | james o'brien | | -| 书 | educated | | tara westover | | -| 书 | walden | | henry david thoreau | | -| 书 | the moral state we're in | | | | -| 书 | Cyberpunk: outlaws and hackers on the computer frontier | | Katie Hafner and John Markoff | | -| 书 | scoundrels volume one by duncan crowe and james peak | | | | -| 书 | dubliners by james joyce | | | | -| 书 | blood river by tim butcher | | | | -| 书 | lord of the rings | | | | -| 书 | catch-22 | | | | -| 书 | the house of the spirits | | | | -| 书 | anne of green gables | | | | -| 书 | a clockwork orange | | | | -| 书 | normal people | | | | -| 书 | in the land of invented languages by arika okrent | | | | -| 书 | uglies by scott westerfeld | | | | -| 书 | so you've been publicly shamed by jon ronson | | | | -| 书 | the outsider by albert camus | | | | -| 书 | the communist manifesto by karl marx and friedrich engels | | | | -| 书 | brave new world by aldous huxley | | | | -| 书 | teacher man by frank mccourt | | | | -| 书 | the weather factor | | | | -| 书 | emma | | Jane Austen | | -| 书 | northanger abbey | | Jane Austen | | -| 书 | persuasion | | Jane Austen | | -| 书 | sense and sensibility | | Jane Austen | | -| 书 | The life-changing magic of tidying up | | Marie Kondo | | -| 书 | The guernsey literary and potato peel pie society | | Mary Ann Shaffer and Annie Barrows | | -| 书 | girl, woman, other | | Bernadine Evaristo | | -| 书 | mansfield park | | Jane Austen | | -| 书 | what does it all mean? | | Thomas Nagel | | -| 书 | diversify | | June Sarpong | | -| 书 | 50 ideas you really need to know: philosophy | | Ben Dupré | | -| 书 | free as in freedom | | Sam Williams | | -| 书 | the problems of philosophy | | Bertrand Russel | | -| 书 | the life-saving manga of tidying up | | | | -| 书 | the man who saw everything | | Deborah Levy | | -| 书 | cyberiad | | Stanislaw Lem | | -| 书 | a nearly infallible history of christianity | | Nick Page | | -| 书 | common people | | | | -| 书 | the midnight library | | Matt Haig | | -| 影 | Howl’s Moving Castle | 2004 | | ★★★ | -| 影 | peter rabbit | | | | -| 影 | home alone 3 | | | | -| 影 | meet me in st louis | | | | -| 影 | the santa clause | | | | -| 影 | fifty shades of grey | | | | -| 影 | sorry to bother you | | | | -| 影 | v for vendetta | | | | -| 影 | going in style | | | | -| 影 | Spider-man: into the spider-verse | | | | -| 影 | kung fu panda | | | | -| 影 | the lorax | | | | -| 影 | rango | | | | -| 影 | the lorax | | | | -| 影 | the babysitter | 2017 | | | -| 影 | arrival | | | | -| 影 | sunshine on leith | | | | -| 影 | spirited away | | | | -| 影 | the shawshank redemption | | | | -| 影 | howl's moving castle | | | | -| 影 | the aeronauts | | | | -| 影 | guys and dolls | | | | -| 影 | birdsong | | | | -| 影 | The hundred year old man who climbed out of the window and disappeared | | | | -| 影 | the spy next door | | | | -| 影 | my spy | | | | -| 影 | a town like alice | | | | -| 影 | the upside | | | | -| 影 | my neighbour totoro | | | | -| 影 | legally blonde | | | | -| 影 | fisherman's friends | | | | -| 影 | 1917 | | | | - -* 2019 - -| 书 | Random acts of heroic love | | | ★★★★ | -| 书 | Metamorphosis | 1915 | Franz Kafka | ★★★★★ | -| 书 | Good omens | | Terry Pratchett & Neil Gaiman | ★★★★★ | -| 书 | Dirk gently's holistic detective agency | | Douglas Adams | ★★★★ | -| 书 | The picture of dorian gray | | Oscar Wilde | ★★★★ | -| 书 | A gentleman in moscow | | | | -| 书 | The river king | | Alice Hoffman | | -| 书 | The happy prince and other tales | | Oscar Wilde | | -| 书 | East of croyden | | Sue Perkins | | -| 书 | The hound of the baskervilles | | Arthur Conan Doyle | | -| 书 | The great gatsby | | | | -| 书 | Transcription | | | | -| 书 | Crooked heart | | | | -| 书 | Ethics in the real world | | | | -| 书 | Pride and prejudice | | | | -| 书 | Do androids dream of electric sheep? | | Philip K. Dick | | -| 书 | Jeeves in the offing | | | | -| 书 | Digital minimalism | | | | -| 影 | Last christmas | | | | -| 影 | Little women | | | | -| 影 | Karate kid | | | | -| 影 | Jurassic park | | | | -| 影 | Anne of green gables | | L.M. Montgomery | ★★ | -| 影 | Emma | | | | -| 影 | Rebecca | | | | -| 影 | Some like it hot | | | | -| 影 | Brief encounter | | | | -| 影 | This is spinal tap | | | | -| 影 | Chariots of fire | | | | -| 影 | Driving miss daisy | | | | -| 影 | The karate kid | | | | -| 影 | Neverending story | | | | -| 影 | Lady and the tramp | | | | -| 影 | The house with a clock in its walls | | | | -| 影 | Descendants 2 | | | | -| 影 | Descendants | | | | -| 影 | The parent trap | | | | - -* 2018 - -| 书 | the abc murders | | Agatha Christie | | -| 书 | dead man's folly | | Agatha Christie | | -| 书 | at bertram's hotel | | Agatha Christie | | -| 书 | the thirteen problems | | Agatha Christie | | -| 书 | the hound of death | 1933 | Agatha Christie | | -| 书 | the music shop | | Rachel Joyce | ★★★★★ | -| 影 | the incredibles 2 | | | | -| 影 | mary poppins returns | | | | -| 影 | a monster calls | | | | -| 影 | murder on the orient express | | Agatha Christie | | -| 影 | sister act live choir | | | | -| 影 | the incredibles | | | | -| 影 | the greatest showman | | | | - -* 2017 - -| 书 | fahrenheit 451 | 1953 | Ray Bradbury | ★★★ | -| 书 | the unlikely pilgrimage of harold fry | | Rachel Joyce | ★★★★★ | -| 书 | the love song of miss queenie hennessy | 2014 | Rachel Joyce | ★★★★★ | - -* 2016 - -| 书 | macbeth | | | | -| 书 | the time traveller's wife | | | | -| 书 | an inspector calls | 1945 | J.B. Priestley | ★★★★ | -| 书 | sherlock holmes | | Arthur Conan Doyle | ★★★★ | -| 书 | the murder at the vicarage | | Agatha Christie | | -| 书 | murder on the orient express | | Agatha Christie | | -| 书 | death on the nile | | Agatha Christie | | -| 书 | parker pyne investigates | | Agatha Christie | | -| 书 | the pavilion on the links | | Robert Louis Stevenson | | -| 书 | and then there were none | | Agatha Christie | | -| 书 | n or m? | | Agatha Christie | | -| 书 | the adventure of the christmas pudding | | Agatha Christie | | -| 书 | crooked house | | Agatha Christie | | -| 书 | finding dory | | | | -| 影 | jumanji: welcome to the jungle | | | | -| 影 | elf | | | | -| 影 | et | | | | -| 影 | miracle on 34th street | | | | -| 影 | it's a wonderful life | | | | -| 影 | matilda | | | | -| 影 | the great gatsby | | | | -| 影 | lego batman | | | | -| 影 | singin' in the rain | | | | -| 影 | chicken run | | | | -| 影 | wallace and gromit - curse of the werebunny | | | | -| 影 | mrs doubtfire | | | | -| 影 | harry potter x7 | | | | -| 影 | interstellar | | | | -| 影 | finding nemo | | | | -| 影 | little rascals | | | | -| 影 | johnny english | | | | -| 影 | toy story | | | | -| 影 | stand by me | | | | -| 影 | slumdog millionaire | | | | -| 影 | west side story | | | | -| 影 | fantastic mr fox | | | | -| 影 | the goonies | | | | -| 影 | the princess bride | | | | -| 影 | willy wonka's chocolate factory | | | | -| 影 | peewee's big adventure | | | | -| 影 | gnomeo and juliet | | | | -| 影 | big hero 6 | | | | -| 影 | the sense of an ending | | | | -| 影 | zootropolis (zootopia) | | | | -| 影 | rock dog | | | | -| 影 | pride and prejudice and zombies | | | | -| 影 | flushed away | | | | - -* 2015 - -| 书 | The tempest | | William Shakespeare | | -| 书 | Of mice and men | 1937 | John Steinbeck | ★★★★ | -| 书 | Dune | | Frank Herbert | | -| 书 | What if | | Randall Munroe | ★★★★ | -| 书 | The book of lost things | | | | -| 影 | School of rock | | | | -| 影 | The hitchhiker's guide to the galaxy | | Douglas Adams | ★★★ | -| 影 | The tempest | | | | -| 影 | Castaway | | | | - -* 2014 - -| 乐 | Stay gold | 2014 | First Aid Kit | ★★★★★ | -| 书 | The strange case of doctor jekyll and mr hyde | | Robert Louis Stevenson | ★★★★ | -| 书 | Animal farm | | George Orwell | ★★★★ | -| 书 | Romeo and juliet | | | | -| 书 | More than this | | | | -| 书 | Holes | | Louis Sachar | ★★★★★ | -| 书 | Ting tang tommy | | | | -| 书 | A murder is announced | | Agatha Christie | | -| 影 | Shrek | | | | -| 影 | Annie | 2014 | | | -| 影 | Holes | | | ★★★ | -| 影 | Romeo and juliet | | | | -| 影 | Big | | | | - -* 2013 - -| 书 | The hitchhiker's guide to the galaxy | | Douglas Adams | ★★★★ | -| 书 | The fault in our stars | | | | -| 书 | Coraline | | | | -| 书 | The curious incident of the dog in the nighttime | | Mark Haddon | ★★★★★ | -| 书 | Little women | | | | -| 影 | Raiders of the lost ark | | | | -| 影 | Cool runnings | | | | -| 影 | Up | | | | -| 影 | Jumanji | | | | - -* 2012 - -| 书 | Alone on a wide wide sea | | Michael Morpurgo | ★★★ | -| 影 | Stormbreaker | | | ★★★ | -| 影 | Hairspray | | | ★★★ | - -* 2011 - -| 书 | there's a boy in the girls' bathroom | | -| 书 | stig of the dump | | -| 书 | kensuke's kingdom | | - -* 2010 - -| 书 | Skeleton key | | Anthony Horowitz | ★★★ | -| 书 | Stormbreaker | | Anthony Horowitz | ★★★ | -| 书 | The hundred and one dalmations | | | ★★★★ | -| 书 | The boy in the striped pyjamas | | | ★★★★ | -| 书 | Harry and the treasure of eddie carver | 2004 | Alan Temperly | ★★★★ | - -* 2009 - -| 书 | The nine lives of montezuma | | Michael Morpurgo | ★★ | - -* 2008 - -| 书 | the wind in the willows | 1908 | Kenneth Grahame | ★★★★ | - diff --git a/tanklobsters.org b/tanklobsters.org deleted file mode 100644 index e6d7ca0..0000000 --- a/tanklobsters.org +++ /dev/null @@ -1,60 +0,0 @@ -#+TITLE: Tank lobsters -#+DATE: 2020-11-20 - -they tell me i can be what i want to be when i grow up, anything in the world my child, imagine it and you will make it, think it and you will be it, touch it and you will hold it so i tell them that i want to be a tank lobster - -a tank lobster, those glorious glorious creatures some kind of an alien that is real and here right here at the back of the upmarket supermarket no my child we don’t shop in there when this one is just as good and half the price but, one child from school tells me that the upmarket supermarket is where the tank lobsters tend to be so i walk in after school one day, hands behind my back because i am sophisticated, chin up because i am sophisticated, down the aisles down and there at the back is the tank the lobster tank with the tank lobsters in - -my child, they say, you can be anything, set your mind to it and you will but you cannot be a lobster not a tank lobster, that is not something you will ever be, a lobster in a tank - -sweet sweet lobster with your claws in front, snap snap, watch vacant, vacant smile, the colour of love, the colour of heat, the colour of memories, slowly moving, one tank lobster two tank lobsters three cramped lobsters tucked up in the upmarket supermarket back where little me hands behind back chin up went to see and stand and watch, tank lobsters - -tank lobsters like the sea lobsters, flooring along in the sea lobsters, swimming and flicking claws in front, free lobsters, vacant smile, smile freely, pots down, freedom out, dance in, one pot lobster parloured up, two pot lobsters parloured up, three pot lobsters well, well done my friends you know how it goes, pot lobsters potting good ready to be tanked up - -look my child at these buoys, these coloured balloons across the sea so sweet aren’t they sweet my child? imagine how peaceful how beautiful it would be to be a buoy on the sweet sweet sea, peaceful peaceful, a utility, a thing, a buoy is something you will never be, a marker of the pots the lobster pots, show the lobster catchers where the caves of death on the sea floor are, mark the way and let them wait to come and take and tank the potted free sea lobsters, keep them store them tank them, tank lobsters now, tank lobsters in the store, the upmarket supermarket, at the back hands behind back chin up go see them squeezed in, the colour of love, sweet sweet smile vacant click click snap snap, no room squeezed in forgive me please oh love me yes, love me, please - -my child, - -my child - -imagine, lobster free free lobster swimming crawling lobstering along in the free sea on the free sea floor when the lobster free lobster sees meat yes please food, food to eat good food love food eat food can’t go did the lobster know, free lobster know, that this food would be the last free food who knows, who knows, next time it ate would only be flakes, shared flakes sprinkle sprinked in the tank from a can by a man working underpaid overtime in a bit too small branded apron at the upmarket supermarket standing at the back by the tank, thank you smile and wave, have a nice day, there’s a tank with a stack of tank lobsters slowly smiling, smiling vacant claws out snap snap red like love, like heat like heat like - -do you remember my child, the songs we used to sing, you would sit on my knee and smile and speak a language no one knew except for you, the words were words of need and joy and not much more, inarticulate and yet articulate articulate, i’d bounce you bounce bounce you and clap the words and you would clap back clap clap back to me and smile i love you i love you love you - -lobsters clap tank lobsters don’t clap free, sea lobsters free are free to clap as they crawl in the sea their claws go snap snap clap what i would give, - -what i would give - -my child - -would i give my child, would i give you to have you back, to have it be how it used to be, would i give would i give, give you, where am i know where are you, me, i’m here, where - -clap - -clap clap - -they say they say that lobsters love for life that lobsters are not unfaithful creatures free loving freely on the sea floor roaming, lobsters love one lobster each and that lob loves right back a pair of lobsters each the colour of love, the colour of heat, if we could be those lobsters would we, i would love for you to be a lobster, anything you want to be know you can be, loved like a lobster - -tank lobster, love too do they love the lobsters they are tanked with do they break their lobster love pledge and give up, start again when tanked or do they wait and stay faithful in case one day they find their love again, perhaps they ,now that tank lobsters never meet their love again and simply lay stacked snap snapping sad and snatched from what makes life worth living, cramped lobster two lobsters, tank lobsters red, the colour of love but no love there they’re all just tanked instead - -there i stand in the upmarket supermarket chin up hands behind back walk back to the back click clack only silence and the man underpaid overworking overtime in a bit too small apron stopped over the tank, my tank their tank, spilling flakes they’re nothing on the meat of the cages where the tank lobsters last were free only wanted to eat, now they’re lobster meat tanked, waiting waiting for an up chinned hand backed buyer to come in, do they know, do they know the slow warm comforting killing coming to them - -but - -no, tank lobsters are only lying stacked cramped tanked click clack snip snap claws out vacant smiles memories of love forever red the colour of love the colour of heat but not hot they are cold, like me - -my child, what are you saying - -underpaid overworked man understands stoops back to the back staff place in the upmarket supermarket, tip toes me up try for tank reach i reach in, the clammy tank lobsters touch my hands pull out writhe can’t be hard, zip my coat a comfort hand hide my work, like i’m pregnant, wet floor dripping drip also feel the lobster kicking don’t worry - -untanked lobster you aren’t tanked any more tank lobster free, free sea lobster i will take you to the sea, i will let you wander free and find forever love once more - -they tell me i can be what i want to be, be who i want to be, i don’t know what i want to be, the tank lobster freed by me floated quietly on the sea when i gently placed them to go free, i killed a family, me, and a family is the only thing i don’t know if i know i want to need, to be, - -a family maybe i should be - -my child, know that you have me who loves loves you and cares for you is there for you, - -i don’t know you, a narrative, you are so many and so few so full of empty words you judge my worth on words and what you’ve heard and show me love to move you up, you use me as a ladder climbing up a stack of tank lobsters to feed yourself to find the meat that dangles hangs in front the cage you don’t realise the cage is caging you inside you’re stuck, i’m not your child i’m just your toy your way you throw away, been thrown away so much that i won’t judge the way you act i know that what you strive for is a trap - -in a way we’re all tank lobsters already, and maybe it’s a sorry dream but that’s the way it tends to be diff --git a/tj.org b/tj.org deleted file mode 100644 index c864686..0000000 --- a/tj.org +++ /dev/null @@ -1,60 +0,0 @@ -#+TITLE: 太极拳和西方古典音乐 -#+DATE: 2023-06-21 - -我会拉大提琴很久了。虽然我拉的比较好,我的水平每天都在越来越高,但我肯定称不上是个音乐家。我自从来到中国后,都没听过,也没拉过西方的古典乐。最近是我来到中国之后第一次去约会,并听了柴可夫斯基的音乐会,我开始觉得太极拳和古典乐有很多相似性。我在这篇文章里要告诉你为什么我这样认为。 - -* 太极拳的历史与古典乐历史的对比 - -太极拳的历史充满了故事和矛盾,很难理解。相比之下,西方古典音乐的历史更容易理解。西方音乐传统、西方乐器和记谱法都来自己录怎么唱祈祷文的基督教僧侣。 - -大部分西方古典音乐的历史是由基督教主导的。这一时期的很多著名作曲家,例如巴赫,都受到上帝的幻觉,或者圣经段落,或者有一个教会要求他写作圣歌。 - -就像太极拳有几个不同的式,西方古典音乐也有四个时代:首先是文艺复兴时期,然后是巴洛克时期,再然后是古典时期,最后是浪漫主义的时期。我们把由它们组成的时期称为西方古典音乐。每个时期都有共同和独特的特征。虽然浪漫主义音乐比其他音乐更新,但是人们也喜欢表演比较旧的音乐,成喜欢听见比较旧的音乐,并且每个时期有一些作曲家更喜欢写作旧风格的音乐。现在,最好的音乐家通常只专注一种风格。太极拳也是一样的。太极师傅通常只是一种式的师傅。 - -在文艺复兴时期里人们首先开始真正地尝试不同的节奏,以及发展音节与和谐的理论。这个是其正式化了以后那个时期的标准特征。歌通常同时有很多不同的旋律,并且这些不同的旋律都有很像的特征,所以音乐听起来非常厚重。 - -在巴洛克时期,音乐理论进一步发展了。作曲家开始用特定的调子写作音乐,开始用标准循环的和弦。由于和弦不断地发展,机型创作变得更普通,所以音乐家不仅要了解怎么把他们的乐器玩得很好,而且要了解这些音乐方法一起协同。人们想要创造更丰富的声音,不仅要加更多的旋律线,而且要加更多的乐器。从此作曲家开始为现代管弦乐队写作音乐。 - -在古典时期里人们整理了巴洛克时期的概念,然后专注音乐的基础概念。通常音乐只有一段伴有和弦或者固定音型的旋律线,没有真正的对位。作曲家的目标不是丰富和有力的声音,而是他们希望创造很精致和优美的声音。因为乐谱开始用音量和发音说明,所以表演音乐家不再对他们演奏的内容有那么多的控制。表演期间的即兴创作也就消失了。 - -浪漫主义音乐是十九世纪浪漫主义艺术运动的一部分。音乐的背景现在超越声音,代表情感或者故事。虽然这种方法在巴洛克时期相当常见,但是在浪漫主义时期并不常见。很多音乐的灵感来自自然,从自然的声音、自然的形状找到灵感。技术变得非常重要:尤其是喧闹和安静的部分之间的对比。 - -这些是四种主要的风格,但是在二十世纪很多人尝试了不同的风格。其他风格的音乐越来越受欢迎,然后作曲家用它们的特点写作很有意思的新音乐。例如经常用萨克斯管和其他爵士乐器。现代太极拳式有时候用不同武术的方法,这两个方法是一样的。 - -* 传说 - -太极拳历史有很多传说,从她的起源故事到师傅的故事。虽然西方古典音乐的起源更容易追溯,但是它也有它自己夸张的传说。 - -神通的想法在西方古典音乐的历史很重要。莫扎特是最有名的例子,他从小表现非凡的音乐天赋。贝多芬开始表演的时候,因为他比莫扎特大一点,所以他的父亲在广告中谎报他的年龄。中年贝多芬失聪了,这是他现代声誉的重要方面。虽然他听不到自己写的音乐,但是他能感觉到乐器乐器的振动,他对音乐概念的了解非常深厚,所以他在没有听觉的情况下还能写作一些他最受好评的音乐。 - -在浪漫主义时期里,孤独是一种愿望。埃尔加就是一个典型的例子。虽然她写了一些这个时期最有名的音乐,但是他并不认为他自己是一个社区的一员。太极拳并不完全相同但是个人师傅一边致力于提高自己的技术,一边发现新技术的想法是一个共同的愿望。 - -在浪漫主义时期里,作曲家创作音乐的灵感也来自他们来自文化的重要文化部分。他们发展了现有的神话,用这些故事创作新的故事,还有讲述对他们自己国家的热爱。西贝柳斯的《芬兰》发展了一个新的芬兰身份概念。当时,芬兰还在被俄国控制。 - -* 实践 - -阴阳关系在太极拳中很重要。虽然能量平衡是不平等的,但是这种不平等创造了太极拳的力量和美丽。古典音乐表演在表演者和听众之间也存在不平衡。表演者一边演奏,听众一边听见。表演员是主动的,而听众是被动的。表演者应该努力感动听众。他们不用自己身体的力量,而是用演奏的情感。 - -太极拳是一种内功。重点不仅在于身体,而且在于体内动作的能量。同样,西方古典音乐也不能只用演奏的技术。表演者应该感受到音乐中的情感,并且跟音乐建立关系。但是为了在情感上而不是技术上进行演奏,音乐的规则应该完全内化。就像太极拳有不多的中心动作,可以通过多种方式组合,音乐也是一样的。 - -最中心的部分是音阶,八个音符跨越一个八度。不同种的音阶,例如大音阶或者小音阶,在听众中产生不同的感情。 - -琶音是音阶中的选定音符,通常是第一、第三、第五和八度。这些音符可以作为和弦一起演奏,也可以顺序地演奏。通过不同的顺序演奏琶音中的音符,我们能认识很多最有名的古典音乐作品。 - -我们开始学习演奏古典乐器的时候,我们首先学习音阶和琶音。就像在台集权中一样,我们在两个方向上一遍又一遍的演奏这些音符,直到他们听起来很热爱。当我们能感受到我们演奏的所有音乐的模式的时候,我们不是一个音符一个音符地演奏音乐,而是对一个个想法进行演奏。 - -实际上,我认为不能一个音符一个音符的演奏音乐。音乐由小节中的音符,乐句中的小节,整个作品中的乐句组成。但是这些小节只能作为导航辅助工具,它们在实际的演奏很少有用。相反我们应该考虑乐句,听起来像一系列的动作。乐句通常能以不同的顺序一遍又一遍地演奏,以便练习特定部分,也许几百次。我经常会慢慢地演奏一个新乐句,然后逐步提高一点速度,直到我能完全流利地演奏。弹奏最后一个乐句然后移动来开始学习也是常见的做法。这样我们对音乐的结尾有了最熟悉的了解,我们演奏音乐的时候就可以变得越来越舒服。 - -有作曲家在其他音乐作品上写变奏曲的传统。他们保持和弦进行或者中心的主题,但是改变顺序或者节奏,以这种方式写作听起来又熟悉又新的音乐。 - -这些在西方古典音乐中的方法和太极拳的方法都有一样的目的:个体的动作应该是无意识的,这样我们能真的欣赏真实的动作。 - -* 当代器乐 - -技术让人们用唱片存储音乐,又让人们用电脑发出声音之后,这些方法也成为西方古典音乐传统的一部分。二十世纪音乐的重要人是约翰·凯奇(John Cage)。他的灵感来自易经还有音乐怎么融入随机性。虽然我已经说过因为表演者通常只用乐谱作为执导,所以演奏古典音乐没有严格的办法,但是 凯约翰还是认为音乐有太多顺序。即使每个音乐者会以不同的方式演奏,但是一般的旋律和顺序还是一样的。他希望每次音乐演奏的时候都听起来不一样。他的作品叫4’33’’是这个时代最有名的作品,真的发展了这个概念。弹起来需要四分三十三秒,但是音乐者沉默了。虽然没有乐器发出声音,但是这件作品也不是沉默的,因为世界也不是沉默的。听众应该听风声、其他人声、鸟鸣声之类的。世界声总在变化。我认为这和太极拳比较一样,因为表演者对环境反应,而不仅仅是遵守乐谱。 - -* 结语 - -我不认为传统太极拳和西方古典音乐是完全相同的,因为它们的发展方式非常不一样。但是我考虑这个话题的时候我很惊喜地发现它们这么多共同的特点。我找不到关于这些学科之间关系的先前研究,但是我希望这个学科有进一步的研究成果。 - -周千舒校对 diff --git a/urls.org b/urls.org deleted file mode 100644 index d989a7a..0000000 --- a/urls.org +++ /dev/null @@ -1,90 +0,0 @@ -#+TITLE: Ultimate resource locators - -This is my contribution to resolving the website discoverability crisis. - -* Friends - -- [[https://www.acdw.net/][acdw]] -- [[https://m455.casa/][m455]] -- [[http://tilde.town/~dzwdz/][dzwdz]] -- [[https://bx.wtf/][bx]] -- [[http://tilde.town/~opfez/][opfez]] -- [[https://feliver.se/][feli]] - -* Blogroll - -The sites that i get delivered to my inbox every morning. - -- [[http://xkcd.com/rss.xml][XKCD]] -- [[https://zenhabits.net/feed/][zen habits]] -- [[https://www.raptitude.com/feed/][Raptitude.com]] -- [[https://www.lexaloffle.com/bbs/feed.php?uid=1][zep [Lexaloffle Blog Feed]]] -- [[https://www.kickscondor.com/rss.xml][Kicks Condor]] -- [[https://wrathofgnon.substack.com/feed][WrathOfGnon's Newsletter]] -- [[https://vitalyparnas.com/feeds/lifestyle.rss.xml][Vitaly Parnas - Lifestyle category]] -- [[https://tilde.town/~dzwdz/blog/feed.atom][dzwdz]] -- [[https://tilde.town/~kindrobot/index.xml][kindrobot]] -- [[https://tilde.town/blog.xml][tilde.town blog]] -- [[https://text.causal.agency/feed.atom][Causal Agency]] -- [[https://regularflolloping.com/atom.xml][Regular Flolloping]] -- [[https://m455.casa/feed.rss][m455's blog posts]] -- [[https://linkbudz.m455.casa/feed.rss][linkbudz rss feed]] -- [[https://journal.miso.town/atom?url=https://tilde.town/~rose/journal.html][rose's tea journal]] -- [[https://malleable.systems/blog/index.xml][Malleable Systems Collective]] -- [[https://grimgrains.com/links/rss.xml][Grimgrains]] -- [[https://existingunironically.wordpress.com/feed/atom/][existing unironically]] -- [[https://esoteric.codes/rss][esoteric.codes]] -- [[https://forum.merveilles.town/rss.xml][Merveilles Forum]] -- [[https://elly.town/feed.xml][elly.town]] -- [[https://solar.lowtechmagazine.com/index.xml][LOW-TECH MAGAZINE English]] -- [[https://citrons.xyz/a/journal/rss.xml][citronz.xyz - journal]] -- [[https://amodernist.com/all.atom][Philip KALUDERCIC's Web Syndication (all)]] -- [[https://bpev.me/rss][bpev.me]] -- [[https://minutestomidnight.co.uk/feed.xml][Minutes to Midnight]] -- [[https://silviamaggidesign.com/feed.xml][Silvia Maggi]] -- [[https://ayu.land/atom.zh.xml][Sweetfish Ayu]] -- [[https://www.javis.me/feed/][javis]] -- [[https://para.bearblog.dev/feed][parathink]] -- [[https://kusai.bearblog.dev/feed/][kusai]] -- [[https://skywt.cn/rss.xml][SkyWT]] -- [[https://neutrino7.top/atom.xml][JollyLight]] -- [[https://blog.yazawaniko.com/index.php/feed][Kiritake Kumi]] -- [[https://tianxianzi.me/atom.xml][tianxianzi]] -- [[https://inklings.bearblog.dev/feed/][inklings]] -- [[https://cpdd.at/?feed=rss2][ba]] -- [[https://with.fish/atom.xml][with fish]] -- [[https://tilde.town/~vilmibm/blog/feed.xml][vilmibm]] -- [[https://www.zhangjingna.com/blog-home?format=rss][Jingna Zhang]] -- [[https://blog.rurichan.work/feed/atom][Ruri's Blog]] -- [[https://neutrino7.top/atom.xml][JollyLight]] -- [[https://blog.yazawaniko.com/index.php/feed][Kiritake Kumi]] -- [[https://tianxianzi.me/atom.xml][tianxianzi]] -- [[https://inklings.bearblog.dev/feed/][inklings]] -- [[https://yukiha.live/?feed=rss2][yukiha]] -- [[https://jasonlannel.github.io/atom.xml][JasonL's Blog]] -- [[https://tofuball.moe/feed/][Tofu Ball]] -- [[https://sauri.ca/index.xml][sauri]] - -* Interesting pages - -Sorted by topic. - -** Computers - -- [[https://gitlab.com/nakst/essence][Essence OS]], a homebrew operating system. -- [[https://github.com/joshiemoore/snakeware][Snakeware]], a linux distro with a python-based graphical userspace that doesn't use x or wayland. -- [[https://castle-engine.io/][Castle engine]], an integrated pascal game engine. -- [[http://anvil-editor.net/ -][Anvil editor]], a text editor inspired by acme - -** Small programming languages - -- [[https://neat-lang.github.io/][Neat]] -- [[https://berry-lang.github.io/][Berry]] -- [[https://wy-lang.org/][Wenyan]], programming in ancient chinese - - -** Music - -- [[https://strudel.cc/][Strudel]], dynamic music coding in the browser. -- [[https://helio.fm/][Helio]], a music sequencer. diff --git a/uses.org b/uses.org deleted file mode 100644 index b57a443..0000000 --- a/uses.org +++ /dev/null @@ -1,108 +0,0 @@ -#+TITLE: Things i use - -On this page i document the things i use every day. I think it is important not become governed by things, but also it's nice to see how different people approach the same problems, and to acknowledge what things are important to the way that i live. - -As much as possible, i try to make sure that everything fits within one bag, and everything listed here does fit in my rucksack. However, i haven't listed all the books i own, which would obviously not be practical to travel with. - -* Hardware - -I've split this list into the things i wear on an everyday basis, the things i pack into my everyday bag, and the things i pack in my rucksack. - -** Wearing - -| Trenchcoat | | Huge, heavy, leather coat. I found it in a charity shop. | -| Shirt | 288 | A simple button up shirt, made of wool. | -| Vest | 104 | Made of wool. | -| Underwear | | Made of synthetic material. | -| Jeans | 508 | Bought very cheaply in china. They are falling apart but while they still work, i'm not going to replace them. | -| Boots | 644 | Falling apart. Good shoes are hard to find. | -| Watch | 62 | | -| *Total:* | 1606 | | -#+TBLFM: @>$2=vsum(@1..@-1) - -** Every day bag - -| Sling | 176 | Very useful for carrying things on a daily basis without having to rely on my pockets. I also have another bag my sister made for me (128g). | -| Phone | 213 | The battery life is atrocious these days, but it still does what it needs to do. I also have a smaller phone (126g) | -| Headphones | 30 | In ear monitors with a third party bluetooth cable. | -| Power bank | 210 | Can't be charged with a c to c cable, which is really annoying. | -| Ear plugs | 6 | Silicon. These are a knockoff brand and still work well. | -| Sleeping mask | 21 | The last place i lived didn't have curtains. It's also useful for sleeping well on transport. | -| Wallet | 109 | The listed weight includes some cash and cards. I wanted something small which also had room for coins, which seems to be a hard ask. | -| Face mask | 7 | | -| Notebook and pen | | | -| *Total:* | 772 | | -#+TBLFM: @>$2=vsum(@1..@-1) - -** Rucksack - -| Rucksack | 521 | ~20l capacity. Has almost no internal organisation and a suitcase zip. [[https://old.reddit.com/r/onebag/comments/1c83nqf/a_couple_of_days_in_colorado_ll_bean_22l/][You don't need a specialist bag to travel]]. | -| Packing cube | 64 | Keep my clothes protect and separate from whatever else i dump in the bag. | -| Shirt | 356 | A simple button up shirt, made of wool. | -| Vest | 104 | Made of wool. | -| Thermal top | 169 | For extra warmth in the winter. Made of synthetic material which makes my skin itch. | -| Thermal bottoms | 176 | For extra warmth in the winter. A little uncomfortable to wear because the jeans are too thin. | -| Underwear | | Made of synthetic material. | -| Bucket hat | 90 | To stay fashionable in the summer. | -| Winter hat | 51 | To stay warm in the winter. Actually this hat is not really that warm. | -| Winter gloves | 81 | I don't want to lose my fingers. | -| Laptop | 789 | One of the lightest and smallest i could find at a reasonable price. Now that phones and tablets are a thing, it seems that this is prioritised less. | -| Wall brick | 73 | Being a uk plug, it is much bulkier than it could be. It has a usb-c port and serves forty-five watts. | -| Charging cable | 61 | Six foot long and quite sturdy. | -| Pencil case | 38 | Opens into a tray when unzipped. I use it to carry my toiletries, an idea i got from [[https://jeremymaluf.com/onebag/][here]]. | -| Scissors | | These come in useful frequently, for opening packages and cutting my nails. | -| Deodorant | 53 | It's a crystal. It's lasted me much longer than the packaging said it would. | -| Toothbrush | 14 | Just a run of the mill toothbrush. I also have an electric toothbrush (111g) that charges via usb c. | -| Toothpaste | 25 | Whatever toothpaste i can find. | -| Dental floss | 8 | | -| Safety razor | 70 | This is inconvenient to travel with, as it is quite heavy and the blades can't be taken on planes and sometimes are hard to find easily. | -| Soap | | A block of aleppo soap. | -| Hairbrush | 49 | The bristles are moulded from the plastic, so it doesn't break in my thick hair within a week. Discovered this brand from [[https://loganletsgo.substack.com/p/my-travel-gear][this blog post]]. | -| Towel | 60 | A small towel. Bigger towels are more cosy, but a lot heavier. This one is made of linen and dries fast without smelling bad. | -| Water bottle | 178 | Despite the weight, i carry a flask, because i like hot water. | -| Cutlery | 46 | Chopsticks and a spoon. They come in handy quite frequently. Made of wood. | -| Passport | 36 | | -| Skipping rope | 151 | | -| Book | 281 | I replace it once i've read it. | -| *Total:* | 3544 | | -#+TBLFM: @>$2=vsum(@1..@-1) - -I put the clothes in the packing cube, the toiletries in the pencil case, some everyday items in the sling, and everything in the rucksack. - -This table layout is inspired by [[https://cedricwaldburger.com/list/][Cédric Waldburger's list]]. - -* Software - -On my computer: - -- *Operating system:* debian -- *Desktop environment:* kde -- *Web browser:* firefox + ublock origin -- *Password manager:* bitwarden -- *Mail service:* fastmail -- *Web hosting:* fastmail -- *Mail client:* mu4e -- *Feed reader:* feed2imap-go -- *Contacts:* fastmail -- *Notes:* org-mode - -On my phone: - -- Android + kiss launcher -- Wechat -- Pleco -- Transistor internet radio - -* Dream setup - -I would like a computer that is like my surface go, but is actually a laptop, and has proper linux support. The surface go and ipad pro lines have led to significant advances in small keyboards since the netbook era, where although the keys have been shrunk, the traditional layout is preserved and typing at a fast and consistent rate is much easier and more comfortable. Unfortunately all the netbook style computers available today haven't paid much attention to these designs and the keyboards are still unpleasant to use. Sometimes using the surface go as a tablet is nice, but i rarely do that as for most tasks a laptop is simply more productive. - -I value small size and long battery life much more than power, so i would like to see a small and light computer with an all day battery life released. Hopefully the recent rise in popularity of arm systems mean this is less of a pipe dream than it might have seemed a few years ago. - -* Other people's lists - -- [[https://www.tierney.tv/everything][Everything I Own]] -- [[https://jeremymaluf.com/onebag/][Indefinite Backpack Travel]] -- [[https://www.burgerabroad.com/40/][The 40 Things I Own]] -- [[https://old.reddit.com/r/onebag/comments/aivylk/yet_another_permanent_onebag_setup/][Yet another permanent onebag setup]] -- [[https://www.youtube.com/watch?v=i6SQBh-_SQM][Minimalist Packs 17 Liters for 1 Month of Travel]] diff --git a/zhongwen.org b/zhongwen.org deleted file mode 100644 index 4e29825..0000000 --- a/zhongwen.org +++ /dev/null @@ -1,14 +0,0 @@ -#+TITLE: A roadmap for actually learning chinese -#+DATE: 2024-05-21 - -There are two main aspects of studying a language: listening and reading. These are the two ways that you can consume content. Production by way of speaking and writing also takes practice, but is easier to do well once you have a strong grasp of listening and reading. - -* Reading - -In general, i don't recommend graded readers. I used grading reading resources for a while and found them beneficial for helping me realise that actually i could read and understand chinese texts. But as i got more used to them, i started thinking that they were less useful. One of the big issues is that they often try to keep the vocabulary at a particular level. That's what graded means. But as my ability improved, i begin noticing strange turns of phrase that occurred because the writer didn't think the more native phrasing would be a good fit for the target audience. I tried at higher levels, and didn't notice so much of this, but the concern was still in the back of my mind. What if i was just not a level yet that i realised how strange these sentences sound? - -So now i think that it is better to start on native content as soon as possible. Children's books are good. In some ways, they are similar to graded readers. In others, they are different. One of the big differences is that graded readers serve to gradually introduce new vocabulary to students of the language, whereas children's literature serves to help native speakers, who already have quite a large vocabulary, solidify their connection between the written and spoken forms of the language. Lots of children's books have vocabulary that are relatively rare, like names of animals. - -I recommend using a learning with texts type program to read. These are applications which will highlight words in different colours depending on how well you know the word. I find it very motivating to open a new text and see that most of it has a white background, suggesting with some effort i should be able to read and understand it. - -The program i use is called languagecrush. It costs five dollars per month, and i think it's worth it. A free program which is also nice is vocabtracker. I prefer languagecrush because it has nice functionality for splitting and joining characters, which is very useful as often the morphemiser doesn't work so well in chinese. diff --git a/乐团用语中英翻译对照.org b/乐团用语中英翻译对照.org deleted file mode 100644 index f56486c..0000000 --- a/乐团用语中英翻译对照.org +++ /dev/null @@ -1,28 +0,0 @@ -| 对音/调音 | Tuning | -| 前奏 | Overture | -| 速度 | Tempo | -| 旋律 | Melody | -| 节奏 | Rhythm | -| 乐句 | Phrase | -| 乐段 | Section | -| 乐章 | Movement | -| 力度 | Dynamics | -| 配器 | Instrumentation | -| 声部 | Part | -| 连音/连弓/连奏 | Legato | -| 断奏 | Staccato | -| 重音 | Accent | -| 独奏 | Solo | -| 齐奏 | Tutti | -| 强 | Forte | -| 弱 | Piano | -| 快 | Fast | -| 慢 | Slow | -| 渐强 | Crescendo | -| 渐弱 | Diminuendo | -| 渐快 | Accelerando | -| 渐慢 | Rallentando / ritardando | -| 突弱 | Fortepiano | -| 突强 | Sforzando | - - |