From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6D8SJTRts2Ls5AAAbAwnHQ (envelope-from ) for ; Wed, 22 Jun 2022 21:27:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iCwDJTRts2IebgAAauVa8A (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 2D5CDBC4F for ; Wed, 22 Jun 2022 21:27:48 +0200 (CEST) Received: from localhost ([::1]:56786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o460x-0001vU-1C for larch@yhetil.org; Wed, 22 Jun 2022 15:27:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o45zr-0001JS-K7 for emacs-orgmode@gnu.org; Wed, 22 Jun 2022 15:26:39 -0400 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]:44565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o45zp-0000tG-V1 for emacs-orgmode@gnu.org; Wed, 22 Jun 2022 15:26:39 -0400 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-3176b6ed923so172774357b3.11 for ; Wed, 22 Jun 2022 12:26:37 -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=xCw4bvLc19+YEnUFcSChT3JCZ6J8J9ET9fqXi+S0RJE=; b=nE6Cz9y0K4/ZnoQu5Q3wdaSSCgbNYXZqj58EGwEsSFaIJG2eS5qyFsL9rj9QlfQ2E3 ePbdTfDWGhLcH2/rK7huwwbATfTO+a9fNPdIiRTQ7PZB3VgkS9dgclcN/RQIusIYYrrO 89yc7sPUXB9H8bhEeoNjXr7hd9BlzNOGrkw7NYzxqep1yiWudELR/QVKU5zjboGAURSQ tB134YXhkscMSb2+Vd0MGQ/lXNi+OWfnGRaEmfo3PDqjW82RyM8u1iv1tksEVlFnSXK3 IeLcNysRwAE19N1sz40AGdImqQAAlrzKzZWx4RmIU0lZj8REqCHezJVrZIMNGmNjbxkq xZwA== 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=xCw4bvLc19+YEnUFcSChT3JCZ6J8J9ET9fqXi+S0RJE=; b=1+wHy76qXU1VGokFKLrdsy5kczjQCt18oMTuylxXtTJ+lhh0S5l5AWy0EwhuvM7Acw 6i5qU9JD2N7HLtdkWEXqPxC/FYFyXyLmLVVBXsSSO0ivUX9C9m+Ha0dOusd0+GwYG4i/ 6FBq2F7ip9fBK2yHsVaIIjThBI7igO4p/Xs/KIlGNAh+KlrYFgJ+DqbASJxDhe37GU81 eB41Ir9DHrJPCTFjisxOVcM8es5Uke2PfbMxK4fmxrve5WkvVX86VDAcsh9nqqfbBUqH sTja8mrGgFDtjuGcdY7Aqv48zbLsVb9YCvm5Bv6xuGyFRNumMofEyl7RBbWyT8oXlEgQ okLw== X-Gm-Message-State: AJIora+NpwB99eG1azplaXuiO2Ylo4hk/paQQXIhmEzWnsW33/V0uDx/ 0PHGevVkKSyOYsDUhK1KzYTDV1Oa5zZPk7CjDwI= X-Google-Smtp-Source: AGRyM1vzrRGFTH4CO2Ggv4WuaO5WPUC3n2N2hdTh2r3QTZUgQVhm0fOEgOQ+seoXWGSrsJmDQzybjA6U4UnUlCs6GUA= X-Received: by 2002:a0d:c544:0:b0:317:ee42:8111 with SMTP id h65-20020a0dc544000000b00317ee428111mr6079804ywd.474.1655925996925; Wed, 22 Jun 2022 12:26:36 -0700 (PDT) MIME-Version: 1.0 References: <875ykvbffg.fsf@posteo.net> <87a6a5gf1p.fsf@posteo.net> In-Reply-To: From: Bill Burdick Date: Wed, 22 Jun 2022 22:26:25 +0300 Message-ID: Subject: Re: Org and Hyperbole To: David Masterson Cc: =?UTF-8?Q?Juan_Manuel_Mac=C3=ADas?= , orgmode Content-Type: multipart/alternative; boundary="000000000000d239f605e20e5083" Received-SPF: pass client-ip=2607:f8b0:4864:20::112f; envelope-from=bill.burdick@gmail.com; helo=mail-yw1-x112f.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=xCw4bvLc19+YEnUFcSChT3JCZ6J8J9ET9fqXi+S0RJE=; b=U2ywf9fSvzaQm0l1IY/qOyuLzyx1vfns6kAvCIY9SdD3O5n8bELc1913nGi5aUsOlPof33 sd1fb/m9LT2+8s76naFWRj5JCPJH64rfdXAZ20I7qWirJYq8xlCGLwMfxkHze2pUnZ77d0 z4duOZ9Jj7jzPu9/yQuXbzwtCkMd4nDv5WLkrR8PYVXA9YO+lAtBwdjhq064rzJH7vAZmT DaR3gSzBAkk6FGugheyAg1nV8Mk5IbaUSRruRHlB3GykUVTaXNdTL02WPjW1Yqb6iqrK7h ayjoRAOyPcUlqaJ+3PpEK0dmEvGwCPREn17xfJZWSA4vtLaBQfdhvWKdYeIcRg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655926068; a=rsa-sha256; cv=none; b=Ci1NQkt/EsxNrvAZN227rQ6G7ZBW/xy/lR13DOZQ+/xBiMwDlK0Zi19IFZc6v9NyMqgtUq pw11LUb99UH9o+ZEok0DOgzw2iWxLslEW0UlKJ1d+n6zIpOWNb7T9WL6L02ifXpmlASuQT G7w23DJ3kxKmYLYb5Pmed0dazAymjRuKwJ/C3Wdc1KI+kg6Ak35cK8F5yLNl/qPCN2bO4/ VsljMgMLu9rGSIIq241FGiDq/IKqq/2GvPQwv3rzG5mbDZ5yaUSiijx8AiwXgVD90e+ZLL M+MlGHaqdRe3WySrW11X5TbRke+RkeD3VWY1xO/yT9KlYfUE0dpGbaJcjJoPeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nE6Cz9y0; 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: -9.26 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nE6Cz9y0; 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: 2D5CDBC4F X-Spam-Score: -9.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: EUFwz6UboBpF --000000000000d239f605e20e5083 Content-Type: text/plain; charset="UTF-8" No idea. -- Bill On Wed, Jun 22, 2022 at 10:23 PM David Masterson wrote: > Bill Burdick writes: > > > Here's a hyperbole-org integration that lets you use org-mode tables > > outside of org-mode files. Shift-middle-click a "recalc" button and it > > will recalculate the table right under it (this idea is from an old > > version of the Oberon environment I wrote in Java, by the way). > > > > Here's the code: > > > > (defun bill/calc (end) > > (goto-char end) > > (re-search-forward "\n") > > (when (org-at-table-p) > > (org-table-analyze) > > (let* ((table-start (point)) > > (rows (1- (length org-table-dlines))) > > (table-end (re-search-forward "\n" nil t rows)) > > (inside (<= table-start action-key-depress-prev-point > table-end))) > > (when inside > > (goto-char action-key-depress-prev-point) > > (org-table-maybe-eval-formula)) > > (goto-char table-start) > > (call-interactively 'org-table-recalculate) > > (org-table-align)))) > > > > (defib recalc () > > "recalculate a table" > > (save-excursion > > (let* ((pos (point)) > > (eol (progn (re-search-forward "\n") (point))) > > (bol (progn (re-search-backward "\n" nil t 2) (1+ (point)))) > > (start (progn (goto-char pos) (re-search-backward "<" bol t))) > > (end (progn (goto-char pos) (re-search-forward ">" eol t)))) > > ;;(message "pos: %s, prev: %s" (point) > action-key-depress-prev-point) > > (and start end (string-match " ].*" (buffer-substring > start end)) > > (hact 'bill/calc end))))) > > > > Here's an example table you can put anywhere. Just shift-middle-click > > on it to recalculate the org-mode table. Also, if you type a formula > > (and keep the cursor on the same line) and then shift-click recalc, > > it'll handle the formula: > > > > > > | a | 12 | > > | a | 5 | > > #+TBLFM: @1$2=3*4::@2$2=2+3 > > Isn't this the minor mode orgtbl-mode ? > > -- > David Masterson > --000000000000d239f605e20e5083 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
No idea.


