emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Display in minibuffer link under point
@ 2020-05-08 13:11 Garjola Dindi
  2020-05-08 13:16 ` John Kitchin
  0 siblings, 1 reply; 7+ messages in thread
From: Garjola Dindi @ 2020-05-08 13:11 UTC (permalink / raw)
  To: emacs-orgmode

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



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

* Re: Display in minibuffer link under point
  2020-05-08 13:11 Display in minibuffer link under point Garjola Dindi
@ 2020-05-08 13:16 ` John Kitchin
  2020-05-08 17:18   ` briangpowell .
  0 siblings, 1 reply; 7+ messages in thread
From: John Kitchin @ 2020-05-08 13:16 UTC (permalink / raw)
  To: Garjola Dindi; +Cc: org-mode-email

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

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 <garjola@garjola.net> 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
> --
>
>
>

[-- Attachment #2: Type: text/html, Size: 1135 bytes --]

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

* Re: Display in minibuffer link under point
  2020-05-08 13:16 ` John Kitchin
@ 2020-05-08 17:18   ` briangpowell .
  2020-05-08 20:48     ` John Kitchin
  0 siblings, 1 reply; 7+ messages in thread
From: briangpowell . @ 2020-05-08 17:18 UTC (permalink / raw)
  To: John Kitchin; +Cc: Garjola Dindi, org-mode-email

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

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 <jkitchin@andrew.cmu.edu> 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 <garjola@garjola.net> 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
>> --
>>
>>
>>

[-- Attachment #2: Type: text/html, Size: 1996 bytes --]

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

* Re: Display in minibuffer link under point
  2020-05-08 17:18   ` briangpowell .
@ 2020-05-08 20:48     ` John Kitchin
  2020-05-10 15:56       ` Garjola Dindi
  0 siblings, 1 reply; 7+ messages in thread
From: John Kitchin @ 2020-05-08 20:48 UTC (permalink / raw)
  To: briangpowell .; +Cc: Garjola Dindi, org-mode-email

[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]

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 . <briangpowellms@gmail.com>
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 <jkitchin@andrew.cmu.edu>
> 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 <garjola@garjola.net> 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
>>> --
>>>
>>>
>>>

[-- Attachment #2: Type: text/html, Size: 3030 bytes --]

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

* Re: Display in minibuffer link under point
  2020-05-08 20:48     ` John Kitchin
@ 2020-05-10 15:56       ` Garjola Dindi
  2020-05-11 15:53         ` John Kitchin
  0 siblings, 1 reply; 7+ messages in thread
From: Garjola Dindi @ 2020-05-10 15:56 UTC (permalink / raw)
  To: emacs-orgmode

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 <jkitchin@andrew.cmu.edu> 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 . <briangpowellms@gmail.com> 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 <jkitchin@andrew.cmu.edu> 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 <garjola@garjola.net> 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
>  -- 
-- 



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

* Re: Display in minibuffer link under point
  2020-05-10 15:56       ` Garjola Dindi
@ 2020-05-11 15:53         ` John Kitchin
  2020-05-16 16:07           ` Garjola Dindi
  0 siblings, 1 reply; 7+ messages in thread
From: John Kitchin @ 2020-05-11 15:53 UTC (permalink / raw)
  To: emacs-orgmode

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.

Garjola Dindi <garjola@garjola.net> 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 <jkitchin@andrew.cmu.edu> 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 . <briangpowellms@gmail.com> 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 <jkitchin@andrew.cmu.edu> 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 <garjola@garjola.net> 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


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

* Re: Display in minibuffer link under point
  2020-05-11 15:53         ` John Kitchin
@ 2020-05-16 16:07           ` Garjola Dindi
  0 siblings, 0 replies; 7+ messages in thread
From: Garjola Dindi @ 2020-05-16 16:07 UTC (permalink / raw)
  To: emacs-orgmode

On Mon 11-May-2020 at 17:53:06 +02, John Kitchin
<jkitchin@andrew.cmu.edu> 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 <garjola@garjola.net> 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 <jkitchin@andrew.cmu.edu> 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 . <briangpowellms@gmail.com> 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 <jkitchin@andrew.cmu.edu> 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 <garjola@garjola.net> 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
-- 



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

end of thread, other threads:[~2020-05-16 16:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 13:11 Display in minibuffer link under point Garjola Dindi
2020-05-08 13:16 ` John Kitchin
2020-05-08 17:18   ` briangpowell .
2020-05-08 20:48     ` John Kitchin
2020-05-10 15:56       ` Garjola Dindi
2020-05-11 15:53         ` John Kitchin
2020-05-16 16:07           ` Garjola Dindi

Code repositories for project(s) associated with this public 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).