[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42484: 26.1: org-mode should display value of links in mini-buffer
From: |
Samuel Wales |
Subject: |
bug#42484: 26.1: org-mode should display value of links in mini-buffer |
Date: |
Thu, 14 Jan 2021 14:02:24 -0700 |
by activate i mean display, in echo area, whatever it is i want to
display. i think help-echo is a text property, and i might or might
not want to display it, depending. and i might want to display the
other stuff even if there is no help-echo.
i use [and adore] org-link-minor mode in elisp mode. it highlights
links and timestamps and makes links followable. i even use
[[target]] <<target>> within elisp buffers, and org id links that go
from elisp to org and vice-versa.
if org-link-minor-mode is active in an elisp buffer, i can run the
following to detect whether cursor is over an org ts.
(defun hoka-eldoc-at-point ()
(when (eq 'org-date (get-text-property (point) 'face))
(format "%s"
(when (fboundp 'alpha-org-time-span)
(with-no-warnings
(alpha-org-time-span))))))
then i get the time span in the echo area. a time span is e.g. -1 for
yesterday. it could just as well be a timestamp in a different format
or lang. so that's great. but i want mouse hover to do the same
thing, and to do so with a delay. and i want links of course.
more generally, i might occasionally want /some/ eldoc type stuff and
/some/ help-echo stuff.
so org-link-minor-mode was useful in my case because it [i think it is
it] adds face property which can be used. and i thought that might be
useful to you. idk though.
in my case i find it a bit overwhelming to get whatever solution i use
for cursor to also work for mouse [with appropriate delays]. and get
whatever else to work and to not have anything annoyingly display.
On 1/14/21, Juri Linkov <juri@linkov.net> wrote:
>> this is an interesting discussion. is there any side discussion that
>> takes into account both mouse and cursor?
>
> Indeed, you can see a side discussion at
> https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00885.html
> where we discussed highlighting the completion candidate
> the same way whether the mouse pointer hovered over it,
> or the cursor moved to its buffer position.
>
> That discussion also mentions another way to display
> help-text using cursor-sensor-mode, i.e. after enabling it,
> cursor-sensor-functions can detect when the cursor enters
> the help-text property, then display it in the echo area.
>
>> 1] displaying value of link in echo area [the problem you are
>> discussing -- don't let me derail it] with a short nonzero delay
>> 2] doing so *for both cursor and mouse* -- too much futzing here
>> 3] also doing other stuff -- also futzing
>>
>> other stuff includes maybe [or maybe not] showing function signature
>> or docstrings in elisp buffers [possibly with longer delay], and
>> showing the time span in number of days from now to the org timestamp
>> at point or under mouse in any mode.
>
> This looks like the 5th possible way to implement this using eldoc,
> in addition to tooltips, post-command-hook, help-at-pt, cursor-sensor-mode.
>
>> i have code for the last thing. the problem is figuring out making
>> tooltips, eldoc, help-at-pt, or post-command-hook work with mouse
>> and keyboard without verbose help-echo like in dired. also the
>> major/minor modes and
>
> help-at-pt has an option to ignore verbose help-echo in dired.
> post-command-hook can be enabled locally only in org-mode buffers.
> I don't know how to do the same in eldoc.
>
>> i guess i am saying [back to topic] this is a bit complex and i wonder
>> if a more orthogonal solution is called for? as some might want mouse
>> activation also, and eldoc already shows elisp stuff.
>>
>> and another suggestion: org-link-minor-mode is what i might use to
>> identify when to activate org links and timestamps.
>
> You mean to activate is to display their help-echo?
>
--
The Kafka Pandemic
Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Juri Linkov, 2021/01/11
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Boruch Baum, 2021/01/12
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Juri Linkov, 2021/01/12
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Boruch Baum, 2021/01/13
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Juri Linkov, 2021/01/13
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Samuel Wales, 2021/01/13
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Samuel Wales, 2021/01/13
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Samuel Wales, 2021/01/13
- bug#42484: 26.1: org-mode should display value of links in mini-buffer, Juri Linkov, 2021/01/14
- bug#42484: 26.1: org-mode should display value of links in mini-buffer,
Samuel Wales <=