emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Maxim Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bring up a screen giving option to open a series of orgmode files
Date: Sat, 28 Nov 2020 20:59:34 +0300	[thread overview]
Message-ID: <X8KQBXApsB+tsoU2@protected.rcdrun.com> (raw)
In-Reply-To: <rptrlk$3qp$1@ciao.gmane.io>

* Maxim Nikulin <manikulin@gmail.com> [2020-11-28 18:52]:
  :CREATED:  [2020-11-28 Sat 19:55]
  :ID:       60f81bc3-5122-44d6-87b6-d8554fc6a6b4
> 2020-11-27 Jean Louis wrote:
> > 
> > Now we have `evince' PDF viewer that can open PDF I think by page
> > number and by query but it cannot do the equivalent
> > `evince-store-link' so user has to think about the file name and page
> > number and so on.
> However xpdf (evince predecessor in respect to PDF engine) allows to
> define custom bindings in config file, so store link could be
> implemented. It seems, the feature was lost on the way to
> user-friendly interface. Unsure but maybe store link could be
> configured for browser built-in PDF viewers.

Myself I was not aware of history of hyperlinks but when we look back
to Memex and Engelbart, it becomes clear that we wasted more than half
century without implementing what is useful.

Any viewer should have option to quickly construct a hyperlink and
store it somewhere with its annotation and other meta data so that
such can be reused by any other program. And viewer should have option
to directly access such reference from command line or by invoking it
from other program. Both the viewer author or party producing that
software and other software that hyperlinks by using some program are
benefiting from it.

Maybe evince and various PDF viewers and their maintainers can be
convinced to include those very simple functions. PDF often have meta
data usable for referencing, and if such does not exist then specific
page ID, query or match can be used. I will ask Evince maintainers and
other PDF viewer authors then mpv, mplayer and VLC as well.

As if I can open video at specific time to be played then why I cannot
obtain the hyperlink by watching video. Sounds not logical to me.

Hyperlinks captured should not be related to Org. They should have
their own URIs and Org should know how to interpret its URIs.

List of URI Schemes

I know that Org is using something as file:something::12 but not sure
if it really supports for example PDF for page number, query or
match. It should.

It should support video by its specific start time to be played or
sound to be played all or by specific start time or time period.

In general many of those URI schemes should be built-in into Org. Most
of them are already built-in into Emacs but their handlers are
not. The development version of Emacs has now browse-url-handlers and
that allows for any URI to be opened within Emacs. Org mode is not
necessary, only goto-browse-mode.

> > We have browsers that each of them think for themselves. Each can
> > store bookmarks but hardly provide such to external programs.
> I agree that bookmarks as they implemented in browser is something poor.
> Forget external programs in the context of modern browsers (either you like
> it or not). De facto, extensions should communicate with HTTP servers, to
> protect users, access to filesystem is not allowed any more.

Alright, only if it would be that secure, then this type of advise
would not be there:

How to Run a More Secure Browser

I do remember before 15 years how I could offer a website to be
accessed by user and I could choose either to fully block and freeze
user's computer or to access file system of the user. Those are
exploits, and if those exploits still exist or not we cannot know
until we know.  What is known by experience is that browsers are not
quite secure.

Example like this https://en.wikipedia.org/wiki/JailbreakMe may be
today in other forms activated on people's computers.

> However some API to manipulate bookmarks exists, do not know if it
> is really useful:
> https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks

I have ceased using bookmarks in browsers. Org capture mechanism
allows bookmarking in a central system that may be managed by Emacs,
but as it is database it may be managed by simple command line tool
fzf and SQL or by awk and sed to choose a node or again Emacs on
command line, or Perl accessing the remote database or any other

When things are stored in the database access can be anyhow. I am also
thinking to devise way to store activation methods in the database
itself and not in the program accessing database.

> > Almost none browser can store specific paragraph based
> bookmark. They > rely mostly on anchors as finely specified
> greed. Bookmarks could be > by HTML page number or query or
> paragraph.  In principle, any paragraph could be addressed using
> XPath
> https://developer.mozilla.org/en-US/docs/Web/XPath/Introduction_to_using_XPath_in_JavaScript
> but it is extremely fragile since link will be likely invalid after
> web site redesign or modification of the text.

