From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nathan Neff Subject: Custom function: Detect agenda mode Date: Tue, 20 Aug 2019 16:48:22 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000008acda0590936b3d" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59737) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0BzY-0001nl-5g for emacs-orgmode@gnu.org; Tue, 20 Aug 2019 17:48:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0BzX-0001lZ-7m for emacs-orgmode@gnu.org; Tue, 20 Aug 2019 17:48:36 -0400 Received: from mail-io1-xd2a.google.com ([2607:f8b0:4864:20::d2a]:41119) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0BzX-0001lA-1n for emacs-orgmode@gnu.org; Tue, 20 Aug 2019 17:48:35 -0400 Received: by mail-io1-xd2a.google.com with SMTP id j5so426460ioj.8 for ; Tue, 20 Aug 2019 14:48:35 -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 --00000000000008acda0590936b3d Content-Type: text/plain; charset="UTF-8" Hello all, I would like to map the same key to different functions in evil mode. For example, ",s" should be a shortcut to the schedule command. I'd like to have one function that I would map the command to, which would call either org-schedule or org-agenda-schedule, depending on whether the cursor is in an Agenda view or an org file. What is the "correct" way to do this? Is there some handy functional programming fu that I should know? For example, I wouldn't be surprised to find a function in org-mode already that would do the detection and take the proper action. Thanks, --Nate --00000000000008acda0590936b3d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello all,

I would like to map the = same key to different functions in evil mode.

For = example, ",s" should be a shortcut to the schedule command.
=

I'd like to have one function that I would map the = command to, which
would call either org-schedule or org-agenda-sc= hedule, depending on whether
the cursor is in an Agenda view or a= n org file.

What is the "correct" way to= do this?=C2=A0 Is there some handy functional programming
fu tha= t I should know?=C2=A0 For example, I wouldn't be surprised to find a f= unction
in org-mode already that would do the detection and take = the proper action.

Thanks,
--Nate
<= /div> --00000000000008acda0590936b3d--