From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 2JjmDGKRwl8FTAAA0tVLHw (envelope-from ) for ; Sat, 28 Nov 2020 18:05:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id sDKhCGKRwl/3BQAAbx9fmQ (envelope-from ) for ; Sat, 28 Nov 2020 18:05:22 +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 39ED19402C8 for ; Sat, 28 Nov 2020 18:05:21 +0000 (UTC) Received: from localhost ([::1]:48440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kj4b0-0002lX-Ir for larch@yhetil.org; Sat, 28 Nov 2020 13:05:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj4aO-0002lB-Sy for emacs-orgmode@gnu.org; Sat, 28 Nov 2020 13:04:40 -0500 Received: from static.rcdrun.com ([95.85.24.50]:36657) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj4aL-00013W-S1 for emacs-orgmode@gnu.org; Sat, 28 Nov 2020 13:04:40 -0500 Received: from localhost ([::ffff:197.157.0.29]) (AUTH: PLAIN admin, TLS: TLS1.2,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by static.rcdrun.com with ESMTPSA id 00000000002C000B.000000005FC29133.00006857; Sat, 28 Nov 2020 18:04:34 +0000 Date: Sat, 28 Nov 2020 20:59:34 +0300 From: Jean Louis To: Maxim Nikulin Subject: Re: Bring up a screen giving option to open a series of orgmode files Message-ID: References: <169441F9-83D6-4D0F-8A23-1923B44F7C0A@health.ucsd.edu> <87eekkcwzs.fsf@localhost> <874klfcj5k.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0 (3d08634) (2020-11-07) Received-SPF: pass client-ip=95.85.24.50; envelope-from=bugs@gnu.support; helo=static.rcdrun.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.77 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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-TUID: q20vmud2DMO9 * Maxim Nikulin [2020-11-28 18:52]: :PROPERTIES: :CREATED: [2020-11-28 Sat 19:55] :ID: 60f81bc3-5122-44d6-87b6-d8554fc6a6b4 :END: > 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 https://en.wikipedia.org/wiki/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 https://www.dragonflybsd.org/docs/handbook/RunSecureBrowser/ 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 language. 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 library. Hypothes.is Annotate the web, with anyone, anywhere. https://web.hypothes.is/ 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 browser. I am also not implementing complex things, no complex templates or similar. - 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 directly. ** 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 then: - 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: https://www.w3.org/Provider/Style/URI - 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 audio. (defun rcd/org-send-assigned-task () "Sends assigned task to designated individual as Org" (interactive) (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) (progn ;; (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" (interactive) (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) (rfc822-goto-eoh) (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. Jean