Closed randomwangran closed 3 years ago
I don't use org-roam, so I don't know what you mean. Anyway, you can customize the code as you seem to have done. You may also find burly
useful for restoring buffers and window layouts.
No problem at all. I will try to make it clear.
Assuming the user Emacs interface is like this: Windows-A
, which is
just a usual frame layout.
+---------------------------+
| |
| |
| |
| Windows-A |
| |
| |
| |
| |
+---------------------------+
When users issue interactive commands (org-sidebar-toggle), the frame layout will be changed in between the following states.
+---------------------------+-----+
| | |
| | |
| | |
| | |
| Windows-B | S |
| | |
| | |
| | |
+---------------------------+-----+
+---------------------------+
| |
| |
| |
| |
| Windows-C |
| |
| |
| |
+---------------------------+
The content of this buffer (S) is dynamically related to the
condition how the Org-sidebar
is triggered. If the user is in
Buffer-1
that is in Org-mode
, then Org-sidebar
shows the content
of Buffer-1
. If the user switches to Buffer-2
that is in
Org-mode
, then sidebar shows the conent of Buffer-2
. I think this
is the design of Org-sidebar
.
Org-roam-daily
is about how users organize his/her file system. The
content of Org-roam-daily
is a lots of files whose name follow this
convention: (concat (format-time-string "%Y-%m-%d") ".org")
.
This is what it looks like in from the Dired
:
$ ls directory-of-org-roam-daily
2020-11-27.org
2020-11-26.org
2020-11-25.org
2020-11-23.org
2020-11-24.org
…
The thing that I think will be benefited to Org-roam
users is to fix
the content of sidebar to today's content. For example, today is
2020-11-27, so no matter what buffer the user is visiting, the user
always see the same content in the 2020-11-27.org
file when the
Org-sidebar
is toggled on.
When I am drafting this issue, I find a better way than my first attempt. I believe the following code says much more than what I have written.
(defun org-sidebar-toggle ()
(interactive)
- (let* ((source-buffer (current-buffer)) ...)))
+ (let* ((source-buffer (switch-to-buffer (concat (format-time-string "%Y-%m-%d") ".org")))) ...)
I think this can possibly be achieved by adding an optional argument
to the interactive function org-sidebar-toggle
, such that the
content being shown on the sidebar will be one of the following
options:
If there is anything that I am not making clear, please let me know.
Thank you,
Ran
Hi, alphapapa:
I think this feature is a very personal choice. It is not worthy to be pursing as a team work while adding unnecessary complexity to the this project, so I closed this issue.
Maybe what you're wanting is for the sidebar to automatically update when the other window displays a new Org buffer. That could be a useful feature.
Thanks for writing this package. It provides a very good dash screen for my projects.
I am posting this issue to ask if it is possible to add a toggle to just show the content of the daily? The daily is provided by
org-roam
. The file system is below:I have achieved this by tweaking your elisp code in this project. It just checks the name of visable buffers in a frame and toggles accordingly.
I am afraid that this tweak is not stable, so it would be good for consulting the author to confirm its durability.
Followings are the code snippet that executing my request.