From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ssKnIDRts2KYlQAAbAwnHQ (envelope-from ) for ; Wed, 22 Jun 2022 21:27:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OLecHjRts2L09wAAG6o9tA (envelope-from ) for ; Wed, 22 Jun 2022 21:27:48 +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 178CD3F698 for ; Wed, 22 Jun 2022 21:27:48 +0200 (CEST) Received: from localhost ([::1]:56714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o460x-0001su-9x for larch@yhetil.org; Wed, 22 Jun 2022 15:27:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60102) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o45dN-0001af-Lk for emacs-orgmode@gnu.org; Wed, 22 Jun 2022 15:03:25 -0400 Received: from mail-yw1-x1135.google.com ([2607:f8b0:4864:20::1135]:41973) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o45dL-0005nM-VD for emacs-orgmode@gnu.org; Wed, 22 Jun 2022 15:03:25 -0400 Received: by mail-yw1-x1135.google.com with SMTP id 00721157ae682-31780ad7535so146103047b3.8 for ; Wed, 22 Jun 2022 12:03:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x0/As/9l6rUYZcYFwaAHSR5+0XhhQUBJ6Eei9tdZwrY=; b=MstgoMDdau6J8iLYr48YNtcyF0Z8Bpl5NO7/+VbG9CdvsT7OlgKIEXe+QckaROCHRD jj9qW8Lpj6TZ3OyIZv90C6EOtidUcCjYW5DEEFCQusTFidsZ3koBiLpTymEIpeD83ZSA BK3wx8Sbh1bmwJeHNlZA077vQbR7C8Pb2OvHQ4QDULU4mEFEqpqFydQNEY6louAgTiDF ttRXFHj0sIC7woQ3vFHD7BSbWoKzZ2HmU1ZxoyirVu/SLnwukKDqdL4zMFTK0c4Lzg3N w244SfwthStGvzKWbT0HUsZWP8rdPrEC9QemQs1HZYqcv/8t8URniof5wwMMCIlWb0uH ViKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x0/As/9l6rUYZcYFwaAHSR5+0XhhQUBJ6Eei9tdZwrY=; b=NGVBSLiek6+NBqRh/PkSNMQwT9oAKybRNfV5LsdaKvzpqEyb36Vqgqu/Zz2a0BqDW1 U8FoeP0WY9bKjBLEvxs8XH4Olrlm0jns4oPlFECNPfBTtWOF/6iHPAaAq2brLXJp27BE FC7XrMGUORlxM2XTcSr7mYqPC5DBAydgvWc6tw/kkk5/zMHVB6HgAYpib8SG1jbPV4UB T8HCD9OxhwVfdEc92cXJy8/rtYsSNVvVMAGItO0OJ0aXo4tZkgPvS3wveDYYUowrEQzD Nk+C5YRbYyIIaLQEjItUIe+ArXEb0FJfRweR3RC+pnJurkLbnS15T5pdYnJtRyoe1Myp C2Jg== X-Gm-Message-State: AJIora+Ue5OmL1WEweH+20VSOO1s3cJoM0ERGpoWelEgM9VQp79mHnV2 MvoLjZGL6iP16xpdodTK5mXYZ0AtNEDWOz8Dp1lSF1Kxzjg= X-Google-Smtp-Source: AGRyM1v5YQDF3yu8o19736pwOeMO4MEiPatKFSOu1twxqiRJHUD2dWMjbK/leZr56g/j0BS5p3n0gyVtuEdFsDAMaAw= X-Received: by 2002:a0d:d584:0:b0:318:5993:7742 with SMTP id x126-20020a0dd584000000b0031859937742mr3214047ywd.133.1655924602798; Wed, 22 Jun 2022 12:03:22 -0700 (PDT) MIME-Version: 1.0 References: <875ykvbffg.fsf@posteo.net> In-Reply-To: From: Bill Burdick Date: Wed, 22 Jun 2022 22:03:11 +0300 Message-ID: Subject: Re: Org and Hyperbole To: David Masterson Cc: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000b9858a05e20dfd30" Received-SPF: pass client-ip=2607:f8b0:4864:20::1135; envelope-from=bill.burdick@gmail.com; helo=mail-yw1-x1135.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=1655926068; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=x0/As/9l6rUYZcYFwaAHSR5+0XhhQUBJ6Eei9tdZwrY=; b=AoMQ/9xOaGUB6pBmqJX/7RStMvYFJ5xzAM6Pl0mXyflAxj71/EmZVMeR6tlZBD8DVK5GGE QAii2O5Zfhzyit6Z0jro59AuT3FqsEXYlyT0QjrHOmuno/1wUkCTSQKkPj9bltg/sZb9qi +qCh4KBhHWV2iPU4BUpnwMjraRR3+tPIgcX8za9FA0qWRImJqSSTQu6az2x+5ZqN4Tqt20 IbKxQFWh0ORH5fFVfxekpvk+zR8m2ryMwJfAiBY4a+A5NHMnWB7xLI6oYrR+5rETZeJL+C AGgb2ibhKCcMfrrv6i9UIOLZXriYnJJ4XBNSSGCPyreg5kPUza8ltfNzOLQDqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655926068; a=rsa-sha256; cv=none; b=byALYCj79fx8yjTVIEdb0zyGlCYPyE+NTpPR8MWYYrkNP/6YwBr0CJlV5wscROCxQyhWVp m+n1tzoyebyfTtfRMhvK5b3ieWSA91ovnGlGsDyKFTd37315lYx9BAeMcUh7deNcMk8JLp Ga4ViMwXQQwtXiOD30J9o1JkbtBqPoaFKdgcMTXLHf3ch2AMI4r5VC+IOIGl1/RVKoUOar 0M00JSHVYXZKMy+hBlit1Hdg3BnmkZVfAPyTr5ptihJI+b01KNV2eNYReecu9BQ75246fK t/yLGRXWIAe54cyLPXLT+Jq8sZZka0IxBJw0mVX1O30scHaRzUUOEfsU5PAQBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MstgoMDd; 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: -3.96 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=MstgoMDd; 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: 178CD3F698 X-Spam-Score: -3.96 X-Migadu-Scanner: scn1.migadu.com X-TUID: icerJJ/y9HNw --000000000000b9858a05e20dfd30 Content-Type: text/plain; charset="UTF-8" Sure: (defun bill/restore-calc-point (result) (when bill/calc-point (goto-char bill/calc-point) (setq bill/calc-point nil)) result) (advice-add 'hmouse-function :filter-return 'bill/restore-calc-point) If my recalc function matches, it sets bill/restore-calc-point to a marker like this: (setq bill/calc-point (make-marker)) Since it's normally nil, the advice normally just ignores it. -- Bill On Wed, Jun 22, 2022 at 9:05 PM David Masterson wrote: > Bill Burdick writes: > > > Anywhere you use a link or button, you can probably use an emacs > > command instead. I think maybe the value of links and buttons is that > > they're explicit. It's a reminder in the text and you don't have to > > learn it. > > > > One thing I noticed in my little "recalc" exercise is that Hyperbole > > really really wants the cursor to stay on the button. I used function > > advice to make the cursor stay where it was when you clicked the > > button. This allows "menubars" to work, lists of buttons that can > > operate on the text without warping the cursor to the buttons. This is > > how Oberon and WIly work and I think Hyperbole (for my use cases > > anyway) will benefit from this usage style. > > Could you provide an example of that function advice? > -- > David Masterson > --000000000000b9858a05e20dfd30 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sure:

