emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display in minibuffer link under point


From: Garjola Dindi
Subject: Re: Display in minibuffer link under point
Date: Sat, 16 May 2020 18:07:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On Mon 11-May-2020 at 17:53:06 +02, John Kitchin
<address@hidden> wrote: 
> org-ref doesn't do anything fancy here, it just runs an idle timer:
>
> https://github.com/jkitchin/org-ref/blob/master/org-ref-core.el#L597
>
> that runs a function defined at
> https://github.com/jkitchin/org-ref/blob/master/org-ref-core.el#L3633
>
> that function is kind of long because it computes the message, and only
> in specific contexts.
>

Hi,

This is what I did:

(when (not (or (looking-at " ") ;looking at a space
                 (looking-at "^$")      ;looking at a blank line
                 (looking-at "]")       ;looking at a bracket at the end
                                        ;looking at the end of the line.
                 (looking-at "$")))

    (save-restriction
      (widen)
      (when (eq major-mode 'org-mode)
        (let* ((object (org-element-context))
               (type (org-element-property :type object))
               (link-content (org-element-property :path object)))
          (save-excursion
            (message "%s:%s" type link-content))))))


It seems to do what I want.

Thank you very much for your help.

Garjola


> Garjola Dindi <address@hidden> writes:
>
>> Hi,
>>
>> Thanks both of you for your answers.
>>
>> What would be the way to automatically trigger =display-local-help= when the 
>> point is on the link? Org-ref does that beautifully ;)
>>
>> Thanks again.
>>
>> Garjola
>>
>> On Fri 08-May-2020 at 22:48:37 +02, John Kitchin <address@hidden> wrote:
>>> It looks like that variable is obsolete now since Emacs 24.1, and 
>>> (tooltip-mode -1) is probably the way to get the same thing now.
>>>
>>> John
>>>
>>> -----------------------------------
>>> Professor John Kitchin
>>> Doherty Hall A207F
>>> Department of Chemical Engineering
>>> Carnegie Mellon University
>>> Pittsburgh, PA 15213
>>> 412-268-7803
>>> @johnkitchin
>>> http://kitchingroup.cheme.cmu.edu
>>>
>>> On Fri, May 8, 2020 at 1:18 PM briangpowell . <address@hidden> wrote:
>>>
>>>  I use this variable to toggle my Gnu Emacs Org-Mode buffer into an audio 
>>> desktop:
>>>
>>>  (setq tooltip-use-echo-area (not tooltip-use-echo-area))
>>>
>>>  Of course I had to do some programming to do that but the above should get 
>>> you started
>>>
>>>  And we can leave that programming as an exercise for the class--right Dr. 
>>> Kitchin?
>>>
>>>  ;-)
>>>
>>>  On Fri, May 8, 2020 at 9:19 AM John Kitchin <address@hidden> wrote:
>>>
>>>  M-x display-local-help might do it.
>>>
>>>  John
>>>
>>>  -----------------------------------
>>>  Professor John Kitchin
>>>  Doherty Hall A207F
>>>  Department of Chemical Engineering
>>>  Carnegie Mellon University
>>>  Pittsburgh, PA 15213
>>>  412-268-7803
>>>  @johnkitchin
>>>  http://kitchingroup.cheme.cmu.edu
>>>
>>>  On Fri, May 8, 2020 at 9:15 AM Garjola Dindi <address@hidden> wrote:
>>>
>>>  Hi,
>>>
>>>  Is there a way to display in the minibuffer the URL of the link under
>>>  the point in the same way as when the mouse pointer is over the link?
>>>
>>>  Thanks!
>>>
>>>  Garjola
>>>  --
>
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
-- 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]