From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: yasnippet and Org-mode: depressing relationship Date: Sun, 23 Nov 2014 13:41:45 +0100 Message-ID: <2014-11-23T13-27-20@devnull.Karl-Voit.at> Reply-To: Karl Voit Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsWUP-0002zL-Tq for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 07:42:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XsWUK-0004NV-K2 for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 07:42:05 -0500 Received: from plane.gmane.org ([80.91.229.3]:59460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsWUK-0004NP-Cl for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 07:42:00 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XsWUI-0003gR-Ea for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 13:41:58 +0100 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 23 Nov 2014 13:41:58 +0100 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 23 Nov 2014 13:41:58 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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