3

I'm very new to Emacs and Org mode, so I'm basically fumbling around. I'm getting an alarm bell ding whenever I type in an table in an *.org file. A message says "invalid function: org-table-with-shrunk-field" in the echo area.

I get the error even with a simple example such as the following:

| A | B | C |
| a

When I type "a", I get the alarm.

I'm using Emacs 26.1 and Org mode version 9.2.

Here is the Debugger info:

Debugger entered--Lisp error: (invalid-function org-table-with-shrunk-field)
  org-table-with-shrunk-field(nil)
  org-self-insert-command(1)
  funcall-interactively(org-self-insert-command 1)
  call-interactively(org-self-insert-command nil nil)
  command-execute(org-self-insert-command)

Any idea what I can do about this?

I am using org-version 9.1.9 when I use -Q and 9.2 when I start it up as usual.

Also, when I commented out the following lines from my init file, I did not get the error. This isn't a solution, however, as I need a couple packages.

(setq package-archives '(("melpa" . "http://melpa.org/packages/") ("org" . "http://orgmode.org/elpa/"))) (package-initialize)

  • 1
    Which Emacs and Org version do you use? – Zeta Jan 5 at 21:03
  • 1
    Set debug-on-error to t, to see why/where/when Emacs tries to invoke this invalid function. – Drew Jan 5 at 22:34
  • 1
    Since you are a beginner I will elaborate on Drew's comment. You can use the Graphical User Interface to set debug-on-error to t: Just open the Options menu and check the Enter Debugger on Error menu item there. We hope that when the error happens a new window with a stacktrace will open. Copy that stacktrace and paste it into your question. That will help us to help you. – Tobias Jan 6 at 0:39
  • 1
    Great! So the issue might be a corrupted 9.2 install. Using 9.2, 1) open your org file. 2) Confirm table still broken by inserting content. 3) Reload Org uncompiled by doing these key chords C-u C-c C-x then type ! and press return or enter. BTW C -s shorthand for Ctrl or control key, so C-u would be pressing Crtl key and letter u at same time. After buffer reloads, 4) Test if table is still broken. Please reply with results. – Melioratus Jan 10 at 19:43
  • 1
    @Melioratus That seemed to fix the table error. However, when I quit and then restarted Emacs, and loaded an org file and made another table, the error was still there. It think it has something to do with org-plus-contrib. When I delete that package, the error goes away completely...but I need the package in order to use ox-extra. – G. H. Jan 10 at 21:06
2

I experienced the same (invalid-function org-table-with-shrunk-field) issue and resolved it with the following process, gleaned from the comments:

  1. confirm the source of the issue with M-x org-version, which said: "Org mode version 9.2 (9.2-elpa @ /path/to/.emacs.d/elpa/org-20181230/)"
  2. attempt to fix corrupted or out-of-date byte-compiled org 9.2 files by deleting all .elc files in the org 9.2 directory named in step 1, then M-x byte-recompile-directory that dir
  3. Re-test showed the issue was fixed, but as hinted by a comment above, an Emacs restart and re-test showed that the problem was back!
  4. Assuming a corrupted org 9.2 install as described in the comments, I reloaded all Org lisp files with C-u C-c C-x ! (which calls org-reload)
  5. A re-test including an Emacs restart confirmed the issue was fixed
  • You need to prefix byte-recompile-directory by M-0 because it does not compile if the .elc file does not exist. – Uwe Koloska May 3 at 8:31
1

Please see here: https://orgmode.org/Changes.html#orgeeff4d2

In Org 9.2, you'll need to add shrink to the startup option line:

#+STARTUP: align shrink

The shrinking behaviour has changed from the previous version of Org. Now the columns will expand automatically as soon as you start editing an field. Also the shortcut for expanding or shrinking columns has changed to C-c TAB.

  • 1
    Thank you for the feedback, but unfortunately the error persists. – G. H. Jan 7 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.