-- Bill


On Wed, Jun 22, 2022 at 10:= 23 PM David Masterson <dsmaster= son@gmail.com> wrote:
Bill Burdick <bill.burdick@gmail.com> writes:

> Here's a hyperbole-org integration that lets you use org-mode tabl= es
> outside of org-mode files. Shift-middle-click a "recalc" but= ton and it
> will recalculate the table right under it (this idea is from an old > version of the Oberon environment I wrote in Java, by the way).
>
> Here's the code:
>
> (defun bill/calc (end)
>=C2=A0 =C2=A0(goto-char end)
>=C2=A0 =C2=A0(re-search-forward "\n")
>=C2=A0 =C2=A0(when (org-at-table-p)
>=C2=A0 =C2=A0 =C2=A0(org-table-analyze)
>=C2=A0 =C2=A0 =C2=A0(let* ((table-start (point))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (rows (1- (length org-table-d= lines)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (table-end (re-search-forward= "\n" nil t rows))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (inside (<=3D table-start = action-key-depress-prev-point table-end)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(when inside
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(goto-char action-key-depress-prev-po= int)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(org-table-maybe-eval-formula))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(goto-char table-start)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(call-interactively 'org-table-recalcula= te)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(org-table-align))))
>
> (defib recalc ()
>=C2=A0 =C2=A0"recalculate a table"
>=C2=A0 =C2=A0(save-excursion
>=C2=A0 =C2=A0 =C2=A0(let* ((pos (point))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (eol (progn (re-search-forwar= d "\n") (point)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (bol (progn (re-search-backwa= rd "\n" nil t 2) (1+ (point))))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (start (progn (goto-char pos)= (re-search-backward "<" bol t)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (end (progn (goto-char pos) (= re-search-forward ">" eol t))))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0;;(message "pos: %s, prev: %s" (po= int) action-key-depress-prev-point)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(and start end (string-match "<recal= c[> ].*" (buffer-substring start end))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (hact 'bill/calc end)))))=
>
> Here's an example table you can put anywhere. Just shift-middle-cl= ick
> on it to recalculate the org-mode table. Also, if you type a formula > (and keep the cursor on the same line) and then shift-click recalc, > it'll handle the formula:
>
> <recalc>
> | a | 12 |
> | a |=C2=A0 5 |
> #+TBLFM: @1$2=3D3*4::@2$2=3D2+3

Isn't this the minor mode orgtbl-mode ?

--
David Masterson
--000000000000d239f605e20e5083--