From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 96yrJVRIVGC/JgAA0tVLHw (envelope-from ) for ; Fri, 19 Mar 2021 06:44:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qEsOIVRIVGB/YgAAB5/wlQ (envelope-from ) for ; Fri, 19 Mar 2021 06:44:36 +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 D05E926E78 for ; Fri, 19 Mar 2021 07:44:35 +0100 (CET) Received: from localhost ([::1]:47570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lN8s6-0004wy-NV for larch@yhetil.org; Fri, 19 Mar 2021 02:44:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59988) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lN8rB-0004wj-Ce for emacs-orgmode@gnu.org; Fri, 19 Mar 2021 02:43:37 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:36683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lN8r5-0004Ft-C4 for emacs-orgmode@gnu.org; Fri, 19 Mar 2021 02:43:37 -0400 Received: by mail-lf1-x12c.google.com with SMTP id n138so8366370lfa.3 for ; Thu, 18 Mar 2021 23:43:30 -0700 (PDT) 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=fTwLDhdHU81c270UVdTpO1aKMzDD/dUHds2ouZxkqo4=; b=WWJVmLvORjGesu4IYYOCZ5I7bM9IuBFaA78SRrGSablE7BX7s/ex70+dGG/wREmcEu axNkEZz4eEubrBWL30BnWtf8bp8b6sJoRM9q54hYEZz+aGTOHUl+VxICs12YHS8Y8kFP NABp2VCpin/7IiPp/qP/ybKv5hTjOQQ4DMI8j8o0xkC5HZgb3Nt9aNfKxOxM204YkxZH AzWZPEum7qv0O1P3IgVWHzYp5XMHC32xmPTHLHQzfdVtT0tCbWi6y1hFPXh6cYBUAyP8 2SkGKwnUeNarLOU66DnKECWgY/FsOiDkawNoMJ88pn8K1qsnLl/Z5Gj6ng3Y9K9MgqZ5 7E3w== 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=fTwLDhdHU81c270UVdTpO1aKMzDD/dUHds2ouZxkqo4=; b=E3dMcHU8f4y1X6293HsuknVhNtS77iG9V2SEjpQ9k21ePUwrdydwv9ODtNmEUnZtzQ 9SoOLDyJYfWIimev1h7IxwcViOFSzYbCzWFuRNjMgzgkqafMeOrVY8yTmkZAHLiZSX8Q Mj4MmP0OQtL9HZa1K0RhsILkCWQMrGz2mfbOtxCqX64ZnvYFqjol/GjgNoxhqlSqDpEx cKm5GbZxVMurMfm3KVs5brnjHh2FK29hYQctZUywodyyFyzjECK55eh0NSvFtQY30+yI XPoFNVbqy2hEBzB94kx4LFWjJZ33eMgca5/9zWPnXCPwOAk3RRKSSOvveTyAIEzL5fW0 8Xrg== X-Gm-Message-State: AOAM533+jbfTZhbcMhmDD6WtQwWvee8EfOy/JXa2CF6sO6AIgHXId5so /DB1hjgLKouNXwaDtUu5qvvG+XsP12PSnrE0V60= X-Google-Smtp-Source: ABdhPJx9A9Jo0rz8Clvjg7ju55q7uGHUi+/PmvWL+elKmZQTGanFrD+o5Uuucp1Kyrh0rkcF4LHlKwBXxLhYll/iza0= X-Received: by 2002:a19:8048:: with SMTP id b69mr7727905lfd.458.1616136209094; Thu, 18 Mar 2021 23:43:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:7842:0:0:0:0:0 with HTTP; Thu, 18 Mar 2021 23:43:28 -0700 (PDT) In-Reply-To: References: From: Samuel Wales Date: Thu, 18 Mar 2021 23:43:28 -0700 Message-ID: Subject: Re: [FR] Add eldoc support to show cell contents in shrunk table To: Nicholas Harrison Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=samologist@gmail.com; helo=mail-lf1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1616136275; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=fTwLDhdHU81c270UVdTpO1aKMzDD/dUHds2ouZxkqo4=; b=MqbjKebFc89UebV/w7McI0VUUOJKzuzPoQWWxbYT6owQ4nQQKqv+pSroE7lmjhmB7p3/2y 8kZbFIUlmGWd+UsFvJtrIYMyyM/aNE0hwjLxXOYOYKsL9GyXezAbIONn5gxBtR2dg0c0kg QJB+xcpy+GHFDkxxl5aj/FNHzO2E9E71/yrHaFpUl9G47oYRosqhoavX0GWlJCGOY4XEEh 9kQDfGr+UFJiqwTKlQ9kIz507ppv6M5dNgXA+TTWdj7YWNzFsZAk7bM6AbDa3M16uiAd5y jwZ9kyZ7T0XIcNSIFNMlqfHsQW4ndadlqdY2o83qd5wwZ4qyOMevaKC7kUIhjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1616136275; a=rsa-sha256; cv=none; b=rV/YYjk8AQou46Usi3bz2AbAPilOZnG9Sh6p3hLGXgj4C09qsFuuKCA5cmnI/+LZhOnUO+ SLBy0PaRVPBVgrmPsziMmIm3uYXJZJ7GLNPkO1hM6ckKWmXshtAuzfC84DXQriv6fRC7J0 5gei8j27vNtWNQRRafsiDnpGRNlqYShOMqjPq5pPSlKgvUXVB0wT2uyblDCDM6gNP6rnBo Yz5c+Z3f+vEtyAqTA6XGvZf7NQQMXXvvcgP9C/edw/iQiiR3Hk5MBV6N294lYqljX9mv7a ll3EsmD7331s8DWXL/gj+i8nC9NXlqa9NXCAY+Cve7g1KgA/x9i+GIvMCY7xHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=WWJVmLvO; dmarc=pass (policy=none) header.from=gmail.com; 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-Spam-Score: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=WWJVmLvO; dmarc=pass (policy=none) header.from=gmail.com; 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: D05E926E78 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: tgy/ATD/M/1p just a note about what you are getting yourself into. there be dragons. emacs actually provides several mechanisms for help text. idk the complete list. perhaps some have done it de novo with timers. they have different actual [i've seen them] or possible characteristics: - some being annoying because of subtle showing too much or not enough issues [like they show even if you did not move the pointer or cursor into the relevant area] - possible interactions with scrolling with pointer or cursor over stuff that flies by - some working for text cursor but not mouse pointer or vice-versa or not controllable [kind of a dealbreaker] i have notes like these scribbles and had to give up trying to figure it out: ;; fixme currently ;; mouse ignores tooltip delays for things it works for ;; that is maybe help-echo dunno ;; mouse ignores my eldoc thing for org tses ;; mode is off, which i think for some reason works for mouse ;; still to put in echo area that weas referring to tooltip mode i think. ;; fixme why does this not work in either org or elisp? ;; because there is no help-echo ;; fixme add help-echo ;; [2017-01-16 Mon 12:48] ;; ;; fixme if i am using help-at-pt-display-when-idle to show ;; links, then put cursor over ts to activate eldoc, then put it ;; over link, the link does not show until i move cursor again. ;; thus, /eldoc breaks help-at-pt-display-when-idle/. ;; ***** [[https://mail.google.com/mail/u/0/h/chu69nhq3y6w/?&th=176f7fa279b7c934&v=c][Gmail - bug#42484: 26.1: org-mode should display value of links in mini-buffer]] ;; fixme capture buffer point is on a link which is annoying. ;; fixme what did i do before? see git somewhat before ;; [2021-01-22 Fri 00:32]. perhaps i used eldoc. perhaps htat ;; will not activate if already on link. as you can see i wasn't too pleased with the elisp ball of wax in this particular case. On 3/18/21, Nicholas Harrison wrote: > I'm trying to create an automatic way to see the full contents of an > org table cell while keeping the table compact. I've discovered > org-table-shrink and then display-local-help to see the contents, but > I want this to be done automatically using eldoc. I grabbed and > modified a function from org-eldoc.el which could be added into > org-eldoc-documentation-function: > > (defun org-eldoc-get-cell-contents () > "Return cell contents if in a shrunken table cell." > (let ((case-fold-search t)) > (save-excursion > (save-match-data > (when (org-at-table-p) > (display-local-help)))))) > > I don't really know what I'm doing since I'm not a developer of Emacs > or org-mode and straight up using display-local-help doesn't seem > right to me. I think I have unneeded code in there too. Does anyone > have a better direction on how to get the cell contents when in an org > table or corrections to this function? > > Nicholas > > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html