From: Karl Voit <devnull@Karl-Voit.at>
To: emacs-orgmode@gnu.org
Subject: yasnippet and Org-mode: depressing relationship
Date: Sun, 23 Nov 2014 13:41:45 +0100 [thread overview]
Message-ID: <2014-11-23T13-27-20@devnull.Karl-Voit.at> (raw)
Hi!
If you're using Org-mode together with yasnippet: how do you do it
without getting performance issues or expand-key troubles?
Background with a specific issue:
My yas-specific init-lines:
#+BEGIN_EXAMPLE
812:(require 'yasnippet)
813:(setq yas-root-directory "~/.emacs.d/snippets")
814:(yas-load-directory yas-root-directory)
887:(add-hook 'org-mode-hook 'yas-minor-mode-on)
888:(setq yas-indent-line 'fixed) ;; fixes Org-mode issue with yasnippets: https://github.com/capitaomorte/yasnippet/iss
#+END_EXAMPLE
- Org-mode version 8.3beta (release_8.3beta-544-g77f088) from Git
- yasnippet (version 0.8.0beta) (Github)
- GNU Emacs 24.3.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.4.2)
Issue: Whenever I change table cells via TAB, it takes twelve
seconds with 100% CPU core:
org-table-next-field very slow:
#+BEGIN_EXAMPLE
- command-execute 31397 99%
- call-interactively 31397 99%
- yas-expand 31298 98%
- yas--fallback 31298 98%
- call-interactively 31298 98%
- org-cycle 31298 98%
- call-interactively 31291 98%
- org-table-next-field 31291 98%
- org-table-align 15676 49%
+ org-activate-bracket-links 36 0%
[...]
#+END_EXAMPLE
In org-table-next-field I suspect the re-calculation process. And
yes, also the simple ~C-c C-c~ on a table takes very long. Even
within the primitive table "| |".
Profiling the re-calculation ends up with:
#+BEGIN_EXAMPLE
- command-execute 43157 99%
- call-interactively 43157 99%
- yas-expand 31871 73%
- yas--fallback 31871 73%
- call-interactively 31871 73%
- org-cycle 31871 73%
- call-interactively 31864 73%
- org-table-next-field 31864 73%
- org-table-align 15782 36%
- org-activate-bracket-links 46 0%
[...]
#+END_EXAMPLE
So I guess that yas-expand has a certain role in this drama.
- http://orgmode.org/worg/org-faq.html#YASnippet
- "Note: yasnippet is not compatible with org-indent-mode currently
there is no known way to use both successfully with
yas/trigger-key set to TAB (or [tab] etc…) "
I tried both methods to fix the issue and none had any positive
effect on this.
Fun fact: my Windows machine (same Emacs config, same Emacs major
version) does *not* have this issue!
So: how to have both Org-mode and yasnippet?
Do I have to switch the trigger key of yasnippet? What trigger key
do you use if you also changed it?
--
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
> get Memacs from https://github.com/novoid/Memacs <
https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
next reply other threads:[~2014-11-23 12:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-23 12:41 Karl Voit [this message]
2014-11-23 12:48 ` C-c C-c in table takes 12 seconds (was: yasnippet and Org-mode) Karl Voit
2014-11-23 16:58 ` C-c C-c in table takes 12 seconds Nicolas Goaziou
2014-11-23 17:08 ` Rasmus
2014-11-23 18:03 ` Nicolas Goaziou
2014-11-23 18:14 ` Rasmus
2014-11-23 18:19 ` Nicolas Goaziou
2014-11-23 17:28 ` Karl Voit
2014-11-23 19:04 ` Bernt Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2014-11-23T13-27-20@devnull.Karl-Voit.at \
--to=devnull@karl-voit.at \
--cc=emacs-orgmode@gnu.org \
--cc=news1142@Karl-Voit.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).