-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback #13
Comments
Hi Karl, Thanks very much. My email address is in the
I understand, thanks. Maybe someday it will be useful for you, but not everyone needs to manage buffers this way.
To be clear, (defun ap/org-tree-to-indirect-buffer (&optional arg)
"Create indirect buffer and narrow it to current subtree.
The buffer is named after the subtree heading, with the filename
appended. If a buffer by that name already exists, it is
selected instead of creating a new buffer."
(interactive "P")
(let* ((new-buffer-p)
(pos (point))
(buffer-name (let* ((heading (org-get-heading t t))
(level (org-outline-level))
(face (intern (concat "outline-" (number-to-string level))))
(heading-string (propertize (org-link-display-format heading)
'face face)))
(concat heading-string "::" (buffer-name))))
(new-buffer (or (get-buffer buffer-name)
(prog1 (condition-case nil
(make-indirect-buffer (current-buffer) buffer-name 'clone)
(error (make-indirect-buffer (current-buffer) buffer-name)))
(setq new-buffer-p t)))))
(switch-to-buffer new-buffer)
(when new-buffer-p
;; I don't understand why setting the point again is necessary, but it is.
(goto-char pos)
(rename-buffer buffer-name)
(org-narrow-to-subtree))))
(advice-add 'org-tree-to-indirect-buffer :override 'ap/org-tree-to-indirect-buffer)
I seem to recall noticing the same problem, but I tested it now and it seems to work. Maybe I fixed it in the past and forgot, and maybe you're using the version without the fix? :) Anyway, the version posted above is what I'm using in my config now. Please let me know if that problem persists for you and I'll try to fix it. In case you prefer email, I'll send this to you by email as well. BTW, It was a pleasure to "meet" you in John's meetup today! Maybe next time I'll be able to get my microphone working and chat that way as well. Thanks, |
Oh yes. This was a wrong phrasing. Thanks for correction. Of course, I'm using your customized version.
You're right again: I copied your code and never updated. However, your version above reflects my version. So I might have found a bug which is depending on the Org mode data. Today's test worked fine. When I find myself in a situation where this fails (I noticed it only once and refrained from trying it again), I make sure to submit a decent bug report where you can see the issue yourself.
The pleasure was all mine. Can not wait for the next meeting with your working microphone ;-) |
Hi,
I just spend 15min trying to find out the email address of @alphapapa and failed. ;-)
Here are my thoughts. Feel free to close this and drop me an email. My email address should be quite easy to find.
bufler.el
is an interesting solution to provide task-based structure to buffers. I do thing that I get that.However, my personal tasks seldom consists more of two buffers. I handle this via
eyebrowse
and at the moment, I think that this is handled OKish for my situation. If a task has two Org buffers, a dired buffer and a source code buffer, I tend to have two buffers side by side and useC-x b RET
on both. This way, I handle up to four buffers for a task.One of the most precious tools for me is your
org-tree-to-indirect-buffer
. (btw, I found a small drawback: it's not possible toorg-tree-to-indirect-buffer
within an indirect buffer.)The lack of necessity to organize task-based buffers is also expressed by the fact that I do not even use
projectile
or a similar package.The text was updated successfully, but these errors were encountered: