[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tip for EXWM users] An alternative method for isolate trees
From: |
Julian M. Burgos |
Subject: |
Re: [tip for EXWM users] An alternative method for isolate trees |
Date: |
Mon, 01 Mar 2021 13:37:37 +0000 |
User-agent: |
mu4e 1.4.6; emacs 27.1 |
Hi Juan Manuel,
Thank you, although I tested your functions and compared with the original
org-tree-to-indirect-buffer, the only difference I see is that your function
creates a new exwm workspace. The original function already creates indirect
buffers with their own names (using a slash instead of the double colons). Or
I am missing something?
My best,
Julian
Juan Manuel Macías writes:
> Hi,
>
> Since EXWM uses Emacs frames as virtual desktops, I have written this
> alternative method of `org-tree-to-indirect-buffer', which I share here.
> With this method I can have several isolated trees, with their own name,
> and access them quickly (with helm-buffer-list, for example):
>
> #+begin_src emacs-lisp
> (defun my-goto-buffer-regexp (regexp)
> (dolist (buffer (buffer-list))
> (let ((name (buffer-name buffer)))
> (when (and name (not (string-equal name ""))
> (string-match regexp name))
> (switch-to-buffer buffer)))))
>
> (defun my-org-tree-to-indirect-buffer ()
> (interactive)
> (let ((buf (buffer-name))
> (ind-buf (replace-regexp-in-string "\\[.+\\]" "" (nth 4
> (org-heading-components))))
> (org-indirect-buffer-display 'new-frame))
> (org-tree-to-indirect-buffer)
> (my-goto-buffer-regexp ind-buf)
> (rename-buffer (concat buf "::" ind-buf))))
> #+end_src
>
> Best regards,
>
> Juan Manuel
--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Botnsjávarsviðs / Demersal Division
Fornubúðir 5, IS-220 Hafnarfjörður, Iceland
www.hafogvatn.is
Sími/Telephone : +354-5752037
Netfang/Email: julian.burgos@hafogvatn.is