emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bzg@gnu.org: Re: bug#42484: 26.1: org-mode should display value of links in mini-buffer]
@ 2020-09-06  9:03 Boruch Baum
  2020-09-06 14:18 ` Kévin Le Gouguec
  0 siblings, 1 reply; 4+ messages in thread
From: Boruch Baum @ 2020-09-06  9:03 UTC (permalink / raw)
  To: emacs-orgmode

----- Forwarded message from Bastien <bzg@gnu.org> -----

Date: Sun, 06 Sep 2020 10:21:33 +0200
From: Bastien <bzg@gnu.org>
To: Boruch Baum <boruch_baum@gmx.com>
Cc: 42484-done@debbugs.gnu.org
Subject: Re: bug#42484: 26.1: org-mode should display value of links in mini-buffer
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Boruch,

Boruch Baum <boruch_baum@gmx.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).

Can you suggest this feature to the Org list at emacs-orgmode@gnu.org?

Such "electric" display could sure be useful, but I would like to get
feedback from other Org contributors and users before accepting a patch.

I'm closing this as this is not an Emacs bug.

Thanks,

--
 Bastien

----- End forwarded message -----

--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [bzg@gnu.org: Re: bug#42484: 26.1: org-mode should display value of links in mini-buffer]
  2020-09-06  9:03 [bzg@gnu.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
  0 siblings, 1 reply; 4+ messages in thread
From: Kévin Le Gouguec @ 2020-09-06 14:18 UTC (permalink / raw)
  To: Boruch Baum; +Cc: emacs-orgmode

> Boruch Baum <boruch_baum@gmx.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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug#42484: org-mode should display value of links in mini-buffer
  2020-09-06 14:18 ` Kévin Le Gouguec
@ 2020-09-10 14:33   ` Maxim Nikulin
  2020-09-10 22:30     ` Samuel Wales
  0 siblings, 1 reply; 4+ messages in thread
From: Maxim Nikulin @ 2020-09-10 14:33 UTC (permalink / raw)
  To: emacs-orgmode

06.09.2020 21:18, Kévin Le Gouguec wrote:
>> Boruch Baum <boruch_baum@gmx.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 thread:
https://orgmode.org/list/CAJ51ETo0x=ZRAV7LFuDVAp7D2Pz-DUHzCrUt+GUby0sLSSwi7w@mail.gmail.com/



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: bug#42484: org-mode should display value of links in mini-buffer
  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
  0 siblings, 0 replies; 4+ messages in thread
From: Samuel Wales @ 2020-09-10 22:30 UTC (permalink / raw)
  To: Maxim Nikulin; +Cc: emacs-orgmode

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
(with-no-warnings
  (if (< emacs-major-version 24)
      (setq tooltip-use-echo-area t)
    (tooltip-mode -1)))

(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.
  (global-eldoc-mode -1))
;; 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)
;; [[http://google.com][test]]
;; 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
  (let ((val
         (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
'alpha-eldoc-timestamp-hook)
             ;; (run-hooks alpha-eldoc-non-help-echo-hook)
             )))
    val))
;; (alpha-eldoc-help-echo-mode)
(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/."
  (interactive)
  (eval-when-compile (require 'eldoc))
  (setq-local eldoc-documentation-function 'hoka-eldoc-help-echo-at-point)
  (eldoc-mode))




On 9/10/20, Maxim Nikulin <manikulin@gmail.com> wrote:
> 06.09.2020 21:18, Kévin Le Gouguec wrote:
>>> Boruch Baum <boruch_baum@gmx.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
> thread:
> https://orgmode.org/list/CAJ51ETo0x=ZRAV7LFuDVAp7D2Pz-DUHzCrUt+GUby0sLSSwi7w@mail.gmail.com/
>
>
>


-- 
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-10 22:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06  9:03 [bzg@gnu.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

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).