From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 +Kf+KTToM2NvnAAAbAwnHQ (envelope-from ) for ; Wed, 28 Sep 2022 08:22:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0JUQKjToM2PR/wAA9RJhRA (envelope-from ) for ; Wed, 28 Sep 2022 08:22:44 +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 0F7B924539 for ; Wed, 28 Sep 2022 08:22:43 +0200 (CEST) Received: from localhost ([::1]:36978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odQSq-0003iP-Jz for larch@yhetil.org; Wed, 28 Sep 2022 02:22:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odQNU-0003gp-38 for emacs-orgmode@gnu.org; Wed, 28 Sep 2022 02:17:08 -0400 Received: from stw1.rcdrun.com ([217.170.207.13]:43843) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odQNS-0007YZ-4n for emacs-orgmode@gnu.org; Wed, 28 Sep 2022 02:17:03 -0400 Received: from localhost ([::ffff:102.83.37.37]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 00000000000BA492.000000006333E6DD.0000108C; Tue, 27 Sep 2022 23:17:00 -0700 Date: Wed, 28 Sep 2022 09:04:16 +0300 From: Jean Louis To: Eduardo Ochs Cc: Robert Weiner , emacs-org list Subject: Re: Org, Hyperbole, and eev Message-ID: Mail-Followup-To: Eduardo Ochs , Robert Weiner , emacs-org list References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/+ () (2022-06-11) Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-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+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664346164; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NhfJ5MbsK6xJ9gf824GxKb6mu+z2M3v0JxUumRBQcBA=; b=tryO3goTkE1hSAOs7zH+4UZjfg93/YvhY93qZiNlsxjvVeaaWjPlbnBCGaPZbrqRLBtLNw sLm97ywPY/zDvLhwW0XloQhPArpyEbd579zsj48yYQOF+pFVQ3QpCCReN7liTrLhRU7O8O psHwm/ZB17f5bDN3aHyS7RovCVD1RQ1g3W4bgaRmkMJSB1V61Z1aZQqR0SMmUqoDF3j8R/ k1gPuTRMUur4CQx2X36xnTkaDeAcR2KV+UIAaAQFH20yCGonsdB08HnFuVVq6/M6UuNGPg jnaKu0N/wbH/K/AO7yGlaRP4Cx10mKVTHzTEDR+a7zrXDLP6qT7yWd53hW0vyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664346164; a=rsa-sha256; cv=none; b=BVjF1N/Is9d6x/uyuNDzXy+EPsneNGa81j4BmW6nD7+G7b7LS39IntZI4xxoS4YunLBLnK JazWyxvj1RGV/diNgHPFo9VdQYf3SaRrfxkPH7jzv2ftXPaLQwByXYD5wbLgIgHdqCbksr wPIELQdZCc8Dxr262kCWsgNmdHyQwhz2X2n3iRXt+Qtb5qHlwCSb3ZQaQV+IAylk/V9zgw uS5L5VQid6ST5BMofhKWha4X5AEV+gBlYrpJgW7qJBGkpryEZFlWLnex7i/ZaP99GxeHRK Totlujgip38Zen+DdkvMZiSNgWCIw4vEZ33Rwf/5wFBNzFw9CB8uTsnmH8oN0Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; 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: -2.65 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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: 0F7B924539 X-Spam-Score: -2.65 X-Migadu-Scanner: scn1.migadu.com X-TUID: AcZTju5nPKH6 * Eduardo Ochs [2022-09-28 03:54]: > On Tue, 27 Sept 2022 at 18:59, Jean Louis wrote: > > (...) > > What did you do to inspect an Org link? > > Here's what I just tried: I created a file /tmp/foo.org containing > " [[http://a/b/][ab]]\n" - i.e., a space, a link, and a newline - > and then I marked the whole buffer and ran `M-1 M-x find-eregionpp' > on it to pretty-print the region as a string with properties, with > the flag `print-circle' turned on... see: > > (find-efunction 'find-eregionpp) > http://angg.twu.net/eev-current/eev-blinks.el.html#find-eregionpp > > Apparently Org divided that file into 8 subsegments, each one with > different text properties... and they mention all these keywords: > > face follow-link font-lock-multiline fontified help-echo highlight > htmlize-link intangible invisible keymap mouse-2 mouse-3 mouse-face > org-find-file-at-mouse org-link org-linked-text org-open-at-mouse > rear-nonsticky > > I _think_ that it should be possible to make this I have followed it, though it helps me little. You know that better. I would like to have non-Org links so that my function for links interpolates into a button. It works now in the presentation mode. I would like to make links descriptive or non descriptive just as in Org, so that it works in editing mode. > ⟦ (hyperscope-wrap-eev "Hyperbole DEMO file" '(find-hyperbolefile "DEMO")) ⟧ > > into a kind of button using only three subregions with different text > properties: a first invisible region with this, > > ⟦ (hyperscope-wrap-eev " > > then a visible region with "button actions", with this, > > Hyperbole DEMO file > > and then another invisible region with: > > " '(find-hyperbolefile "DEMO")) ⟧ Not like that really. Anything within ⟦ ⟧ or other delimiters, I wish to get interpolated depending of settings. I would like to find or mae general non-specific library for any kind of links to be customized. I know this does not explain it well. I am using: RCD Template Interpolation System for Emacs: https://hyperscope.link/3/7/1/3/3/RCD-Template-Interpolation-System-for-Emacs.html Right now I use ⟦ ⟧ delimiters, but I could use as well () Let us say ⟦ emacs-version ⟧ I get easily visible with C-a a which invokes: (defun rcd-lightweight-markup-preview () (interactive) (cond ((string= rcd-markup-language "asciidoc") (rcd-asciidoc-preview)) ((string= rcd-markup-language "asciidoctor") (rcd-asciidoctor-preview)) ((eq major-mode 'adoc-mode) (rcd-asciidoctor-preview)) ((eq major-mode 'markdown-mode) (rcd-markdown-preview)) ((eq major-mode 'html-mode) (rcd-markdown-preview)) ((eq major-mode 'mhtml-mode) (rcd-markdown-preview)) ((eq major-mode 't2t-mode) (rcd-txt2tags-html-preview)) ((eq major-mode 'text-mode) (rcd-template-buffer-preview)) ((eq major-mode 'mail-mode) (rcd-template-buffer-preview)) (t (warn "I don't have preview for `%s'" major-mode)))) Example preview function: (defun rcd-template-buffer-preview () (interactive) (let* ((current (current-buffer)) (buffer (format "Preview of buffer %s" current)) (string (buffer-string)) (mode major-mode) (point (point))) (pop-to-buffer-same-window buffer) (insert (rcd-template-eval string)) (goto-char point) (funcall mode) (message buffer))) That function uses rcd-template-eval so it means: ⟦ emacs-version ⟧ becomes "29.0.50" Thus I would like to cover ⟦ ⟧ delimiters to become button which name and action will be returned by the function itself. I know how to replace the buffer with interpolated values, and links would appear, but when I save buffer, ⟦ ⟧ links would not appear. I can use any delimiters. It would be good to have generalized Org-link descriptive and non-descriptive links for any kinds of links. - let us say that buffer is in markdown-mode - let us imagine that link is (link "Name of link" 12) where by 12 is ID of the link and where by "link" is function that provides button with button name "Name of link" and action that could be anything. - function "link" would then recognize that it is in major-mode like "markdown", and thus invoke formatting proper for markdown, something like this: ⟦ (cond (rcd::description (format "[%s](%s \"%s\") - %s" rcd::name rcd::link rcd::name rcd::description)) (rcd::name (format "[%s](%s \"%s\")" rcd::name rcd::link rcd::name)) (t (format "<%s>" rcd::link))) ⟧ but if text is in Org mode, it would invoke different formatting: ⟦ (format "[[%s][%s \"%s\"]" rcd::link rcd::name)) ⟧ For that to work in editing mode (not only in presentation), I would need generic library to capture my ⟦ ⟧ delimiters (or others) and that when buffer is interpolated, that it can be saved so that links are also saved, and not that interpolated values are saved instead of links; also that one can show back the buffer without interpolated values. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/ ⟦ (hyperscope-link 72828) ⟧