From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "David O'Toole" Newsgroups: gmane.emacs.orgmode Subject: For your consideration: Extending org-info-js with additional hooks Date: Mon, 12 Dec 2022 13:33:17 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000558bc705efa5bd76" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8674"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-orgmode@gnu.org Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Mon Dec 12 19:34:34 2022 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p4ndI-0001wn-P4 for geo-emacs-orgmode@m.gmane-mx.org; Mon, 12 Dec 2022 19:34:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p4ncS-0000as-Mg; Mon, 12 Dec 2022 13:33:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4ncM-0000Xw-Gz for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 13:33:37 -0500 Original-Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p4ncJ-0000Tg-U5 for emacs-orgmode@gnu.org; Mon, 12 Dec 2022 13:33:34 -0500 Original-Received: by mail-ej1-x62e.google.com with SMTP id b2so30356420eja.7 for ; Mon, 12 Dec 2022 10:33:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=KiUcotc52t+Ik3WKD39z6LuRe0n6kT9JpN3j3wRaeds=; b=nfBkrZlKW+OlUDpFhVaFjhOpkUFeGHfvKLOugWYXUf3hSCKslwbAGeXyn+RWz06yIp HHIMSyveWPq0H5dMiCFxnOmKb4lr8e54b8eLYldJiPb4l52oGnSTOJanx+wioe2uti7Q DNpdlgzVs2KY0OIYN/+vCgTtMpkbxB0HN1xYi3XG0yiXkLWNbSnDqKI3Cqr1WziSIxBs puxXSaxB2IuQAdpoMM715IuW74su01vAVqs6qdls/8nGEQLJ/orGTYYTQpSYseYlOF8J PCfocPMj5B3R8u2dx53dkrJrAnyrwXwgQ59p8zB7rpmHqdZ28alAF4wWnhtdn/hgLWhk fc6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=KiUcotc52t+Ik3WKD39z6LuRe0n6kT9JpN3j3wRaeds=; b=JTIjomhmt3vwnPqXoBJ79mYiiUN4/K1DD7t0y5n+uDekjtu0NGri51nM+MxNSsrkZU R8K3T32DXELhS8kKDV+r/f5NaJsopQZAmK0beObyJ3yTRd3nrdkmaR9bitFHdO1ZtbL3 n//2YMzI7ldTDiX0APyO/mIGW5/ydTX3ARraxhL+fBRVpGY+XtkrjIF6AKKGKBEKt8Ga K5GQmu77WiIQCsHQpDba3BNhHMmVeq2aoVIaKyTb5gGb7F93KHpKbqKQk4Ql7ZCq+u7q IhU+i47PpjvsOJolxUcuwsXqHB0woGpDXkrFKfjeh3pWKzBw3X2X9D73oMDq3mTdLtch 4fuA== X-Gm-Message-State: ANoB5pk1FKzBmDbm86uyTJDuUm/SBS40Sz+fNe9sJrSKXeH8Bg+i6v4S x8gZkG4aKuaQdtb/wlAJP16cc4PbKYjUYaAaxPJyRUUCiUI= X-Google-Smtp-Source: AA0mqf6vWuImaVCfmJxj54EZjoBP7BtpEm8hyEMwgU0xa1gqK0+SSMKHeX7MbLt//2/2h2c/pdK8kCkKty8GHf35HbM= X-Received: by 2002:a17:906:4a5a:b0:7c0:e6d7:dabc with SMTP id a26-20020a1709064a5a00b007c0e6d7dabcmr17982550ejv.227.1670870008690; Mon, 12 Dec 2022 10:33:28 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=deeteeoh1138@gmail.com; helo=mail-ej1-x62e.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Original-Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.orgmode:151305 Archived-At: --000000000000558bc705efa5bd76 Content-Type: multipart/alternative; boundary="000000000000558bc405efa5bd74" --000000000000558bc405efa5bd74 Content-Type: text/plain; charset="UTF-8" Greetings, Orgmoders. After some discussion with Yantar on IRC, I humbly submit the attached diff for your consideration. It adds new hooks to org-info-js to allow the following: 1. inserting page-specific HTML into each OrgInfo header, and 2. calling a custom JavaScript function to run after any page navigation button/link is clicked. I have used these hooks to implement Org-fleuron, a custom config with nice navigation buttons, a greeting balloon, and embedded theme/fonts. You can find out more about org-fleuron here: https://davidotoole.info/fleuron.html?#org5dc18bc and the page was made with the setup. I also corrected some of the English messages displayed by org-info-js. I hope you will find this useful. Please let me know if you have any questions or comments! --000000000000558bc405efa5bd74 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Greetings, Orgmoders.

After = some discussion with Yantar on IRC, I humbly submit the attached diff for y= our consideration.

It adds new hooks to org-in= fo-js to allow the following: 1. inserting page-specific HTML into each Org= Info header, and 2. calling a custom JavaScript function to run after any p= age navigation button/link is clicked. I have used these hooks to implement= Org-fleuron, a custom config with nice navigation buttons, a greeting ball= oon, and embedded theme/fonts. You can find out more about org-fleuron here= : https://dav= idotoole.info/fleuron.html?#org5dc18bc and the page was made with the s= etup.