(defun bill/restore-calc-po= int (result)
=C2=A0 (when bill/calc-point
=C2=A0 =C2=A0 (goto-char bi= ll/calc-point)
=C2=A0 =C2=A0 (setq bill/calc-point nil))
=C2=A0 resul= t)

(advice-add 'hmouse-function :filter-return 'bill/restore= -calc-point)

If my recalc function matches, it sets bill/restore-cal= c-point to a marker like this:

(setq bill/calc-point (ma= ke-marker))

Since it's normally nil, the advic= e normally just ignores it.


--= Bill


On Wed, Jun 22, 2022 at 9:05 PM David Mast= erson <dsmasterson@gmail.com> wrote:
Bil= l Burdick <b= ill.burdick@gmail.com> writes:

> Anywhere you use a link or button, you can probably use an emacs
> command instead. I think maybe the value of links and buttons is that<= br> > they're explicit. It's a reminder in the text and you don'= t have to
> learn it.
>
> One thing I noticed in my little "recalc" exercise is that H= yperbole
> really really wants the cursor to stay on the button. I used function<= br> > advice to make the cursor stay where it was when you clicked the
> button. This allows "menubars" to work, lists of buttons tha= t can
> operate on the text without warping the cursor to the buttons. This is=
> how Oberon and WIly work and I think Hyperbole (for my use cases
> anyway) will benefit from this usage style.

Could you provide an example of that function advice?
--
David Masterson
--000000000000b9858a05e20dfd30--