I am keeping references, thank you. It looks like low level API. It
does not matter for modifications as some documents are pretty static
and their revisions could have different URLs. Example is
documentation, books, instructions. In my personal case it can be
mineral processing information.

From the above link on XPath I have not figured out yet how to
generate a hyperlink to specific paragraph. I may spend days until I
figure it out.

> There is no interface for end users but web developers use it for UI
> tests if there is no more reliable option.  There was text search
> addressing initiative "Scroll to text"
> https://github.com/WICG/scroll-to-text-fragment/ The problem that
> URLs have no room for such extension points and some web sites abuse
> #anchors to determine what content should be shown, so addressing of
> particular element is not possible at all.

This system solves the problem and there is the underlying Javascript

Hypothes.is Annotate the web, with anyone, anywhere.

I wish to solve the problem in providing annotiation in little bit
different way:

- hyperlink is activated from Org file or any other file or system

- on my side the hyperdocument is created and its hyperlink points to
  the unique ID while unique ID points to hyperdocument in question
  and also decides how such should be displayed, activated, etc.

  At this point I would like to have something like XPath, but that
  also means I have to invoke Javascript which then renders many
  browsers not usable. In general system like I envision should work
  equally well on the any browser, like Emacs eww or Lynx or just any

  I am also not implementing complex things, no complex templates or

- if something has to be annotated then hyperscope dynamic knowledge
  repository would invoke fetching, annotating, marking, generating
  and uploading the HTML page that would then show:

  - the title
  - annotations
  - text being annotated as published from database
  - original text below annotations as published originally but with
    stripped HTML, Javascript and other cruft.

  - hyperlink to original text

  - maybe, if browser allows it, frame of the original WWW page

  - web based password protection if necessary

Annotations and such hyperdocument with annotations of a specific
paragraph on other page, could be as well invoked from Org file

** Heading could have property below:
   ANNOTATION: [[annotate:URL:query-begin:query-end:][title of annotation]]

Annotation here could be long or paragraph or multiple paragraphs.

Now when user clicks on `annotate' hyperlink, Emacs Lisp program could

- verify on local file system if the HTML file is supposed to exist

- obtain heading title

- obtain title of annotation

- fetch the URL

- strip it from HTML and Javascript, etc

- find query-begin and query-end and markup the paragraph with some
  background color

- insert the heading of HTML file, annotations, the full original
  text, upload the file and generate the URL

  Alternative is not to do anything with original hyperlink but just
  to annotate such on a separate WWW page.

- URL would be static and never changing according to:

- URL would point to unique ID like example.com/1/2/3/324

- then send the URL to the person to which one is referencing. As
  annotations in local file for oneself is already there. If this all
  sounds complicated in reality is just some seconds of computer
  generating such HTML.

Any similar system is definitely necessary if one wish to share notes
or text with people online on the fly. It could be used for static
full website generation, but it is rather meant for sharing single
documents or annotations.

In general Org needs: "Share a note system"

The function below I am using for some years already to send an Org
heading to other person. It uses other functions such as automatic
choice of a person and gives audible announcement to people around the
staff member. Audible announcement of some computing functions helps
in coordination with present people, it is automated sharing by using

(defun rcd/org-send-assigned-task ()
  "Sends assigned task to designated individual as Org"
  (let* ((member-data (rcd-org-extract-assigned-member-email-data))
	 (id (if member-data (first member-data) nil))
	 (signature (if (equal (type-of (symbol-value (fifth member-data))) 'cons)
	 		(third (symbol-value (fifth member-data))) ""))
	 (file (rcd-org-subtree-to-file signature))
	 (subject (rcd/org-find-headline))
	 (esubject (escape-% subject))
	 (ask (unless id (y-or-n-p "No assignment found. Do you want to send it by email?")))
	 (name (if id (third member-data)))
	 ;; (name (if ask (read-from-minibuffer "Name:") name))
	 (voice (format "The task '%s' is being sent to '%s'" subject name))
	 (email (if id (if (equal (type-of (fourth member-data)) 'cons)
			   (car (fourth member-data))
			 (fourth member-data))))
	 (email (if ask (cf-search-email (read-from-minibuffer "Search for email: ")) email))
	 (really (y-or-n-p (format "Do you really want to send it to: %s?" (if ask email name)))))
    (if (and really (or id ask))
      (if (string-match "@" email)
	  ;; (message (escape-% subject))
	  (speak voice)
	  (mutt-send-file name email esubject file))
	(message "No email specified"))
      (message "Aborted sending."))))

the above function that automatically searches for valid email
addresses among several, for person to which task is assigned, and
that chooses right signature amont several for different
organizations, may be simplified to this:

(defun my-org-send-heading ()
  "Sends heading by email"
  (let* ((heading (org-with-wide-buffer
		   (org-back-to-heading t)
		   (let ((case-fold-search nil))
		     (when (looking-at org-complex-heading-regexp)
		       (match-string-no-properties 4)))))
	 (subtree (org-copy-subtree)))
    (compose-mail-other-window nil heading)
    (forward-line 1)
    (insert (pop kill-ring))
    (mail-position-on-field "to")))

then by invoking M-x my-org-send-heading user can quickly open up the
Emacs built-in sendmail interface with prepared message. Then email
address may be selected and email sent.

This type of integrations with people I miss in Org. My surprise was
big when I realized that Org is there with features to manage tasks
but does not offer feature to "send the task". User is supposed to
compose the email, kill and yank, copy and paste. All those small
things mean that more time and effort is spent.

Tasks or notes should be quickly shareable or be capable of being sent
to different objects and places:

- to speak loud by computer the heading and text under
  heading. Instead of people reading, people may also listen if they
  are close to loudspeakers. I am using `festival' as it has built-in
  Emacs package that allows pretty nice speech. {M-x org-heading-speak-it}

