From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Open buffers, etc in other window Date: Wed, 14 Aug 2019 15:36:05 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000738b54059019b58d" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35667) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1hy00J-0001iD-ON for emacs-orgmode@gnu.org; Wed, 14 Aug 2019 16:36:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hy00I-00026u-IE for emacs-orgmode@gnu.org; Wed, 14 Aug 2019 16:36:19 -0400 Received: from mail-oi1-x22a.google.com ([2607:f8b0:4864:20::22a]:39040) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hy00I-00026S-An for emacs-orgmode@gnu.org; Wed, 14 Aug 2019 16:36:18 -0400 Received: by mail-oi1-x22a.google.com with SMTP id 16so5679446oiq.6 for ; Wed, 14 Aug 2019 13:36:17 -0700 (PDT) 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 --000000000000738b54059019b58d Content-Type: text/plain; charset="UTF-8" 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 --000000000000738b54059019b58d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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

--000000000000738b54059019b58d--