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 IAfNBnRk/1/wcQAA0tVLHw (envelope-from ) for ; Wed, 13 Jan 2021 21:21:56 +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 UNqCAnRk/19LEwAAbx9fmQ (envelope-from ) for ; Wed, 13 Jan 2021 21:21:56 +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 238EF940483 for ; Wed, 13 Jan 2021 21:21:55 +0000 (UTC) Received: from localhost ([::1]:50566 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kznaT-000864-Ux for larch@yhetil.org; Wed, 13 Jan 2021 16:21:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kznYg-00075Q-H1; Wed, 13 Jan 2021 16:20:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:53363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kznYg-0001Fa-8Q; Wed, 13 Jan 2021 16:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kznYg-0005Zr-36; Wed, 13 Jan 2021 16:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#42484: 26.1: org-mode should display value of links in mini-buffer Resent-From: Samuel Wales Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Wed, 13 Jan 2021 21:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42484 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: To: Juri Linkov Received: via spool by 42484-submit@debbugs.gnu.org id=B42484.161057274221312 (code B ref 42484); Wed, 13 Jan 2021 21:20:02 +0000 Received: (at 42484) by debbugs.gnu.org; 13 Jan 2021 21:19:02 +0000 Received: from localhost ([127.0.0.1]:36676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kznXh-0005XV-Uy for submit@debbugs.gnu.org; Wed, 13 Jan 2021 16:19:02 -0500 Received: from mail-lf1-f41.google.com ([209.85.167.41]:40382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kznXf-0005X7-92 for 42484@debbugs.gnu.org; Wed, 13 Jan 2021 16:19:00 -0500 Received: by mail-lf1-f41.google.com with SMTP id m12so4879012lfo.7 for <42484@debbugs.gnu.org>; Wed, 13 Jan 2021 13:18:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zVCrsWy+QRTcBydWd5CiqTz0VLnvyG1vXEHQfajepYo=; b=R7KX2VQfte6axjbP6BFLRBOWZhLum/OstlKwOO3N5NbrABmj/MTjkp21Yx994aw9On T6katQlMkmO8UWQLu2QKbQ2EaBv057FvRz+gKWYJJbgePBS9WVOeBjo+LGX4LMH43isx 0C9mw82EY1U7+OyWWeXZuaFDvAXMrZcMqzj35IKrG9l0VvBA1m4ggBfPULPv1jbf3coh v66Clkuqd+oJkCWly48syWr21+wIhF/4G/iW9TfweoVby4d56pfxn0zlvWYxfABiRSEg Pf9Y/QZmo5lgWdnFTFOglnXBJMo6bMmDEbLbrqkkD7nJl19escHp0vu3vwKyc4VaMR6p 0n7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zVCrsWy+QRTcBydWd5CiqTz0VLnvyG1vXEHQfajepYo=; b=s7wkHKPPyNwWpbc6kEgRHpDvhya61C829vhvedyLMPa8n93jNhnk8cDitNbeiQE5Gn JlkNgDK6GDTsTG1LWAoX/GjFBixJc9cYiZf29vHAXyguRQRXLahaX/ERswtXcRKvSD6M PtobVqksqhE/ib8jXcd9lLIPAbjnH/Ckf/KcgH9TKgGXKoivVuH6JiJSp6LVUQUe1sMt rATTBPLG19XRiIlOx4/J1N9eYxiV99ITv5U6bjo9cYNh7JIk1oqAQ9luPPox4cAQky1I OZ4GqdOqFWcV9W8m+mvOeabG6NmRZjIqve1z7RDf7ICU5BB2+sadH5wUd9CrGK9WqQLg sobg== X-Gm-Message-State: AOAM532ywxLQ9o2BsPoxIXemvVSg2eO3/LVZDbMB9C8DJvU51pb5OAb8 dQN3QoCEwkSwYJ/+OylA8NrgrO/zCzyG0C/mBgY= X-Google-Smtp-Source: ABdhPJz1nl3kzWqm+J47Bw94M1ObNg59tm/6YlfSKl+Omp4Pg0Fbddd+gsbWRHjRYrHAtFGzHkKaV2b9QI1YIzN9vIY= X-Received: by 2002:a19:4c44:: with SMTP id z65mr1543681lfa.315.1610572732987; Wed, 13 Jan 2021 13:18:52 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ab3:6450:0:0:0:0:0 with HTTP; Wed, 13 Jan 2021 13:18:52 -0800 (PST) In-Reply-To: <87lfcxkpk5.fsf@mail.linkov.net> References: <87v9c35mny.fsf@mail.linkov.net> <20210112094550.lk2rmhohtpbglarw@E15-2016.optimum.net> <87r1mqv2a6.fsf@mail.linkov.net> <20210113054007.7pdl3ykvlku6namu@E15-2016.optimum.net> <20200723035629.7jg2pd2mhqjowvh4@E15-2016.optimum.net> <87lfcxkpk5.fsf@mail.linkov.net> From: Samuel Wales Date: Wed, 13 Jan 2021 14:18:52 -0700 Message-ID: Content-Type: text/plain; charset="UTF-8" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: emacs-orgmode@gnu.org List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boruch Baum , 42484@debbugs.gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.26 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=R7KX2VQf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Migadu-Queue-Id: 238EF940483 X-Spam-Score: -1.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: 21mk4dhveuKj this is an interesting discussion. is there any side discussion that takes into account both mouse and cursor? i have had a devil of a time trying to get: 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. 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 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. On 1/13/21, Juri Linkov wrote: >> Still, I would like to continue to promote my solution, because it's >> much simpler and is instantaneous upon key-press. It might also be more >> efficient: The help-at-pt solution runs code in all buffers, let's say >> every 0.1 seconds, all the time; my solution only runs in the selected >> mode(s) buffers but after every key-press, which for an 'average' >> touch-typist taking a speed test would be 0.3 seconds. > > I agree. Overhead of needlessly running the global timer is what concerns > me too. But using an idle timer by help-at-pt is not that bad either. > It runs code only after the last key-press in a sequence of many > key-presses. > So with idle timer in help-at-pt and the default delay, code runs less > often > than by using post-command-hook. Here are a brief comparison of > advantages and disadvantages of these two approaches: > > 1. help-at-pt idle timer > > Pros: > 1.1. runs code once a sequence of key-presses is finished, > and 1 second has passed after the last key-press, > where 1 second is the default value of help-at-pt-timer-delay. > Customizing it to 0.1 removes this advantage because on average > there is more time between key-presses than 0.1 seconds. > > Cons: > 1.1. With a bigger value of help-at-pt-timer-delay (by default, 1 second) > that helps code to run less often (not after every key-press), > the effect of the primary goal of this feature to display > the help-echo string is not instantaneous; > 1.2. the timer runs globally in all modes (this could be mitigated > by checking major mode in the timer function). > > 2. post-command-hook > > Pros: > 1.1. can be activated locally only in org-mode buffers; > 1.2. display of the help-echo string is instantaneous. > > Cons: > 1.1. runs code after every key-press. > > So your approach has more advantages. The only problem with your code > is that it displays the garbled mojibake on URLs with Unicode symbols, > that need to be decoded to UTF-8 with: > > (message "%s" (decode-coding-string (url-unhex-string msg) 'utf-8)) > > Also not to step on other more important minibuffer echo-area messages, > help-at-pt-maybe-display has better handling with: > > (or (not (current-message)) > (string= (current-message) "Quit")) > > > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html