Skip to content

Commit ae2744d

Browse files
committed
change: buffer placement + fullscreen magit
1 parent eee7744 commit ae2744d

File tree

2 files changed

+57
-1551
lines changed

2 files changed

+57
-1551
lines changed

configuration.org

Lines changed: 57 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,20 @@ Hardcode some settings that I wish to never change in any Emacs setup.
109109
(setq-default line-spacing .15)
110110
#+end_src
111111

112+
** display-buffer-alist
113+
See [[https://old.reddit.com/r/emacs/comments/179t67l/window_management_share_your_displaybufferalist/][Window Management - share your display-buffer-alist : emacs]]
114+
#+begin_src emacs-lisp
115+
(add-to-list 'display-buffer-alist
116+
'("\\*Man"
117+
(display-buffer-same-window)))
118+
(add-to-list 'display-buffer-alist
119+
'("\\*Calendar*"
120+
(display-buffer-at-bottom)))
121+
(add-to-list 'display-buffer-alist
122+
'("\\CAPTURE-.*\.org"
123+
(display-buffer-same-window)))
124+
#+end_src
125+
112126
* Set up load path
113127
This way packages can be installed from submodules or tracked directly in my
114128
git repository.
@@ -1511,7 +1525,9 @@ you are good to go.
15111525
("C-c u" . magit-rev-parent))
15121526
:init
15131527
(fset 'magit-rev-parent
1514-
(kmacro-lambda-form [?\M-< ?\C-s ?p ?a ?r ?e ?n ?t ?: return return] 0 "%d")))
1528+
(kmacro-lambda-form [?\M-< ?\C-s ?p ?a ?r ?e ?n ?t ?: return return] 0 "%d"))
1529+
(setq magit-display-buffer-function 'magit-display-buffer-fullframe-status-topleft-v1
1530+
magit-bury-buffer-function 'magit-restore-window-configuration))
15151531
#+END_SRC
15161532

15171533
** Git LFS
@@ -1559,16 +1575,14 @@ with others how to find docuemantion.
15591575
(add-hook 'Info-selection-hook 'info-colors-fontify-node))
15601576
#+end_src
15611577

1562-
** RFC reader (irfc)
1563-
In this repository.
1578+
** RFC reader (rfc)
15641579

15651580
#+BEGIN_SRC emacs-lisp
1566-
(use-package irfc
1567-
:demand t
1568-
:hook (irfc-mode
1569-
. (lambda ()
1570-
(read-only-mode) ; Make read only.
1571-
(show-paren-local-mode -1))))
1581+
(use-package rfc-mode
1582+
:ensure t
1583+
:init
1584+
(add-to-list 'display-buffer-alist '(("\\\*rfc.*")
1585+
(display-buffer-reuse-window))))
15721586
#+END_SRC
15731587

15741588
** Better =describe-*=
@@ -2642,6 +2656,40 @@ Great for experimenting with keyboard shortcuts.
26422656
(setq default-directory target))
26432657
#+end_src
26442658

2659+
* LLM / GPT
2660+
2661+
** gptel
2662+
2663+
Check out this introduction --- [[https://www.youtube.com/watch?v=bsRnh_brggM&t=789s][Every LLM in Emacs, with gptel - YouTube]].
2664+
2665+
Purportedly *not* a free thing. Purportedly you need to pay separately from
2666+
ChatGPT Plus/Pro. See [[https://openai.com/api/pricing/][Pricing | OpenAI]]. Probably consider a local model
2667+
before putting any money into this.
2668+
2669+
#+begin_src emacs-lisp
2670+
(use-package gptel
2671+
:ensure t)
2672+
#+end_src
2673+
2674+
*** ⚠ Not quite finished yet ⚠
2675+
2676+
Next, you'll want to set up [[info:auth#Help for users][auth sources]] (or directly set variable =gptel-api-key=).
2677+
2678+
Create [[file:~/.netrc][=~/.netrc=]] with permissions so only your current user may read the file.
2679+
(Fix permissions: =(chmod "~/.netrc" #o600)=.) Next create a =machine= entry
2680+
for your LLM API hostname. Generate an API Key for ChatGPT [[https://platform.openai.com/settings/organization/api-keys][here]].
2681+
2682+
#+begin_src authinfo :tangle no
2683+
# This file contains secrets! Beware!
2684+
2685+
# Example for ChatGPT.
2686+
machine api.openai.com
2687+
user apikey
2688+
secret YOUR-API-KEY-HERE
2689+
#+end_src
2690+
2691+
Not working? Eval =(auth-source-forget-all-cached)= and try again.
2692+
26452693
* Narrow
26462694
Enable =narrow-to-region=
26472695
#+BEGIN_SRC emacs-lisp

0 commit comments

Comments
 (0)