I also corrected some of the English message= s displayed by org-info-js.

I hope you will find t= his useful.

Please let me know if you have any que= stions or comments!
--000000000000558bc405efa5bd74-- --000000000000558bc705efa5bd76 Content-Type: text/x-patch; charset="US-ASCII"; name="org-info-src.js.diff" Content-Disposition: attachment; filename="org-info-src.js.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lbl4gxuu0 ZGlmZiAtdSAvaG9tZS9kdG8vRG93bmxvYWRzL29yZy1pbmZvLXNyYy5qcyAvaG9tZS9kdG8vbm90 ZWJvb2svb3JnLWluZm8tc3JjLmpzCi0tLSAvaG9tZS9kdG8vRG93bmxvYWRzL29yZy1pbmZvLXNy Yy5qcwkyMDIyLTEyLTEwIDExOjQ3OjIwLjA4Njc0NjA3MiAtMDUwMAorKysgL2hvbWUvZHRvL25v dGVib29rL29yZy1pbmZvLXNyYy5qcwkyMDIyLTEyLTEyIDExOjQ4OjIwLjQ3MTQ0MTYyNSAtMDUw MApAQCAtMjgsMzAgKzI4LDU3IEBACiAgKiA8L3NjcmlwdD4KICAqCiAgKgotICogVGhlIHNjcmlw dCBpcyBub3cgcm91Z2hseSBkZXZpZGVkIGluIHNlY3R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xhc3Qgc2VjdGlvbi4iKTsKKyAgICAgICAgICAgIHQu d2FybigiVGhpcyBpcyBhbHJlYWR5IHRoZSBsYXN0IHNlY3Rpb24uIik7CiAgICAgICAgICAgICBy ZXR1cm47ICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZWx5IG9uIHdoYXQgaGFwcGVuZHMg aWYgbWVzc2FnaW5nCiAgICAgICAgICAgfQogICAgICAgICB9CkBAIC0xNjAwLDE0ICsxNjMxLDE0 IEBACiAgICAgICAgICAgICAgICsraWR4OwogICAgICAgICAgICAgfQogICAgICAgICAgIH0KLSAg ICAgICAgICB0Lndhcm4oIk5vIG5leHQgc2libGluZy4iKTsKKyAgICAgICAgICB0Lndhcm4oIlRo ZXJlIGlzIG5vIG5leHQgc2libGluZy4iKTsKICAgICAgICAgICByZXR1cm47ICAgICAgICAgICAg ICAgICAgICAgICAgICAvLyByZWx5IG9uIHdoYXQgaGFwcGVuZHMgaWYgbWVzc2FnaW5nCiAgICAg ICAgIH0KICAgICAgICAgZWxzZSBpZiAoJ3AnID09IHMpIHsKICAgICAgICAgICBpZih0Lk5PREUu SURYID4gMCkgewogICAgICAgICAgICAgdC5uYXZpZ2F0ZVRvKHQuTk9ERS5JRFggLSAxKTsKICAg ICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgdC53YXJuKCJBbHJlYWR5IGZpcnN0IHNlY3Rp b24uIik7CisgICAgICAgICAgICB0Lndhcm4oIlRoaXMgaXMgYWxyZWFkeSB0aGUgZmlyc3Qgc2Vj dGlvbi4iKTsKICAgICAgICAgICAgIHJldHVybjsgICAgICAgICAgICAgICAgICAgICAgICAgIC8v IHJlbHkgb24gd2hhdCBoYXBwZW5kcyBpZiBtZXNzYWdpbmcKICAgICAgICAgICB9CiAgICAgICAg IH0KQEAgLTE2MjMsNyArMTY1NCw3IEBACiAgICAgICAgICAgICAgIC0taWR4OwogICAgICAgICAg ICAgfQogICAgICAgICAgIH0KLSAgICAgICAgICB0Lndhcm4oIk5vIHByZXZpb3VzIHNpYmxpbmcu Iik7CisgICAgICAgICAgdC53YXJuKCJUaGVyZSBpcyBubyBwcmV2aW91cyBzaWJsaW5nLiIpOwog ICAgICAgICB9CiAgICAgICAgIGVsc2UgaWYgKCdxJyA9PSBzKSB7CiAgICAgICAgICAgaWYod2lu ZG93LmNvbmZpcm0oIlJlYWxseSBjbG9zZSB0aGlzIGZpbGU/IikpIHsKQEAgLTIyOTEsMyArMjMy Miw0IEBACiB7CiAgIG9yZ19odG1sX21hbmFnZXIuaW5pdCgpOwogfQorCgpEaWZmIGZpbmlzaGVk LiAgTW9uIERlYyAxMiAxMTo1MToyNiAyMDIyCg== --000000000000558bc705efa5bd76--