From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MP1xGk542F8yOQAA0tVLHw (envelope-from ) for ; Tue, 15 Dec 2020 08:48:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CIREFk542F+mJwAAB5/wlQ (envelope-from ) for ; Tue, 15 Dec 2020 08:48:14 +0000 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 7D2F99403AC for ; Tue, 15 Dec 2020 08:48:13 +0000 (UTC) Received: from localhost ([::1]:45960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kp60C-0000rh-Di for larch@yhetil.org; Tue, 15 Dec 2020 03:48:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kp5zJ-0000rU-A7 for emacs-orgmode@gnu.org; Tue, 15 Dec 2020 03:47:17 -0500 Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]:46599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kp5zG-000590-MY; Tue, 15 Dec 2020 03:47:16 -0500 Received: by mail-vs1-xe2f.google.com with SMTP id q10so10536695vsr.13; Tue, 15 Dec 2020 00:47:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W2fo2nUyDoTcBpaaS28tA1e1e4tdFvlwP5CNWg4U3Xk=; b=LGUI03JTuEhP275Vr1ZGjLe6i5qoJys/AiZbUH5G1eOjXokOKkSYBD7yFKrU/Qrqs1 rQbGrAzTK7QvMMf/w907c2Ptt8NAoGMBn1jmnF1hEyCYlOYA1dyz8+1FrUQiCfWQ+6xb eF82e8Nq5igXIaNedaULnX4UWU5Td48YHR6Oc/pxAky3a96ZLhP9mOMU99Wuw+LE7ctz KTeXXI7Uumfx9bk3lD3U41BZgTDu+Mwv9HAOt/VUcDWkuYNXgGI0AWqbZFiDbsy6zoRh sl7nx4WRkqQiPDzdsNCAjSPxwldniFRLrH30YmjppTurAdCg364GiNrechjPcedvTNb2 Fp7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W2fo2nUyDoTcBpaaS28tA1e1e4tdFvlwP5CNWg4U3Xk=; b=IXvtEgAJwZ2io0XF3SG59FkqTboJpVElOXk1SClfQAenHUom0/nPj9G6pGM5AxezEU IGenx4UX0W0D5o8EKx+lq9eAjrWVQq136TX6jI1C4aRrjG/KSrrA8qvvakZE8rJKG6Gg emCvSaVKn1hSYjqFd0TPfYJRlirzCd+gkSyvwe5oHd3CRjncdz6Jn/xxxfPD/Q3xmDAz qX2NpS9kHgPhantqrSDX+LpZsFTnaQB8vAdXL/gygMxsMptcFhc6JuZunha9guALVMfV xwel6gWhzCXKdHXQKQyJ113955R+3j5fbNyLm++EA5MH/i22ClvBtnxK0Abzv3DTHfxd ILcA== X-Gm-Message-State: AOAM530aNUpmLYlTt8p4LFkXgkOUoMHX+rz0elxClLvslrPWrVsDBDzp yte9DY3gHTp8rawyvneyXvASj0tj17j40Ljvhg== X-Google-Smtp-Source: ABdhPJyW0nwkbIYGqxBalRbCT1dqSS/hnB9V0Lkl/yGd9CrREMhbRbsA0Gu7cqaTfT6Q2Wv+xI6CZljs3AnLVfFtjm4= X-Received: by 2002:a67:2cc2:: with SMTP id s185mr26496094vss.2.1608022032686; Tue, 15 Dec 2020 00:47:12 -0800 (PST) MIME-Version: 1.0 References: <874klwcmrk.fsf@gnu.org> <5fb25297.1c69fb81.324bc.4979@mx.google.com> In-Reply-To: From: stardiviner Date: Tue, 15 Dec 2020 16:46:46 +0800 Message-ID: Subject: Re: More on design of org-contacts.el - Re: [UPDATED PATCH] Re: add new link type "contact:" for org-contacts.el To: Jean Louis Content-Type: multipart/alternative; boundary="0000000000000ca43f05b67cce15" Received-SPF: pass client-ip=2607:f8b0:4864:20::e2f; envelope-from=numbchild@gmail.com; helo=mail-vs1-xe2f.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastien , julien@danjou.info, Org-mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=LGUI03JT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 7D2F99403AC X-Spam-Score: -3.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: iV+gCy3qImrW --0000000000000ca43f05b67cce15 Content-Type: text/plain; charset="UTF-8" Change an email is hard word for me. I use gmail address for many places. I started to use new email for new accounts recently. But switch email need to be later when I have time and desire. And thanks for your suggestion of mail services. :smile: [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Tue, Nov 17, 2020 at 2:50 PM Jean Louis wrote: > * stardiviner [2020-11-16 13:21]: > :PROPERTIES: > :ID: e2c30814-b983-4391-869a-3c700d041467 > :END: > > > > First, thank your very much for suggestion. > > > > What really I have not found your email in my Gmail (in web > > browser), > > Maybe because it went to Spam/Junk folder. For privacy and safety > reasons I do not recommend using Gmail at all. > > I may recommend using your own email address, requires some money, or > https://posteo.de/ https://tutanota.de/ or https://protonmail.ch/ > > > I found it in mu4e (Emacs). Which I can't reply because I'm in > > China, sendmail to Gmail SMTP server is blocked. So I'm replying you > > in mu4e. Don't know whether you can receive my message. > > I wish I could understand, mu4e is only local system that searches > emails on your computer. How you send emails depends on your email > provider. Maybe you fetch mailing list to search for emails? > > > Using unique ID is the only solution to identity contact. I already > thought > > about this. But integrating org-id is hard for me. Have not spent that > time on > > it yet. But I will, if I want to improve this org-contacts. > > If I may just give idea. I am using this below function to > automatically get ID numbers for headings. Normally it is by > saving. Maybe you can do something to automatically insert such > number. I do not know if heading is contact, but if it is, it becomes > all easier. > > (defun rcd-org-add-ids-to-headlines-in-file () > "Add ID properties to all headlines in the current file which > do not already have one." > (interactive) > (org-map-entries 'org-id-get-create)) > > > > Each hyperdocument (within or without Emacs) that allows back linking > > > to its specifical parts should have a function or key binding to > > > quickly obtain the link reference. > > Once you have decided how is contact referenced as now is referenced > by query, I could maybe figure how to obtain the reference. > > It should not be that hard: > > - find the current heading > > - find current ID number > > - how link should look like could be customizable, maybe heading as > visible part. That requires discussion. > > - prepare link into memory for pasting in other window or document. > > - it should also be possible to insert such into register. > > - the option to obtain link by query should be kept intact > > Maybe two keybindings or functions can be made: > > ** Proposal > :PROPERTIES: > :ID: a566d476-f478-44d8-8d91-53f6eccca10b > :END: > > 1. One that finds the current heading and obtains the link > > (defun capture-contact-by-query-to-heading () > (let* ((heading (org-get-heading)) > (link (format "[[org-contact:query#%s][%s]]" heading heading))) > (kill-new link))) > > (capture-contact-by-query-to-heading) > > => [[org-contact:query#Proposal][Proposal]] > > And such function should be expanded and be customizable: > > - maybe user wish to provide format string as maybe user wish to know > visually that link leads to contact like: > > => [[org-contact:query#John Doe][Contact: John Doe]] > > 2. One that finds currentheading by its ID and obtains the link: > > (defun capture-contact-by-id-to-heading-1 () > (let* ((heading (org-get-heading)) > (id (org-id-get)) > (link (format "[[org-contact:id#%s][%s]]" id heading))) > link)) > > (defun capture-contact-by-id-to-heading () > (kill-new (capture-contact-by-id-to-heading-1))) > > (capture-contact-by-id-to-heading) > > => [[org-contact:id#a566d476-f478-44d8-8d91-53f6eccca10b][Proposal]] > > These are design ideas only. You may expand and make checks on these > functions that such work properly. > > Additional functions that may be very usable is to quickly send links > to other window. User is collecting the database of contacts in one > file and one window and wishes to insert links into other window that > references such contacts. In that file where you need a link you would > arrive with cursor. Then you go to database of contacts and invoke a > key that sends the yanked org link into other window. > > (defun contact-yank-link-in-other-window () > (let ((link (capture-contact-by-id-to-heading-1))) > (kill-new link) > (other-window 1) > (yank) > (other-window 1) > (message "Yanked link: %s to other window" link))) > > It is up to you to expand or think on this as it is design > proposal. Not finalized function or feature. When we wish to > reference things we need it quick and fast. > > Org mode in general needs these types of functions: > > - to automatically obtain ANY link from Org mode to the heading > and not just for users to write the link by hand. Examples are: > > - link to specific line > > - link to query, when text is marked, that link may be constructed, > and also if necessary quickly inserted in other window (we use > links to reference from same buffer to same buffer or from other > buffer and file to other files). Such query could be automatically > minimized that it does not carry all the marked words. Few words > could be enough. > > - link to any heading or subheading by its name > > - link to any heading by its ID or CUSTOM_ID > > - and so on, there shall be various lists of links that can be > quickly constructed and killed into memory or yanked into other > window. > > - to automatically yank the link from one window to other window > as that helps to user to construct references. > > Then in general, ALL programs that allow any kind of referencing such > as opening PDF file by specific query, specific page, playing video at > specific time, or for specific short period of time, should provide > automated way of obtaining such structures to create hyperlinks. > > > > > > --0000000000000ca43f05b67cce15 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Change an email is hard word for me. I use gmail address f= or many places.
I started to use new email for new accounts recently.<= /div>
But switch email need to be later when I have time and desire.
An= d thanks for your suggestion of mail services. :smile:

[stardiviner]= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 <Hack this = world!>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GPG key ID: 47C32433
IRC(freeen= ode): stardiviner =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Twitter:=C2=A0 @n= umbchild
Key fingerprint =3D 9BAA 92BC CDDD B9EF 3B36=C2=A0 CB99 B8C4 B8= E5 47C3 2433
Blog: http://stardiviner.github.io/
<= br>

On Tue, Nov 17, 2020 at 2:50 PM Jean Louis <bugs@gnu.support> wrot= e:
* stardiviner= <numbchild@gma= il.com> [2020-11-16 13:21]:
:PROPERTIES:
:ID:=C2=A0 =C2=A0 =C2=A0 =C2=A0e2c30814-b983-4391-869a-3c700d041467
:END:
>
> First, thank your very much for suggestion.
>
> What really I have not found your email in my Gmail (in web
> browser),

Maybe because it went to Spam/Junk folder. For privacy and safety
reasons I do not recommend using Gmail at all.

I may recommend using your own email address, requires some money, or
https:/= /posteo.de/ https://tutanota.de/ or https://protonmail.ch/

> I found it in mu4e (Emacs). Which I can't reply because I'm in=
> China, sendmail to Gmail SMTP server is blocked. So I'm replying y= ou
> in mu4e. Don't know whether you can receive my message.

I wish I could understand, mu4e is only local system that searches
emails on your computer. How you send emails depends on your email
provider. Maybe you fetch mailing list to search for emails?

> Using unique ID is the only solution to identity contact. I already th= ought
> about this. But integrating org-id is hard for me. Have not spent that= time on
> it yet. But I will, if I want to improve this org-contacts.

If I may just give idea. I am using this below function to
automatically get ID numbers for headings. Normally it is by
saving. Maybe you can do something to automatically insert such
number. I do not know if heading is contact, but if it is, it becomes
all easier.

(defun rcd-org-add-ids-to-headlines-in-file ()
=C2=A0 "Add ID properties to all headlines in the current file which do not already have one."
=C2=A0 (interactive)
=C2=A0 (org-map-entries 'org-id-get-create))

> > Each hyperdocument (within or without Emacs) that allows back lin= king
> > to its specifical parts should have a function or key binding to<= br> > > quickly obtain the link reference.

Once you have decided how is contact referenced as now is referenced
by query, I could maybe figure how to obtain the reference.

It should not be that hard:

- find the current heading

- find current ID number

- how link should look like could be customizable, maybe heading as
=C2=A0 visible part. That requires discussion.

- prepare link into memory for pasting in other window or document.

- it should also be possible to insert such into register.

- the option to obtain link by query should be kept intact

Maybe two keybindings or functions can be made:

** Proposal
:PROPERTIES:
:ID:=C2=A0 =C2=A0 =C2=A0 =C2=A0a566d476-f478-44d8-8d91-53f6eccca10b
:END:

1. One that finds the current heading and obtains the link

(defun capture-contact-by-query-to-heading ()
=C2=A0 (let* ((heading (org-get-heading))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(link (format "[[org-contact:query#%= s][%s]]" heading heading)))
=C2=A0 =C2=A0 (kill-new link)))

(capture-contact-by-query-to-heading)

=3D> [[org-contact:query#Proposal][Proposal]]

And such function should be expanded and be customizable:

- maybe user wish to provide format string as maybe user wish to know
=C2=A0 visually that link leads to contact like:

=3D> [[org-contact:query#John Doe][Contact: John Doe]]

2. One that finds currentheading by its ID and obtains the link:

(defun capture-contact-by-id-to-heading-1 ()
=C2=A0 (let* ((heading (org-get-heading))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(id (org-id-get))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(link (format "[[org-contact:id#%s][= %s]]" id heading)))
=C2=A0 =C2=A0 link))

(defun capture-contact-by-id-to-heading ()
=C2=A0 (kill-new (capture-contact-by-id-to-heading-1)))

(capture-contact-by-id-to-heading)

=3D> [[org-contact:id#a566d476-f478-44d8-8d91-53f6eccca10b][Proposal]]
These are design ideas only. You may expand and make checks on these
functions that such work properly.

Additional functions that may be very usable is to quickly send links
to other window. User is collecting the database of contacts in one
file and one window and wishes to insert links into other window that
references such contacts. In that file where you need a link you would
arrive with cursor. Then you go to database of contacts and invoke a
key that sends the yanked org link into other window.

(defun contact-yank-link-in-other-window ()
=C2=A0 (let ((link (capture-contact-by-id-to-heading-1)))
=C2=A0 =C2=A0 (kill-new link)
=C2=A0 =C2=A0 (other-window 1)
=C2=A0 =C2=A0 (yank)
=C2=A0 =C2=A0 (other-window 1)
=C2=A0 =C2=A0 (message "Yanked link: %s to other window" link)))<= br>
It is up to you to expand or think on this as it is design
proposal. Not finalized function or feature. When we wish to
reference things we need it quick and fast.

Org mode in general needs these types of functions:

- to automatically obtain ANY link from Org mode to the heading
=C2=A0 and not just for users to write the link by hand. Examples are:

=C2=A0 - link to specific line

=C2=A0 - link to query, when text is marked, that link may be constructed,<= br> =C2=A0 =C2=A0 and also if necessary quickly inserted in other window (we us= e
=C2=A0 =C2=A0 links to reference from same buffer to same buffer or from ot= her
=C2=A0 =C2=A0 buffer and file to other files). Such query could be automati= cally
=C2=A0 =C2=A0 minimized that it does not carry all the marked words. Few wo= rds
=C2=A0 =C2=A0 could be enough.

=C2=A0 - link to any heading or subheading by its name

=C2=A0 - link to any heading by its ID or CUSTOM_ID

=C2=A0 - and so on, there shall be various lists of links that can be
=C2=A0 =C2=A0 quickly constructed and killed into memory or yanked into oth= er
=C2=A0 =C2=A0 window.

- to automatically yank the link from one window to other window
=C2=A0 as that helps to user to construct references.

Then in general, ALL programs that allow any kind of referencing such
as opening PDF file by specific query, specific page, playing video at
specific time, or for specific short period of time, should provide
automated way of obtaining such structures to create hyperlinks.





--0000000000000ca43f05b67cce15--