From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6PgBO+wWjWJzJgEAbAwnHQ (envelope-from ) for ; Tue, 24 May 2022 19:33:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KGD8OewWjWJ5tAAAG6o9tA (envelope-from ) for ; Tue, 24 May 2022 19:33:32 +0200 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 795441514B for ; Tue, 24 May 2022 19:33:32 +0200 (CEST) Received: from localhost ([::1]:46988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntYPT-00044A-Gy for larch@yhetil.org; Tue, 24 May 2022 13:33:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntYOs-00042P-PE for emacs-orgmode@gnu.org; Tue, 24 May 2022 13:32:55 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:35437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntYOq-0007pJ-RE for emacs-orgmode@gnu.org; Tue, 24 May 2022 13:32:54 -0400 Received: by mail-wr1-x430.google.com with SMTP id x12so2457439wrg.2 for ; Tue, 24 May 2022 10:32:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language :references:from:to:in-reply-to; bh=y34JtRs0aOvyqydVTZYDKjV1vBhLC7AYtRrdVklbyIc=; b=jEdrIGKTpDvD5hEUVsBsTVDZMpuZ20YucmqTq9ioio9xGSUjRG6S9y+ZsRHEqO+c+r +WjNFwwMlB1aDzlt+BXel0l9OcunXtdODsMSRdWjzbdJoHto0RlV7TBMnS0WHDZ9XPtT ZcdWlbJ+o/sZlmNR47AuakEMn7n4u1Xp3cbfdNdKy+19xZll0YfUmIcAtu2Z5DGPmVTG NDenokf50oDBSieC6WLFxgSDStfRruIMnbuLSKf3folG5EG4Ej3uF/i3/mvdXvSVQrvA FqmdTHYLlfddy91FrXhPfgjsWm576voqddjNjaK/X9U+fq2IyuXdSfdXY9Xv7LeK3vTP XkHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:references:from:to:in-reply-to; bh=y34JtRs0aOvyqydVTZYDKjV1vBhLC7AYtRrdVklbyIc=; b=3GALopVWBMuzlEJoo3PtXHWtspo0vCZt81pH3l3RYF1EP6Bvyv6iK4e1AR8doLRGeP xuQN2Q4vL2be5AqOZXCzUvC7l0JW8ugus3dmxmfearc3mkp5TDPsZDcQL2S8cPnpllNA eabo4DRlaid3HbTt0FhiLj8m+nVPw3LehevuRWwXi6dvfSPWVMaz5buZzLW0ft9cVY0s oeWlBxjgIJp27CM1V8k52XUqsE406h7uk/ol9p2T73goq8bCHkczumESOjTyMQlXbXwc PMijEvm+EjtIVmbdY3Q8KTKDZTX+4Abt46L6pgvOKrBvnaqQ1Nr94IAFRZCozILQDQWh lCgA== X-Gm-Message-State: AOAM531jG9YvYVFDCC8AMPofqd9hw2qLmFsPbLXC/ksOIsa0vAS0JO9V 6IHQ/hoX5wscuXayHMm7DPBsTQg+2Wc= X-Google-Smtp-Source: ABdhPJydW3xrl2kYC3t33cXwgmvcxE56z4PIw1NnqepifDi+vdau5Se5Qun8d5omE+061KLalqkr0Q== X-Received: by 2002:a05:6000:1568:b0:20f:d416:e5ac with SMTP id 8-20020a056000156800b0020fd416e5acmr11623868wrz.190.1653413568770; Tue, 24 May 2022 10:32:48 -0700 (PDT) Received: from [192.168.0.97] ([5.225.20.86]) by smtp.gmail.com with ESMTPSA id e6-20020a05600c4e4600b00395f15d993fsm170512wmq.5.2022.05.24.10.32.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 May 2022 10:32:48 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------vC2IOUvlH30Lq88FWTx6QZRD" Message-ID: <96d28d1e-38fb-5566-52e2-6fef48e9775e@gmail.com> Date: Tue, 24 May 2022 19:32:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Fwd: Help with my first elisp Content-Language: en-GB References: <9776a3ba-8adc-88a6-ee09-3da03cc0c05b@serviplast.net> From: Ypo To: Org-mode In-Reply-To: <9776a3ba-8adc-88a6-ee09-3da03cc0c05b@serviplast.net> X-Forwarded-Message-Id: <9776a3ba-8adc-88a6-ee09-3da03cc0c05b@serviplast.net> Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=ypuntot@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653413612; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=y34JtRs0aOvyqydVTZYDKjV1vBhLC7AYtRrdVklbyIc=; b=cd36Xm+gsP/kW8Saxhx5RP+sUjzYqC92chqisTH0xd2UO2y7FQSg/qfxE6dAQWcI25m+Q7 YHcwa7y90gjW7k2hwJbYfOanLSey4SxLbs2F0/1Xg02t66PW+voQLFgp7x1W45TMgKHr5e DeebzLh3Bx2jtTNcSrsaR3fKnCJrAQ6rMuVY/V1X1jGtpqugXzs9StHoevsQumfBGEY1yQ oQDnbHMy3Z+uUhWXS6WdR+Iq36qENojjjDKkHpiF2IL+2mQQX6mLHehNX3wI33Skzv5yig mZf8huYw6RnIrKjqTx/9dX9RXsrHKKq0bSM/NR9KmrKW5k76AnPelb6DgH27ug== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653413612; a=rsa-sha256; cv=none; b=lIZpd8XBhiEzaNJDh9lPqu8isZxsFQizikKi2r3OsA/7dr3/7ZeVr/ytCYQKOyCt0llERP lCjFzZrsgYVzi+Ow9wTQBqnysvl2qCwOwbkcTapSSTMi/dbM7BhTzUYBxUJA3AtAcyGETG T0NxZ1ofzPCrbUtxXb8WKOZvwOAm3HQdy9XKX5xuJ0eMgVfjs5pYTJdn1zFQ3wFNkHb3sg yIDrCRWdS3iwqRl/tml9yGnd0StWb0jZEI9SR0ouApKi3rLrEoXEeF07LUI3MujJ1Pq2EQ DZcS0tjQ1kg7P3Nbvdwal44nl4sthbGYLixLdbQ4/6/CAZ5Z9GiT+J1cV1TJgg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jEdrIGKT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jEdrIGKT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 795441514B X-Spam-Score: -4.04 X-Migadu-Scanner: scn1.migadu.com X-TUID: tzOtl+TVtIep This is a multi-part message in MIME format. --------------vC2IOUvlH30Lq88FWTx6QZRD Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > maybe use something like > > >/> (define-key mh-letter-mode-map/ > >/> (kbd "C-c s")/ > >/> 'ggm-mh-sentaddrs-completion)/ > > but, using whatever the name of the logos-focus mode map, pointing at > your functions? Hi Greg I think "logos" doesn't have a map, is it possible? > On Mon, May 23, 2022 at 09:46:09AM -0700, Greg Minshall wrote: > >/Ypo,/ > >// > >/> (defun salto ()/ > >/> (interactive)/ > >/> (if posicion 1/ > > You are comparing the value of posicion to 1? > > Then it should probably be "(if (= posicion 1) ...)" or > "(if (equal posicion 1) ...)" or something like that. > > Cheers > -- > t Thanks, Tomas. It seems the "if" part works, now I can use my elisp just with the spacebar :-) (add-hook 'logos-focus-mode-hook #'(lambda () (defvar posicion   "Position where is the cursor.")   (defun focusPointStart ()   (interactive)   (next-line 1)   (beginning-of-visual-line)   (forward-char 6)   (setq posicion 1) ) (defun focusPointInter ()   (interactive)   (forward-char 23)   (setq posicion 2) ) (defun focusPointEnd ()   (interactive)   (end-of-visual-line) ;;C-e   (backward-char 7)   (setq posicion 3) ) (defun focusJump ()   (interactive)   (if (equal posicion 1)     (focusPointInter)       (if (equal posicion 2)       (focusPointEnd)         (if  (equal posicion 3)         (focusPointStart))))) (define-key global-map (kbd "SPC") #'focusJump) )) --------------vC2IOUvlH30Lq88FWTx6QZRD Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

maybe use something like

>>              (define-key mh-letter-mode-map
>>               (kbd "C-c s")
>>               'ggm-mh-sentaddrs-completion)

but, using whatever the name of the logos-focus mode map, pointing at
your functions?

Hi Greg

I think "logos" doesn't have a map, is it possible?


On Mon, May 23, 2022 at 09:46:09AM -0700, Greg Minshall wrote:
> Ypo,
> 
> > (defun salto ()
> >   (interactive)
> >   (if posicion 1

You are comparing the value of posicion to 1?

Then it should probably be "(if (= posicion 1) ...)" or
"(if (equal posicion 1) ...)" or something like that.

Cheers
-- 
t
Thanks, Tomas. It seems the "if" part works, now I can use my elisp just with the spacebar :-)

(add-hook 'logos-focus-mode-hook #'(lambda ()

(defvar posicion
  "Position where is the cursor.")

  (defun focusPointStart ()
  (interactive)
  (next-line 1)
  (beginning-of-visual-line)
  (forward-char 6)
  (setq posicion 1)
)

(defun focusPointInter ()
  (interactive)
  (forward-char 23)
  (setq posicion 2)
)


(defun focusPointEnd ()
  (interactive)
  (end-of-visual-line) ;;C-e
  (backward-char 7)
  (setq posicion 3)
)

(defun focusJump ()
  (interactive)
  (if (equal posicion 1)
    (focusPointInter)
      (if (equal posicion 2)
      (focusPointEnd)
        (if  (equal posicion 3)
        (focusPointStart)))))

(define-key global-map (kbd "SPC") #'focusJump)
))


--------------vC2IOUvlH30Lq88FWTx6QZRD--