- to be shared by email easily and that with the favorite email
  client. Not just Emacs. 

- to be sent by SMS by using kdeconnect, gnokii or twilio or other
  systems by using something like {M-x org-heading-to-sms} where
  subsequently proper contact would be chosen.

- to be sent by XMPP messenger or other types of messengers. User
  should be able to simply do {M-x org-heading-to-xmpp} where
  subsequent group or target conversant would be chosen.

- to be posted on Fediverss social networking or other social networks
  without user pressing many keys. If the Fediverse or social account
  has been defined already, then one command like
  {M-x org-heading-pleroma} or {M-x org-heading-mastodon} should be
  enough for heading to be posted and formatted appropriately.

- to be prepared quickly as PDF and sent to the printer. If task is
  assigned to person, why then operator of Org file need to: open Org
  export, decide to narrow export to the selected heading, choose the
  PDF, open PDF, print PDF. Those are many repetitive actions. Instead
  user should be able to invoke a command: M-x org-print-heading and
  finished. The printer prints it. Or fax faxes it.



  reply	other threads:[~2020-11-28 18:05 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-22 10:01 Gerardo Moro
2020-11-22 10:09 ` Jean Louis
2020-11-22 17:35   ` Berry, Charles via General discussions about Org-mode.
2020-11-22 18:33     ` Jean Louis
2020-11-22 19:03     ` Gerardo Moro
2020-11-22 19:15       ` Jean Louis
2020-11-23  3:59         ` Gerardo Moro
2020-11-23  5:21           ` Jean Louis
2020-11-23  8:12             ` Ihor Radchenko
2020-11-23  8:40               ` Gerardo Moro
2020-11-23  9:11                 ` Ihor Radchenko
2020-11-23  9:14                   ` Gerardo Moro
2020-11-23  9:14               ` Jean Louis
2020-11-24  4:07                 ` Gerardo Moro
2020-11-24  7:26                   ` Ihor Radchenko
2020-11-24  7:23                 ` Ihor Radchenko
2020-11-24  9:28                   ` Gerardo Moro
2020-11-24  9:57                     ` Ihor Radchenko
2020-11-24 16:26                       ` Jean Louis
2020-11-25  3:41                         ` Ihor Radchenko
2020-11-25  5:36                           ` Jean Louis
2020-11-25  7:15                             ` Ihor Radchenko
2020-11-25 11:20                               ` Browser org-capture bookmarklet Jean Louis
2020-11-25 12:51                                 ` Ihor Radchenko
2020-11-25 14:12                                   ` Jean Louis
2020-11-25 14:50                                   ` Jean Louis
2020-12-02  9:07                               ` Bring up a screen giving option to open a series of orgmode files Jean Louis
2020-12-02  9:53                                 ` Ihor Radchenko
2020-12-02 10:19                                   ` Jean Louis
2020-12-02  9:24                               ` Jean Louis
2020-12-02  9:56                                 ` Ihor Radchenko
2020-12-02 10:14                                   ` Jean Louis
2020-11-24 17:41                       ` Jean Louis
2020-12-02 10:17                       ` Maxim Nikulin
2020-11-27  2:40                   ` Jean Louis
2020-11-27  8:15                     ` Alan Schmitt
2020-11-27 12:04                       ` Jean Louis
2020-11-28 16:12                         ` Maxim Nikulin
2020-11-28 18:10                           ` Jean Louis
2020-11-28 15:51                     ` Maxim Nikulin
2020-11-28 17:59                       ` Jean Louis [this message]
2020-11-30  9:35                         ` Ihor Radchenko
2020-11-30 10:45                           ` Jean Louis
2020-12-01  2:38                             ` Ihor Radchenko
2020-12-01 10:30                               ` Jean Louis
2020-11-30 17:08                         ` Maxim Nikulin
2020-11-30 18:33                           ` Jean Louis
2020-12-02 16:41                             ` Maxim Nikulin
2020-12-02 17:24                               ` Jean Louis
2020-12-09 13:00                               ` Jean Louis
2020-12-09 15:03                                 ` Maxim Nikulin
2020-12-09 16:32                                   ` Jean Louis
2020-12-09 16:49                                     ` Maxim Nikulin
2020-12-10  0:04                                     ` Ihor Radchenko
2020-12-11  6:54                                       ` Jean Louis
2020-12-11 14:40                                         ` Maxim Nikulin
2020-12-11 15:22                                           ` Ihor Radchenko
2020-12-12  3:22                                             ` Jean Louis
2020-12-13  0:42                                               ` Ihor Radchenko
2020-12-13 15:00                                                 ` Jean Louis
2020-12-14 12:58                                                   ` Ihor Radchenko
2020-12-14 19:08                                                     ` Jean Louis
2020-12-14 22:27                                                       ` TRS-80
2020-12-14 22:33                                                         ` Jean Louis
2020-12-15  4:42                                                         ` Ihor Radchenko
2020-12-15  5:00                                                           ` Jean Louis
2020-12-16  2:59                                                             ` Ihor Radchenko
2020-12-16  4:05                                                               ` Tom Gillespie
2020-12-18 12:35                                                               ` Jean Louis
2020-12-16  1:48                                                           ` TRS-80
2020-12-16 12:40                                                           ` Maxim Nikulin
2020-12-12  2:49                                           ` Jean Louis
2020-12-13  0:48                                             ` Ihor Radchenko
2020-12-13 15:13                                               ` Jean Louis
2020-12-13 18:02                                                 ` Christopher Dimech
2020-12-13 20:31                                                   ` Jean Louis
2020-12-14  0:34                                                 ` Ihor Radchenko
2020-12-14  0:34                                                   ` Jean Louis
2020-12-14  0:35                                                 ` Ihor Radchenko
     [not found]                     ` <874kl7172r.fsf@localhost>
2020-11-30 10:51                       ` Jean Louis
2020-11-22 21:23       ` Berry, Charles via General discussions about Org-mode.
2020-11-23  9:52 ` Diego Zamboni
2020-11-23 21:04   ` Jean Louis
2020-11-24  9:53 ` John Sturdy
2020-11-24 10:04   ` Detlef Steuer
2020-11-24 13:44     ` Jean Louis
2020-11-24 14:38   ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X8KQBXApsB+tsoU2@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    --subject='Re: Bring up a screen giving option to open a series of orgmode files' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).