From: Samuel Wales <firstname.lastname@example.org>
To: Maxim Nikulin <email@example.com>
Subject: Re: bug#42484: org-mode should display value of links in mini-buffer
Date: Thu, 10 Sep 2020 15:30:22 -0700 [thread overview]
Message-ID: <CAJcAo8uwJESZXKPB_aNuV=5v1i3biVxnFu-Tg+7Zw8jHseYHgw@mail.gmail.com> (raw)
the problem for eldoc for me is that for some reason it gets pretty
confusing trying to implement lots of things all at once, at least
when emacs is already using it for something, or so.
here is my current jumble of code. it does work. and has comments
but idk if it is of any use. or even understandable to anybody.
one other use for it that i have not gotten to in yeras but woulkd be
good is to have hovering over timestamps show you the number of days
from now to that timestamp.
so lots of uses for eldoc.
;; hover text
(if (< emacs-major-version 24)
(setq tooltip-use-echo-area t)
(unless (version< emacs-version "25")
;; i find this annoying in at least elisp, and prefer my
;; function enabled in elisp, which does interesting things for
;; org-link-minor-mode. emacs 25 enables this by default. it
;; might be itneresting to see where eldoc is useful.
;; make pointer emit help-echo
;; over org links
;; (setq eldoc-idle-delay 8.0)
;; (setq eldoc-idle-delay 0.0)
;; (add-hook 'prog-mode-hook 'eldoc-mode)
;; fixme why does this not work in either org or elisp?
;; because there is no help-echo
;; fixme add help-echo
;; [2017-01-16 Mon 12:48]
;; fixme why does this work on links in elisp without this hook?
;; (add-hook 'prog-mode-hook 'alpha-eldoc-help-echo-mode)
;; (add-hook 'org-link-minor-mode-hook 'alpha-eldoc-help-echo-mode)
(add-hook 'org-mode-hook 'alpha-eldoc-help-echo-mode)
;; in elisp we might want both link eldoc and elisp eldoc
;; we also want org ts eldoc
(defun hoka-eldoc-help-echo-at-point ()
"Eldoc thingy for help-echo text properties.
This works for links, should work for tses in at least
org-link-minor mode and org mode, and is/was broken by emacs 25
enabling eldoc at some point. Fixing these things one by one."
;; does this mean we do this every movement?
;; apparently eldoc does
(or (get-text-property (point) 'help-echo)
;; fixme if at a timestamp (alpha-eldoc-time-span)
;; adding help echo time span to every timestamp
;; seems like it would require org
;; ;; (add-hook 'alpha-eldoc-non-help-echo-hook
;; (run-hooks alpha-eldoc-non-help-echo-hook)
(defun alpha-eldoc-help-echo-mode ()
"Enable eldoc mode with e.g. org links to display in minibuffer
when cursor is over them. Call in the relevant buffer. M-x
eldoc-mode to turn off. /Add this to mode hooks/."
(eval-when-compile (require 'eldoc))
(setq-local eldoc-documentation-function 'hoka-eldoc-help-echo-at-point)
On 9/10/20, Maxim Nikulin <firstname.lastname@example.org> wrote:
> 06.09.2020 21:18, Kévin Le Gouguec wrote:
>>> Boruch Baum <email@example.com> writes:
>>>> In org-mode, when POINT is moved over an org-mode link, wouldn't it be
>>>> reasonable for the value of that link to appear in the mini-buffer? The
>>>> advantage of that is the user would know where the link points and what
>>>> would happen if the link is opened (eg. would an external program open,
>>>> would the network be queried).
>> That would be very welcome, IMO. FWIW, markdown-mode does that (when
>> markup is hidden) using ElDoc; cf. markdown-eldoc-function.
> There was a similar question in May. A message in the middle of that
The Kafka Pandemic
Please learn what misopathy is.
prev parent reply other threads:[~2020-09-10 22:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-06 9:03 [firstname.lastname@example.org: Re: bug#42484: 26.1: org-mode should display value of links in mini-buffer] Boruch Baum
2020-09-06 14:18 ` Kévin Le Gouguec
2020-09-10 14:33 ` bug#42484: org-mode should display value of links in mini-buffer Maxim Nikulin
2020-09-10 22:30 ` Samuel Wales [this message]
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 \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public 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).