emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [FR] Add eldoc support to show cell contents in shrunk table
@ 2021-03-19  6:06 Nicholas Harrison
  2021-03-19  6:43 ` Samuel Wales
  0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Harrison @ 2021-03-19  6:06 UTC (permalink / raw)
  To: emacs-orgmode

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


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

end of thread, other threads:[~2021-03-19  6:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-19  6:06 [FR] Add eldoc support to show cell contents in shrunk table Nicholas Harrison
2021-03-19  6:43 ` Samuel Wales

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