From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UGPSM+wPwF6rGwAA0tVLHw (envelope-from ) for ; Sat, 16 May 2020 16:08:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IJtlL+wPwF4ffAAAbx9fmQ (envelope-from ) for ; Sat, 16 May 2020 16:08:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 53E77940C54 for ; Sat, 16 May 2020 16:08:12 +0000 (UTC) Received: from localhost ([::1]:47522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZzMB-0003Ni-80 for larch@yhetil.org; Sat, 16 May 2020 12:08:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZzLm-0003NX-TT for emacs-orgmode@gnu.org; Sat, 16 May 2020 12:07:47 -0400 Received: from ciao.gmane.io ([159.69.161.202]:44772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZzLl-0007C5-2v for emacs-orgmode@gnu.org; Sat, 16 May 2020 12:07:46 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1jZzLi-000Kx9-JE for emacs-orgmode@gnu.org; Sat, 16 May 2020 18:07:42 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Garjola Dindi Subject: Re: Display in minibuffer link under point Date: Sat, 16 May 2020 18:07:35 +0200 Message-ID: <87zha7983c.fsf@pc-117-162.ovh.com> References: <878si24ln7.fsf@pc-117-162.ovh.com> <87ftc7eqbt.fsf@pc-117-162.ovh.com> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:UEBYXxCZW7KAEslddLOqzaONYhY= Received-SPF: pass client-ip=159.69.161.202; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/16 12:07:42 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.51 X-TUID: BxtY2hXk+2/B On Mon 11-May-2020 at 17:53:06 +02, John Kitchin 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 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 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 . 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 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 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 --