mirror of
https://github.com/org-roam/org-roam
synced 2025-09-14 15:46:48 -05:00
(docs): add docs for using winner-mode as history (#890)
This commit is contained in:
@@ -775,7 +775,7 @@ Then restart your computer.
|
|||||||
|
|
||||||
For Windows, create a temporary =org-protocol.reg= file:
|
For Windows, create a temporary =org-protocol.reg= file:
|
||||||
|
|
||||||
#+BEGIN_SRC
|
#+BEGIN_SRC text
|
||||||
REGEDIT4
|
REGEDIT4
|
||||||
|
|
||||||
[HKEY_CLASSES_ROOT\org-protocol]
|
[HKEY_CLASSES_ROOT\org-protocol]
|
||||||
@@ -789,7 +789,7 @@ REGEDIT4
|
|||||||
|
|
||||||
The above will forward the protocol to WSL. If you run Emacs natively on Windows, replace the last line with:
|
The above will forward the protocol to WSL. If you run Emacs natively on Windows, replace the last line with:
|
||||||
|
|
||||||
#+BEGIN_SRC
|
#+BEGIN_SRC text
|
||||||
@="\"c:\\path\\to\\emacs\\bin\\emacsclientw.exe\" \"%1\""
|
@="\"c:\\path\\to\\emacs\\bin\\emacsclientw.exe\" \"%1\""
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@@ -913,6 +913,18 @@ General Public License for more details.
|
|||||||
** Ecosystem
|
** Ecosystem
|
||||||
A number of packages work well combined with Org-Roam:
|
A number of packages work well combined with Org-Roam:
|
||||||
|
|
||||||
|
*** Browsing History with winner-mode
|
||||||
|
|
||||||
|
~winner-mode~ is a global minor mode that allows one to undo and redo changes in the window configuration. It is included with GNU Emacs since version 20.
|
||||||
|
|
||||||
|
~winner-mode~ can be used as a simple version of browser history for Org-roam. Each click through org-roam links (from both Org files and the backlinks buffer) causes changes in window configuration, which can be undone and redone using ~winner-mode~. To use ~winner-mode~, simply enable it, and bind the appropriate interactive functions:
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(winner-mode +1)
|
||||||
|
(define-key winner-mode-map (kbd "<M-left>") #'winner-undo)
|
||||||
|
(define-key winner-mode-map (kbd "<M-right>") #'winner-redo)
|
||||||
|
|
||||||
|
#+END_SRC
|
||||||
*** Deft
|
*** Deft
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: deft
|
:CUSTOM_ID: deft
|
||||||
|
@@ -137,6 +137,7 @@ Appendix
|
|||||||
|
|
||||||
Ecosystem
|
Ecosystem
|
||||||
|
|
||||||
|
* Browsing History with winner-mode::
|
||||||
* Deft::
|
* Deft::
|
||||||
* Org-journal::
|
* Org-journal::
|
||||||
* Note-taking Add-ons::
|
* Note-taking Add-ons::
|
||||||
@@ -841,6 +842,15 @@ a function accepting a single argument: the graph file path.
|
|||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@samp{nil} uses @samp{view-file} to view the graph.
|
@samp{nil} uses @samp{view-file} to view the graph.
|
||||||
|
|
||||||
|
If you are using WSL2 and would like to open the graph in Windows, you can use the second option to set the browser and network file path:
|
||||||
|
|
||||||
|
@lisp
|
||||||
|
(setq org-roam-graph-viewer
|
||||||
|
(lambda (file)
|
||||||
|
(let ((org-roam-graph-viewer "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"))
|
||||||
|
(org-roam-graph--open (concat "file://///wsl$/Ubuntu" file)))))
|
||||||
|
@end lisp
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
@@ -1060,6 +1070,28 @@ defaults write com.apple.LaunchServices/com.apple.launchservices.secure LSHandle
|
|||||||
|
|
||||||
Then restart your computer.
|
Then restart your computer.
|
||||||
|
|
||||||
|
For Windows, create a temporary @samp{org-protocol.reg} file:
|
||||||
|
|
||||||
|
@example
|
||||||
|
REGEDIT4
|
||||||
|
|
||||||
|
[HKEY_CLASSES_ROOT\org-protocol]
|
||||||
|
@@="URL:Org Protocol"
|
||||||
|
"URL Protocol"=""
|
||||||
|
[HKEY_CLASSES_ROOT\org-protocol\shell]
|
||||||
|
[HKEY_CLASSES_ROOT\org-protocol\shell\open]
|
||||||
|
[HKEY_CLASSES_ROOT\org-protocol\shell\open\command]
|
||||||
|
@@="\"C:\\Windows\\System32\\wsl.exe\" emacsclient \"%1\""
|
||||||
|
@end example
|
||||||
|
|
||||||
|
The above will forward the protocol to WSL@. If you run Emacs natively on Windows, replace the last line with:
|
||||||
|
|
||||||
|
@example
|
||||||
|
@@="\"c:\\path\\to\\emacs\\bin\\emacsclientw.exe\" \"%1\""
|
||||||
|
@end example
|
||||||
|
|
||||||
|
After executing the .reg file, the protocol is registered and you can delete the file.
|
||||||
|
|
||||||
@node The @samp{roam-file} protocol
|
@node The @samp{roam-file} protocol
|
||||||
@section The @samp{roam-file} protocol
|
@section The @samp{roam-file} protocol
|
||||||
|
|
||||||
@@ -1208,11 +1240,26 @@ operations. To reduce the number of garbage collection processes, one may set
|
|||||||
A number of packages work well combined with Org-Roam:
|
A number of packages work well combined with Org-Roam:
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
|
* Browsing History with winner-mode::
|
||||||
* Deft::
|
* Deft::
|
||||||
* Org-journal::
|
* Org-journal::
|
||||||
* Note-taking Add-ons::
|
* Note-taking Add-ons::
|
||||||
@end menu
|
@end menu
|
||||||
|
|
||||||
|
@node Browsing History with winner-mode
|
||||||
|
@subsection Browsing History with winner-mode
|
||||||
|
|
||||||
|
@code{winner-mode} is a global minor mode that allows one to undo and redo changes in the window configuration. It is included with GNU Emacs since version 20.
|
||||||
|
|
||||||
|
@code{winner-mode} can be used as a simple version of browser history for Org-roam. Each click through org-roam links (from both Org files and the backlinks buffer) causes changes in window configuration, which can be undone and redone using @code{winner-mode}. To use @code{winner-mode}, simply enable it, and bind the appropriate interactive functions:
|
||||||
|
|
||||||
|
@lisp
|
||||||
|
(winner-mode +1)
|
||||||
|
(define-key winner-mode-map (kbd "<M-left>") #'winner-undo)
|
||||||
|
(define-key winner-mode-map (kbd "<M-right>") #'winner-redo)
|
||||||
|
|
||||||
|
@end lisp
|
||||||
|
|
||||||
@node Deft
|
@node Deft
|
||||||
@subsection Deft
|
@subsection Deft
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user