Skip to content
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

Closed
novoid opened this issue Mar 15, 2020 · 2 comments
Closed

Feedback #13

novoid opened this issue Mar 15, 2020 · 2 comments

Comments

@novoid
Copy link

novoid commented Mar 15, 2020

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 use C-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 to org-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.

@alphapapa
Copy link
Owner

Hi Karl,

Thanks very much. My email address is in the Author: header of all my Emacs packages, but I'm not great at keeping up with email, so GitHub issues are usually easier for me to keep track of anyway.

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.

I understand, thanks. Maybe someday it will be useful for you, but not everyone needs to manage buffers this way.

One of the most precious tools for me is your org-tree-to-indirect-buffer.

To be clear, org-tree-to-indirect-buffer is built-in to Org. Maybe you mean this customized version I have shared somewhere before:

(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)

(btw, I found a small drawback: it's not possible to org-tree-to-indirect-buffer within an 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,
Adam

@novoid
Copy link
Author

novoid commented Mar 16, 2020

To be clear, org-tree-to-indirect-buffer is built-in to Org. Maybe you mean this customized version I have shared somewhere before.

Oh yes. This was a wrong phrasing. Thanks for correction.

Of course, I'm using your customized version.

(btw, I found a small drawback: it's not possible to org-tree-to-indirect-buffer within an 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? :)

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.

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.

The pleasure was all mine. Can not wait for the next meeting with your working microphone ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants