brain initiation

This commit is contained in:
2025-11-05 09:18:11 +01:00
commit 933aa8a985
191 changed files with 6203 additions and 0 deletions

84
20230522113406-emacs.org Normal file
View File

@@ -0,0 +1,84 @@
:PROPERTIES:
:ID: 5f1df0e1-384f-4685-ae1e-fec2431b04e5
:END:
#+title: emacs
#+filetags: :INDEX:EMACS::
One of the most important tools of every [[id:5fada795-19a3-4ba6-97c0-0b70bd728a2f][Arco-Linux]] distribution. Emacs is a plain text editor, that can be expanded with various packages. Some Packages and their usage is listed here. In most cases not the sole emacs is used, but the [[id:f2b1d5af-1a7d-47a5-95c8-4a85d558419e][server]] version (local server) of emacs. The server runs at boot but can be evoked by running:
#+begin_src bash
emacs --daemon
#+end_src
To start a second [[id:e108b31b-23c1-47fe-a794-84e41bc45044][daemon]] you have to give a specific name to the second instance so emacs knows which server to address. This is done via the command:
#+begin_src bash
emacs --daemon=<name of server>
#+end_src
To use the text editor (emacs) use the command to start a [[id:70899526-8b7d-4976-94fc-cc07c41e550a][client]]:
#+begin_src bash
emacsclient -cn <name of document>
#+end_src
The ~-c~ flag suggests emacs to open a new frame (so the use of emacs and the document is not blocked for other members (e.g. in ssh). The -~n~ Flag suggest not to wait for emacs to close, so the prompt is given back to the shell. For emacs in Terminal mode (for ssh purposes) use the ~-t~ flag instead of the ~-n~ flag. To use emacsclient as command interpreter, use the ~-e~ flag:
#+begin_src bash
emacsclient -e ('kill-emacs') #kills the emacs process
#+end_src
To use a different emacs server (has to be running) use the ~-s~ [[id:6d29efeb-1f03-401b-bbed-e19fc94dbbbc][flag]] and give the name of the daemon
#+begin_src bash
emacsclient -ct -s <name of daemon>
#+end_src
Emacs uses commands to change its behavior or simply do things. Those commands use command keys like control (~c-~ ), alt (~m-~ ) or space (~s-~ ) . To use a command press the command. If pressed a minibuffer opens, there all possible commands are listed. For Example, to save your work use the command chain control x control s (~c-x c-s~). You can keep the control key pressed and simply press the next chain key.
* [[Id:c7747161-284c-4882-bd11-80bc2a990814][Buffer]]
Emacs works with so called buffers. A buffer is an instance that can hold text (e.g. a text document or a menu. to switch between opened buffers that are running in the server instance use ~c-m-j~. If you close amecsclient while the server is running, the buffer is not closed but still exist in the buffer list. you can close a buffer (switch focus, unsaved changtes are still there) by pressing ~c-0~ or kill a buffer (like closing for real, unsaved changes are gone) by pressing ~c-k~. you can have more than one buffer in view at the same time. To view a second buffer side by side press ~c-x c-3~. To view them top-down press ~c-x c-2~. To close a buffer that is not in focus press ~c-x c-1~ (instead of closing the one in focus with ~c-x c-0~.
A sub category are minibuffers. Those can pop up for notifications, menus or other things. They do not take the whole screen.
* M-X
There are things that do not have a keychain attached to them. To acitvate those (or all) commands you have to use the ~M-x~ command prompt. Press ~m-x~ and type the name of the command you want to use. For example:
#+begin_src lisp
M-x package-install <name of package> ;;installs a package in emacs
#+end_src
* Index (Packages)
** [[id:dc54334e-afa9-4a53-be91-1e90bc6bf8d0][sudo]] auf files zugreifen
*** [[id:6bd68975-f5d3-4c8c-bba7-34788c3edf3e][tramp]]
sudo access for files in a dired buffer.
** key menu (invoked by colon or space)
*** [[id:82fd5a02-36c6-4ac5-a3f3-9b47dc1a4700][hydra]]
additional menues for emacs buffers.
** Gcal Calendar
*** [[id:7bd1f7dd-fcb2-4efc-a4df-f233a4bf3fcd][org-gcal]]
Google calendar intergration for org buffers.
** Tex
*** [[id:f52339f6-db99-4b43-91fd-48e7a1957ab2][synctex]]
syncs the pdf to the [[id:345d5300-432c-4f6f-98a4-4527e955927f][latex]] buffer in emacs.
*** [[id:3dfde3f4-2cc0-4356-a147-d4afd599e731][auctex]]
latex support ([[id:d3e11792-af05-4213-9ef8-b680c12ce81c][IDE]]) for emacs buffers.
** PDF-View
*** [[id:ae476916-f23f-4004-8b8a-bebc690e65f3][pdf-tools]]
View PDF files in an emacs buffer. Does not work in a [[id:4c3c3777-af52-4cde-8d9b-f356701b94c9][terminal]] or [[id:b6d24dd6-285f-4c03-883c-dc77b78c652a][shell]] (via [[id:422e07f8-c888-460f-849e-76d451946045][ssh]]).
** Navigation
*** [[id:f3aaa9f1-525b-4ae6-9dce-efe22c8b2107][neotree]]
Visualizes the File tree in a buffer (interactive).
*** [[id:50326e0d-4ae7-46b3-bcda-27c47f0fe569][dired]]
Simple File Browser in a minibuffer.
*** [[id:3d22fdb5-a322-44d2-a447-83a8708d0637][deft]]
Strong File Searcher for defined folders. Especialy good with roam home folder.
*** [[id:9aa361f6-b829-49ad-a523-6498dbfb0213][projectile]]
File managemant for project folders and files of same type.
** Programme launcher
*** [[id:7e6f7176-9223-4dcc-ad4d-1ccf8c38116a][counsel-linux-app]]
Change the behaviour of M-x minibuffer.
** File System
*** [[id:b02ca084-7831-4013-8389-45f4cd969e25][org-attach]]
Attach files to a org heading and categorize the entry.
** Website Scraper
*** [[id:f68dfc34-5349-42d1-8074-6c4be231a69b][org-web-tools]]
Extract files and text from websites.
** Helm
*** [[id:9ce51551-fcb1-446a-9924-9dd26f5d56aa][helm-org-rifle]]
Strong file and text search engine for org files.
*** [[id:b3503901-bb4f-4fda-b85f-5e738df311fb][helm-bibtex]]
helm search engine integration for literature and bibtex entries.
** second brain
*** [[id:9d782b7c-5d45-4963-96f4-ee01a00ba280][org-roam]]
Data assemble and structorization engine with database.
Note: Emacs mode can also be used for [[id:f2d9ff98-f926-442e-ae9b-fc1023e15b07][GMSH]], [[id:34c4e594-2aee-42d6-803a-6f843176d3b9][openFoam]] and [[id:e336814a-3a58-4b25-8d02-0af07623ce45][matlab]].