From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WL0AMGruPGB1FAAA0tVLHw (envelope-from ) for ; Mon, 01 Mar 2021 13:38:50 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kIGaK2ruPGA/TAAAB5/wlQ (envelope-from ) for ; Mon, 01 Mar 2021 13:38:50 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 12A66A49E for ; Mon, 1 Mar 2021 14:38:50 +0100 (CET) Received: from localhost ([::1]:53160 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lGil7-000105-8E for larch@yhetil.org; Mon, 01 Mar 2021 08:38:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGikK-0000x6-7E for emacs-orgmode@gnu.org; Mon, 01 Mar 2021 08:38:03 -0500 Received: from hafgarpur.hafro.is ([130.208.64.48]:41088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lGik7-0002CK-53 for emacs-orgmode@gnu.org; Mon, 01 Mar 2021 08:37:58 -0500 X-Virus-Scanned: amavisd-new at hafro.is Received: from hafgangur (hafgangur.hafro.is [130.208.64.162]) by hafgarpur.hafro.is (8.14.4/8.14.4/hafro-2.57) with ESMTP id 121Dbbme023654; Mon, 1 Mar 2021 13:37:37 GMT References: <877dmr119y.fsf@posteo.net> User-agent: mu4e 1.4.6; emacs 27.1 From: "Julian M. Burgos" To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Subject: Re: [tip for EXWM users] An alternative method for isolate trees In-reply-to: <877dmr119y.fsf@posteo.net> Date: Mon, 01 Mar 2021 13:37:37 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=130.208.64.48; envelope-from=julian.burgos@hafogvatn.is; helo=hafgarpur.hafro.is X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614605930; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=EbioeCKYCRqMjHox2qIPY6xJ5TWHZoKFDEdyFWTsRYs=; b=P3TiP7zp4HcdWucoDeafd19fS36IzctzJVLsm8kjH9kRjAXNm6j3Np2Un92/jwvRoIpIya /2TOwTqJtLIPWpCOQ/ESmITGR8kJ5PkJZ6Ou3oVLNwFxhKvEAr9Z4SJtuBg36+CgdKvl2h TEwKZpsvRp2i7Rr+2IlWFnsrCTBUD4BiLIK0Ut9DrytsNR56WKGvWa6Ch1NNu6DEC9ldVn 3JVUNmRkB4mGDGGSZAWK2wQFSaG+DvzmP98+eenxrLtQtrVyd9D4k5WOshvSVjNewxGb8h WcEo70HhUj01+vk5kk0j9RLmhKYtk5YzSpUtUlplV6MGUFSeUOfXBENb8YUblA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614605930; a=rsa-sha256; cv=none; b=mlcArdLAJTZraFg5C7kgdw0GY2kpPthuJnLWMoZ/maXNgJF7rRsSCfNQOto1vGV1EsF3Yr 3voMZt/TDJWK38SdBxRnziWHiPobdoYsbcgNjIVysAloC1WFtYNba69iAiMlUcEU6JHYIa oZftip3jDYAIpKX+inVVaM2xIA3RrIQz66p6LOGwhHQj4ldHKHfyb2cWdFKDiDIzGarvk4 k/hfOjmEacS3Pyxcs9VGexnkZS008ggHZ21ADisOXAfS3+oszJqNNi99OmABLY+8N8h5sI GuLJBL5ZmsIrxYETp2GEwKY10Siocf94qPsAmUwS6I4xTWda0jXdRRDcU8ia0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -2.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 12A66A49E X-Spam-Score: -2.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: kXWbkgL3OZU4 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 functio= n creates a new exwm workspace. The original function already creates indi= rect buffers with their own names (using a slash instead of the double colo= ns). Or I am missing something? My best, Julian Juan Manuel Mac=C3=ADas 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-c= omponents)))) > (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=C3=B3knastofnun, ranns=C3=B3kna- og r=C3=A1=C3=B0gjafarstofnun haf= s og vatna/ Marine and Freshwater Research Institute Botnsj=C3=A1varsvi=C3=B0s / Demersal Division Fornub=C3=BA=C3=B0ir 5, IS-220 Hafnarfj=C3=B6r=C3=B0ur, Iceland www.hafogvatn.is S=C3=ADmi/Telephone : +354-5752037 Netfang/Email: julian.burgos@hafogvatn.is