From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Re: Open buffers, etc in other window Date: Wed, 14 Aug 2019 15:57:33 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000037d2a305901a02a7" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:38976) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hy0L7-0005iO-9K for emacs-orgmode@gnu.org; Wed, 14 Aug 2019 16:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hy0L5-0001Lf-7y for emacs-orgmode@gnu.org; Wed, 14 Aug 2019 16:57:49 -0400 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:36051) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hy0L5-0001Jx-0G for emacs-orgmode@gnu.org; Wed, 14 Aug 2019 16:57:47 -0400 Received: by mail-ot1-x330.google.com with SMTP id k18so1311972otr.3 for ; Wed, 14 Aug 2019 13:57:45 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode --00000000000037d2a305901a02a7 Content-Type: text/plain; charset="UTF-8" I just found the term I'm looking for: "advice" -- here's an unrelated example: https://emacs.stackexchange.com/questions/17169/change-order-of-buffers-in-helm-buffers-list On Wed, Aug 14, 2019 at 3:36 PM Nathan Neff wrote: > Hello all, > > There are quite a few commands I run in org-mode to jump to > headlines: org-clock-goto org-capture-goto-last-stored, etc. > > Sometimes, I would prefer that those "jump" commands would use > a new window to perform the jump. > > In my quest to learn Lisp a bit better, I'd like to ask for recommended > way(s) to set some kind of flag "e.g. use-other-window", and "wrap" > the various jump commands with code to switch to the other window (or > create one) > and then call the function. > > For example, something like: > > (def decorator njn-switch-or-create-window() ) > (if use-other-window ( switch or create window)) > (call original function) > ) > > (decorate (org-tags-view, org-clock-goto, org-capture-goto-last-stored > njn-switch-or-create-window > > I *know* Lisp has a bunch of ways of doing this, but I would > like to hear the "best" way to attempt something like this :) > > Thanks, > --Nate > > > --00000000000037d2a305901a02a7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I just found the term I'm looking for= : =C2=A0"advice" -- here's an unrelated

On= Wed, Aug 14, 2019 at 3:36 PM Nathan Neff <nathan.neff@gmail.com> wrote:
=
Hello all,

There are quite a few co= mmands I run in org-mode to jump to
headlines: =C2=A0org-clock-go= to org-capture-goto-last-stored, etc.

Sometimes, I= would prefer that those "jump" commands would use
a ne= w window to perform the jump.

In my quest to learn= Lisp a bit better, I'd like to ask for recommended
way(s= ) to set some kind of flag "e.g. use-other-window", and "wra= p"
the various jump commands with code to switch to the othe= r window (or create one)
and then call the function.
For example, something like:

(def dec= orator njn-switch-or-create-window() )
(if use-other-window ( swi= tch or create window))
(call original function)
)
=

(decorate (org-tags-view, org-clock-goto, org-capture-g= oto-last-stored
njn-switch-or-create-window

<= div>I *know* Lisp has a bunch of ways of doing this, but I would
= like to hear the "best" way to attempt something like this :)

Thanks,
--Nate

--00000000000037d2a305901a02a7--