Wave changes
This commit is contained in:
38
Emacs/20241210004247-emacs_moc.org
Normal file
38
Emacs/20241210004247-emacs_moc.org
Normal file
@@ -0,0 +1,38 @@
|
||||
:PROPERTIES:
|
||||
:ID: 8fa3f476-6152-45f4-b618-50f1e4bce46c
|
||||
:END:
|
||||
#+title: Emacs MOC
|
||||
#+filetags: :emacs:moc:
|
||||
|
||||
The purpose of this file is to store things related to emacs (that being packages, or community projects that i stumble across).
|
||||
* Links
|
||||
- [[id:034abe27-ca14-4dc0-9a3f-b8d0e1f26342][Emacs Org Roam]] for roam related things
|
||||
- [[id:8e5e9498-ff3c-48e7-aab5-6e94b2e41ccb][Emacs GTD]]
|
||||
- [[id:966175d4-3b58-4abc-9b41-08cbf328dd87][Emacs Keybindings]]
|
||||
- [[id:7e79e4c5-383d-450f-882c-33d4f87ba1b5][Emacs ELISP]]
|
||||
- [[id:2ab0fa3f-8ac6-4af2-8cd4-1dd490fb19c3][Emacs Magit]]
|
||||
- [[id:45CC3AF5-5E20-4B03-A36C-8D4BDD5CBB13][Emacs Evil Mode]]
|
||||
- [[id:7d2e867e-f091-4362-a583-453f732207fe][Emacs ORG Publish]]
|
||||
|
||||
* Resources
|
||||
- A link that contains all the key bindings for emacs: [[http://xahlee.info/emacs/emacs/emacs_keybinding_list.html][Keybindings list]]
|
||||
- the theme 'ef-dream' repository: [[https://github.com/protesilaos/ef-themes][ef-themes]]
|
||||
- something to look into: [[https://github.com/mickeynp/combobulate][combobulate]]
|
||||
- the use package git hub: [[https://github.com/jwiegley/use-package][use-package]]
|
||||
- hamacs (someones emacs config) [[https://www.howardabrams.com/hamacs/][hamacs]]
|
||||
- projectile doc [[https://docs.projectile.mx/projectile/configuration.html][proj doc]]
|
||||
- doom style dashboard [[https://gist.github.com/DevelopmentCool2449/ffc91d1d9b7b16e0f48402b698386f3d#file-dashboard-doom-style-el][doom dash]]
|
||||
- soft charcoal theme [[https://github.com/mswift42/soft-charcoal-theme?tab=readme-ov-file][sc]]
|
||||
- the theme im currently using: [[https://github.com/ogdenwebb/emacs-kaolin-themes?tab=readme-ov-file][kaolin]]
|
||||
- config: [[https://gitlab.com/dwt1/configuring-emacs][config-dwt]]
|
||||
- simplenote to self hosted: [[https://ru2saig.github.io/posts/switching-from-simplenote-to-a-self-hosted-approach-nextcloud-orgzly-and-emacs/][Link]]
|
||||
|
||||
|
||||
|
||||
[[../assets/file_example_MOV_480_700kB.mov]]
|
||||
|
||||
|
||||
[[../assets/file_example_MP4_480_1_5MG.mp4]]
|
||||
|
||||
|
||||
[[../assets/file_example_MP3_700KB.mp3]]
|
||||
40
Emacs/20241210004329-org_roam.org
Normal file
40
Emacs/20241210004329-org_roam.org
Normal file
@@ -0,0 +1,40 @@
|
||||
:PROPERTIES:
|
||||
:ID: 034abe27-ca14-4dc0-9a3f-b8d0e1f26342
|
||||
:END:
|
||||
#+title: Emacs Org Roam
|
||||
#+filetags: :emacs:roam:org:docs:resources:
|
||||
This base will contain information on org roam. Although its closely linked to the [[id:8e5e9498-ff3c-48e7-aab5-6e94b2e41ccb][Emacs GTD]] node, that one will contain articles, notes and videos related to how to get things done.
|
||||
|
||||
* Main
|
||||
[[https://www.orgroam.com/manual.html][User Manual]]
|
||||
|
||||
Here is the current config in my init.el
|
||||
#+BEGIN_SRC elisp
|
||||
;;roam config
|
||||
(use-package org-roam
|
||||
:ensure t
|
||||
:custom
|
||||
(org-roam-directory "~/master-folder/org_files/org_roam")
|
||||
:bind (("C-c n l" . org-roam-buffer-toggle)
|
||||
("C-c n f" . org-roam-node-find)
|
||||
("C-c n i" . org-roam-node-insert))
|
||||
:config
|
||||
(org-roam-setup))
|
||||
#+END_SRC
|
||||
|
||||
|
||||
- for the org-roam-ui (the graphical interface for nodes): [[https://github.com/org-roam/org-roam-ui][org-roam-ui]]
|
||||
- an article: [[https://gist.github.com/nickanderson/00005b5b03e323a65ada98c5fa5ebb11][example-org-roam-workflow.org]]
|
||||
- An article to read: [[https://cmdln.org/2023/03/25/how-i-org-in-2023/][How i use org in 2023]]
|
||||
- An article: [[https://jethrokuan.github.io/org-roam-guide/][org-roam-guide]]
|
||||
- An article: [[https://ianjones.info/own-your-second-brain][Own your second brain]]
|
||||
- article: [[https://honnef.co/articles/my-org-roam-workflows-for-taking-notes-and-writing-articles/][my-org-roam-workflows-for-taking-notes-and-writing-articles]]
|
||||
- article: [[https://michaelneuper.com/posts/how-i-use-org-roam-to-takes-notes-for-cs/][how-i-use-org-roam-to-takes-notes-for-cs]]
|
||||
|
||||
The command below starts emacs in a terminal and kills it after 10 seconds. this is useful for when I add a note in the main machine, but the server's DB doesn't pick up the changes until Emacs is restarted in the server.
|
||||
#+begin_src bash
|
||||
timeout 10 emacs >/dev/null 2>&1
|
||||
#+end_src
|
||||
|
||||
* Articles
|
||||
- https://orgmode.org/worg/index.html
|
||||
7
Emacs/20241210004453-gtd.org
Normal file
7
Emacs/20241210004453-gtd.org
Normal file
@@ -0,0 +1,7 @@
|
||||
:PROPERTIES:
|
||||
:ID: 8e5e9498-ff3c-48e7-aab5-6e94b2e41ccb
|
||||
:END:
|
||||
#+title: Emacs GTD
|
||||
#+filetags: :emacs:resources:
|
||||
|
||||
- article: [[https://hamberg.no/gtd][gtd]]
|
||||
18
Emacs/20250218174735-emacs_stuff_keybindings.org
Normal file
18
Emacs/20250218174735-emacs_stuff_keybindings.org
Normal file
@@ -0,0 +1,18 @@
|
||||
:PROPERTIES:
|
||||
:ID: 966175d4-3b58-4abc-9b41-08cbf328dd87
|
||||
:END:
|
||||
#+title: Emacs Keybindings
|
||||
#+filetags: :emacs:guide:
|
||||
|
||||
Keybindings I have come across:
|
||||
|
||||
* Get help for a major mode:
|
||||
|
||||
Type `C-h m` to get information for a major mode.
|
||||
|
||||
|
||||
* TO indent a region n amount of spaces (where n is a number): `C-u n C-x Tab`
|
||||
|
||||
* Projectile:
|
||||
- `SPC-p p` - switch project
|
||||
- `SPC-p f` - find project
|
||||
82
Emacs/20250326002128-emacs_stuff_elisp.org
Normal file
82
Emacs/20250326002128-emacs_stuff_elisp.org
Normal file
@@ -0,0 +1,82 @@
|
||||
:PROPERTIES:
|
||||
:ID: 7e79e4c5-383d-450f-882c-33d4f87ba1b5
|
||||
:END:
|
||||
#+title: Emacs ELISP
|
||||
#+filetags: :emacs:elisp:guide:
|
||||
|
||||
-- use `<s` followed by `TAB`
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(defun my-echo-input ()
|
||||
"Prompt the user for input and echo it back."
|
||||
(interactive)
|
||||
(message "hello"))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: my-echo-input
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(shell-command "thunar ~/Documents/ &")
|
||||
(run-at-time "1 sec" nil #'delete-other-windows)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: [nil 26600 20298 876807 nil delete-other-windows nil nil 917000 nil]
|
||||
|
||||
#+begin_src elisp
|
||||
(defun open-current-dir()
|
||||
(interactive)
|
||||
(cond ((string-equal system-type "gnu/linux")
|
||||
(shell-command (concat "thunar " ".")))
|
||||
((string-equal system-type "darwin")
|
||||
(shell-command (concat "open " "."))))
|
||||
)
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: open-current-dir
|
||||
|
||||
#+begin_src elisp
|
||||
|
||||
(defun test()
|
||||
(interactive)
|
||||
(cond ((string-equal system-type "gnu/linux")
|
||||
(message "linux"))
|
||||
((string-equal system-type "darwin")
|
||||
(message "mac"))
|
||||
)
|
||||
)
|
||||
|
||||
(defun kill-other-buffers-startup ()
|
||||
"Kill all buffers except the current one."
|
||||
(interactive)
|
||||
(mapc (lambda (buffer)
|
||||
(unless (eq buffer (current-buffer))
|
||||
(kill-buffer buffer)))
|
||||
(buffer-list)))
|
||||
|
||||
|
||||
;(add-hook 'emacs-startup-hook #'kill-other-buffers-startup)
|
||||
|
||||
#+end_src
|
||||
|
||||
#+begin_src elisp
|
||||
|
||||
(defun create-weekly-entry ()
|
||||
(interactive)
|
||||
(let* ((current-date-time-format "[%Y-week-%V]")
|
||||
(timestamp (format-time-string current-date-time-format))
|
||||
(entry (concat "* Weekly Entry: " timestamp "\n"
|
||||
"** Tasks:\n"
|
||||
"** Notes:\n"
|
||||
|
||||
)))
|
||||
(write-region entry nil "~/master-folder/org_files/todo/master-tl.org" 'append)))
|
||||
|
||||
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
: test
|
||||
|
||||
46
Emacs/20250329231658-emacs_stuff_magit.org
Normal file
46
Emacs/20250329231658-emacs_stuff_magit.org
Normal file
@@ -0,0 +1,46 @@
|
||||
:PROPERTIES:
|
||||
:ID: 2ab0fa3f-8ac6-4af2-8cd4-1dd490fb19c3
|
||||
:END:
|
||||
#+title: Emacs Magit
|
||||
#+filetags: :emacs:git:guide:
|
||||
|
||||
* Magit Key Guide (Quick Reference)
|
||||
|
||||
** Open Magit
|
||||
- C-x g :: Open Magit status buffer
|
||||
|
||||
** Staging & Unstaging
|
||||
- s :: Stage (file or hunk)
|
||||
- u :: Unstage
|
||||
- S :: Stage all
|
||||
- U :: Unstage all
|
||||
|
||||
** Committing
|
||||
- c c :: Commit
|
||||
- C-c C-c :: Confirm commit (in commit buffer)
|
||||
- c a :: Amend last commit
|
||||
|
||||
** Branching
|
||||
- b b :: Switch branch
|
||||
- b c :: Create new branch
|
||||
- b m :: Merge into current
|
||||
- b M :: Rebase onto another branch
|
||||
|
||||
** Push / Pull
|
||||
- P u :: Push to upstream
|
||||
- F u :: Pull from upstream
|
||||
- f u :: Fetch from upstream
|
||||
|
||||
** Logs & Diffs
|
||||
- l l :: Show log for current branch
|
||||
- d :: Show diff (between commits, etc.)
|
||||
- RET :: View diff at point
|
||||
|
||||
** Help & Dispatch
|
||||
- ? :: Show help for current buffer
|
||||
- x :: Open Magit dispatch menu (magit-dispatch)
|
||||
- ! :: Run Git command (rebase, cherry-pick, etc.)
|
||||
|
||||
** Other Essentials
|
||||
- k :: Discard changes (careful)
|
||||
- q :: Quit Magit buffer
|
||||
35
Emacs/20250420012258-emacs_stuff_evil.org
Normal file
35
Emacs/20250420012258-emacs_stuff_evil.org
Normal file
@@ -0,0 +1,35 @@
|
||||
:PROPERTIES:
|
||||
:ID: 45CC3AF5-5E20-4B03-A36C-8D4BDD5CBB13
|
||||
:END:
|
||||
#+title: Emacs Evil Mode
|
||||
#+filetags: :emacs:guide:
|
||||
|
||||
C-u Cc . - timestamp
|
||||
|
||||
* Keybindings for moving:
|
||||
** Search
|
||||
To search use
|
||||
Then if you want to get the hits, hit enter, then you can use 'n' for next and 'N' for previous hits.
|
||||
** moving
|
||||
- To move forward use 'e' and 'E'
|
||||
- To move forward use 'b' and 'B'
|
||||
(for beginning and end)
|
||||
you can also use '{' and '}' for paragraph movement
|
||||
|
||||
- To move to the next line use: 'j'
|
||||
- To move to the previous line use: 'k'
|
||||
|
||||
** replacement
|
||||
that is a sample text
|
||||
- Use 'r' To replace a single letter
|
||||
- Use 'R' To enter replace mode and use ESC to exit it
|
||||
|
||||
To do a replace all:
|
||||
- :%s//replacement/g
|
||||
thats if the '/' has stored the last search, the /g is for all. if you dont use it, itll just replace the first one in each line. you can also use /gc which will prompt for confirmation.
|
||||
|
||||
- :'<,'>s//bar/g
|
||||
thats if you are in visual mode
|
||||
|
||||
- :s/<search_string>/<replace_string>/g
|
||||
thats a more generic one
|
||||
168
Emacs/20250806155335-emacs_stuff_org_publish.org
Normal file
168
Emacs/20250806155335-emacs_stuff_org_publish.org
Normal file
@@ -0,0 +1,168 @@
|
||||
:PROPERTIES:
|
||||
:ID: 7d2e867e-f091-4362-a583-453f732207fe
|
||||
:END:
|
||||
#+title: Emacs ORG Publish
|
||||
#+filetags: :org:notes:
|
||||
|
||||
|
||||
* How to insert footnotes:
|
||||
|
||||
The Org website[fn:1] now looks a lot better than it used to.
|
||||
|
||||
[fn:1] The link is: https://orgmode.org
|
||||
|
||||
* Resources:
|
||||
https://ogbe.net/blog/blogging_with_org
|
||||
|
||||
https://systemcrafters.net/publishing-websites-with-org-mode/building-the-site/
|
||||
|
||||
https://orgmode.org/manual/Publishing-options.html
|
||||
|
||||
https://www.orgroam.com/manual.html#Configuration
|
||||
|
||||
https://www.reddit.com/r/emacs/comments/1j7febh/my_static_website_is_generated_from_org_mode_and/?chainedPosts=t3_116yit2
|
||||
|
||||
https://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html
|
||||
|
||||
https://taingram.org/blog/org-mode-blog.html
|
||||
|
||||
https://karthinks.com/software/emacs-window-management-almanac/
|
||||
|
||||
https://gongzhitaao.org/orgcss/
|
||||
|
||||
https://ogbe.net/blog/emacs_org_static_site
|
||||
|
||||
https://edwardtufte.github.io/tufte-css/
|
||||
|
||||
https://zilongli.org/code/org-tufte-example
|
||||
|
||||
|
||||
* Extra snippets of code:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; Commented out things:
|
||||
|
||||
;; (defvar z-head
|
||||
;; "<link rel=\"stylesheet\" type=\"text/css\" href=\"https://gongzhitaao.org/orgcss/org.css\" />
|
||||
;; <link rel=\"stylesheet\" href=\"/style.css\" />")
|
||||
|
||||
;; (setq org-html-validation-link nil
|
||||
;; org-html-head-include-scripts nil
|
||||
;; org-html-head-include-default-style nil
|
||||
;; org-html-head z-head)
|
||||
|
||||
;; (type-of (car '(rose violet daisy buttercup)))
|
||||
;; (cadr (assoc "FILETAGS" (org-collect-keywords '("FILETAGS"))))
|
||||
|
||||
;; (let ((list '(("post1.org") ("post2.org"))))
|
||||
;; (mapconcat (lambda (entry)
|
||||
;; (format "- [[file:%s]]" (car entry)))
|
||||
;; list
|
||||
;; "\n"))
|
||||
|
||||
|
||||
;; ("website"
|
||||
;; :components ("org-main" "org-categories-sitemap" "org-assets" "org-posts" "org-blogs" "org-static"))
|
||||
;; :html-head "
|
||||
;; <link rel=\"stylesheet\" type=\"text/css\" href=\"https://gongzhitaao.org/orgcss/org.css\" />
|
||||
;; <link rel=\"stylesheet\" href=\"../style.css\" />
|
||||
;; <script src=\"../script.js\" defer></script>
|
||||
;; "
|
||||
|
||||
|
||||
(defun z/write-tag-pages ()
|
||||
"Generate tags/*.org pages listing posts for each tag."
|
||||
(let* ((site-root (expand-file-name "~/master-folder/org_files/org_web/"))
|
||||
(tags-dir (expand-file-name "tags" site-root)))
|
||||
(unless (file-directory-p tags-dir)
|
||||
(make-directory tags-dir t))
|
||||
(let ((idx (z/gather-tag-index)))
|
||||
(maphash
|
||||
(lambda (tag items)
|
||||
(let* ((slug (z/tag-slug tag))
|
||||
(outfile (expand-file-name (format "%s.org" slug) tags-dir)))
|
||||
(with-temp-file outfile
|
||||
(insert (format "#+TITLE: Tag: %s\n#+OPTIONS: toc:nil num:nil title:nil \n\n* Posts tagged %s\n"
|
||||
tag tag))
|
||||
;; sort newest first if DATE present
|
||||
(setq items (sort items (lambda (a b) (string> (nth 2 a) (nth 2 b)))))
|
||||
(dolist (it items)
|
||||
(let* ((file (nth 0 it))
|
||||
(title (nth 1 it))
|
||||
(rel (file-relative-name file tags-dir)))
|
||||
;; link to the source .org; org-publish will rewrite to the .html
|
||||
(insert (format "- [[file:%s][%s]]\n" rel title)))))))
|
||||
idx)
|
||||
;; Also write an index page listing all tag pages
|
||||
;; (let* ((all ()))
|
||||
;; (maphash (lambda (tag _items) (push tag all)) (z/gather-tag-index))
|
||||
;; (with-temp-file (expand-file-name "index.org" (expand-file-name "tags" site-root))
|
||||
;; (insert "#+TITLE: All Tags\n#+OPTIONS: toc:nil num:nil\n\n* Tags\n")
|
||||
;; (dolist (tag (sort all #'string-lessp))
|
||||
;; (insert (format "- [[file:%s.org][%s]]\n" (z/tag-slug tag) tag)))))
|
||||
|
||||
)))
|
||||
|
||||
|
||||
#+end_src
|
||||
|
||||
* Options stuff:
|
||||
|
||||
In Org mode, you can control per-file publishing behavior using special keywords (known as **file-local metadata**) at the top of the file. These are written like:
|
||||
|
||||
```org
|
||||
#+KEYWORD: value
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Here are **useful options** you can set **per file**:
|
||||
|
||||
| Keyword | Purpose |
|
||||
| -------------------- | ----------------------------------------------------- |
|
||||
| `#+TITLE:` | Title of the document |
|
||||
| `#+AUTHOR:` | Author name |
|
||||
| `#+EMAIL:` | Email address |
|
||||
| `#+DATE:` | Date |
|
||||
| `#+OPTIONS:` | Control export behavior (e.g. toc, num, author, etc.) |
|
||||
| `#+HTML_HEAD:` | Custom HTML for `<head>` (like styles or scripts) |
|
||||
| `#+HTML_HEAD_EXTRA:` | Extra HTML inserted in `<head>` |
|
||||
| `#+HTML_PREAMBLE:` | Whether to include the preamble (`t`, `nil`, or HTML) |
|
||||
| `#+HTML_POSTAMBLE:` | Same but for postamble |
|
||||
| `#+LANGUAGE:` | Language used for export |
|
||||
| `#+DESCRIPTION:` | Adds a `<meta name="description">` tag |
|
||||
| `#+KEYWORDS:` | Adds a `<meta name="keywords">` tag |
|
||||
|
||||
---
|
||||
|
||||
### ✅ Example: Disable TOC and Section Numbers *for one file*
|
||||
|
||||
You can use the `#+OPTIONS:` line like so:
|
||||
|
||||
```org
|
||||
#+OPTIONS: toc:nil num:nil
|
||||
```
|
||||
|
||||
This disables the Table of Contents and section numbers **just for that file**.
|
||||
|
||||
Your updated file might look like this:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
#+TITLE: Welcome to My Org Website
|
||||
#+OPTIONS: toc:nil num:nil
|
||||
#+HTML_HEAD: <link rel="stylesheet" href="style.css">
|
||||
#+HTML_HEAD: <script src="theme-toggle.js" defer></script>
|
||||
#+END_SRC
|
||||
|
||||
Here's a reference for some values you can tweak via `#+OPTIONS:`:
|
||||
|
||||
| Option | Meaning | Example |
|
||||
| ------------- | -------------------------------- | ---------------- |
|
||||
| `toc:` | Table of contents (`t` or `nil`) | `toc:nil` |
|
||||
| `num:` | Section numbering | `num:nil` |
|
||||
| `author:` | Show author name | `author:nil` |
|
||||
| `creator:` | Show Emacs/Org creator info | `creator:nil` |
|
||||
| `date:` | Show date | `date:nil` |
|
||||
| `html-style:` | Disable default style | `html-style:nil` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user