-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
newly added valign-mode makes org-mode unusable #14223
Comments
I have been using org files with tables like this for many years. I export it to html. So org html exporter has no problem with my org files. Why does valign-mode think that my tables are not valid? My guess is that it has it's own org table parser which is buggy. |
Until someone figures this out, can someone please remove valign from spacemacs, or at least disable it by default so as not to cause harm to many folks? |
Can you post an exmaple file with large table? |
I tried to scramble the data so as not to reveal private company details. My table could have many dozens of rows like the following. Each file could have several of these tables.
Any of the empty columns above could also have cl links such as columns 3 and 4. |
Sorry for making you in trouble. I'm the one who introduced I opened PR #14196 because tables with non-ascii characters are not well-aligned in Indeed, according to the document of I've tested the line you provided repeating 500 times and found no errors, just laggy. Would you like to provide more details? I've opened another PR #14229 to disable |
@rayw000 Thanks for reverting. I've ran into the same issue as well. Additionally, |
Following is closer to my real links.
I don't see why I need to test with non-ascii characters. I don't use them. All my tables are ASCII only. |
Here is a full table. Try copying and paste few rows, copying and pasting the whole headline, collapsing and expanding headlines, etc. Some of these operations take over a dozen seconds.
|
Not only are things slow, but the alignment is messed up as well. Try cutting and pasting the headline. Some of the column widths are about three times as wide as they should be. If you then put the cursor somewhere in the table then hit TAB, then the widths shrink to what they should be, i.e., as wide as it needs to be but no more. |
I am new to spacemacs and can't get spacemacs to run because I keep getting the error message, "cannot load valign". Emacs also won't quit and doesn't respond at all. What can I do? |
@cinelerra-gg sudo killall emacs |
@lebensterben Wow, the answer was very fast, thank you. I do get the quitting/killing of a program, my question was how can I fix this error that spacemacs starts correctly at all or can this problem only be fixed by the developers. Anyway thanks for the quick feedback. |
@cinelerra-gg you can disable the valign package, by either adding it to the excluded package list, or setting the org layer variable to disable it by default. |
@lebensterben Okay, I understand. I'll see if I can get it to work. Thank you. |
@rayw000 Could you apply the following patch please? diff --git a/layers/+spacemacs/spacemacs-org/packages.el b/layers/+spacemacs/spacemacs-org/packages.el
index a67137b6c..1f160ac72 100644
--- a/layers/+spacemacs/spacemacs-org/packages.el
+++ b/layers/+spacemacs/spacemacs-org/packages.el
@@ -25,7 +25,7 @@
org-superstar
(space-doc :location local)
toc-org
- valign
+ (valign :toggle org-enable-valign)
))
(defun spacemacs-org/post-init-flyspell () Without this patch valign package is setup by spacemacs even if |
I'd like to. Thank you for your advice. Not only set variable |
I ran into this trouble. After pulling the repo and disabling valign, the trouble disappears. The only thing that need to be mentioned is, there was no non-ascii characters in LAYERS.org while there were many non-ascii characters in other .org files which had been load and opened in emacs. |
@AlohaWorld Thank you for your feedback! Currently I'm trying to reproduce possible errors which |
I'd like to use valign since I usually edit org files with variable-pitch-mode toggled on. Which is the correct way to reenable valign? Should I add (use-package valign
:defer t
:init
(progn
(add-hook 'org-mode-hook 'valign-mode)
(add-hook 'valign-mode-hook (lambda () (unless valign-mode
(valign-remove-advice)))))) to Or change the default in config.el? The later will definitely work but I'd like to keep differences with upstream to a minimum. |
In (org
:variables
...
org-enable-valign t
...
) |
Someone ought to document valign within spacemacs. As I reported earlier, there is not even a single line to explain what valign is or how to use it. |
That would work too! I was unsure because |
A PR has been opened to document the variable: It also moves the variable definition and valign package setup to the JAremko suggested a possible variable name change, and some possible upstream improvements. If anyone with some valign knowledge agrees then the variable name can be updated and feel free to suggest the improvements upstream. |
The PRs changes have been applied to the |
In the past week or so someone introduce valign-mode to spacemacs. This pretty much hosed my emacs whenever I visit a file with large tables. Each time I visit a file it just seems to hang, and I have to hit C-g to bring emacs back. Sure I can disable this by setting the mode variable to nil. Why was this introduced? Why is there absolutely no comment as to explain what it is for? Why did it default to being enabled rather than disabled?
I use latest develop branch of spacemacs, and ubuntu 20.04. Pretty much any table editing or yanking operation takes at least several seconds if not dozens of seconds. I enabled debug-on-error and cut and pasted few rows in my table. The stack trace is shown below.
The text was updated successfully, but these errors were encountered: