Julien Cubizolles | 6 Mar 2013 23:58
Picon
Favicon

yasnippet and autopair/paredit conflict

I'm trying to define a snippet to insert \left( \right) structures in
LaTeX. I'd like it to be able to choose between parentheses, brackets,
square brackets with something like:

--8<---------------cut here---------------start------------->8---
\left$1$0\right$1
--8<---------------cut here---------------end--------------->8---

The thing is that I'm also using paredit and/or autopair modes in all
LaTeX buffers and if I type "(" during the snippet expansion, the
matching ")" is also inserted.

I've tried to temporarily disable paredit/autopair from within the
snippet template with no success so far. Any idea how I should go about
setting this upĀ ?

Julien.

--

-- 
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smart-snippet+unsubscribe@...
To post to this group, send email to smart-snippet@...
Visit this group at http://groups.google.com/group/smart-snippet?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Fab | 26 Feb 2013 16:05
Picon

About yas / choose value

Hello,
If you test the code below, you will notice that there is a small problem: " / yas / text " what appears, what I do not want.
How to correct the code?
Thank you.

# -*- mode: snippet -*-
# name:ensemble
# key: ens
# --
${1:$$(yas/choose-value '("N" "Z" "D" "Q" "R"))}${1:$(yas/latex-choose-group yas/text)} $0

(defun yas/latex-choose-group (text)
  (cond ((string= text "N") "\$\\\mathbb{N}\$" )
        ((string= text "Z") "\$\\\mathbb{Z}\$" )
        ((string= text "D") "\$\\\mathbb{D}\$" )
        ((string= text "Q") "\$\\\mathbb{Q}\$" )  
        ((string= text "R") "\$\\\mathbb{R}\$" )))

--
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smart-snippet+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to smart-snippet-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/smart-snippet?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
codesite | 25 Jan 2013 16:40
Picon
Favicon

Issue 198 in yasnippet: (yas/expand-snippet "\\$1 $1") doesn't work

Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 198 by ohwoeo...@...: (yas/expand-snippet "\\$1
$1")  
doesn't work
http://code.google.com/p/yasnippet/issues/detail?id=198

What steps will reproduce the problem?
1. Eval (yas/expand-snippet "\\$1 $1")
2.
3.

What is the expected output? What do you see instead?
Expected expansion e.g.:
\ABC ABC
Instead gives:
$1

Please use labels and text to provide additional information.

--

-- 
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smart-snippet+unsubscribe@...
To post to this group, send email to smart-snippet@...
Visit this group at http://groups.google.com/group/smart-snippet?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

codesite | 7 Jan 2013 14:13
Picon
Favicon

Issue 197 in yasnippet: yas-after-exit-snippet-hook won't run when it is specified in snippet file.

Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 197 by kawabata...@...:
yas-after-exit-snippet-hook won't  
run when it is specified in snippet file.
http://code.google.com/p/yasnippet/issues/detail?id=197

When I write the following snippet, as I want to run some buffer clean-up
code after executing the snippet,

> # -*- mode: snippet -*-
> # binding: C-c y r
> # expand-env: ((yas-after-exit-snippet-hook 'do-some-cleanup)))
> # --
> $1 ${1:$(some-complex-function text)}

It didn't run the `do-some-cleanup' function.
It works when I execute (setq yas-after-exit-snipped-hook 'do-some-cleanup)

Is there any way to run arbitary elisp code in editing buffer
after I finished expansion?

--

-- 
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To post to this group, send email to smart-snippet@...
To unsubscribe from this group, send email to smart-snippet+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.

F.YE | 19 Dec 2012 16:30
Picon

Problem encountered when using auto-complete

Transfer from yasnippet-bundle to yasnippet because the latter is easier to expand. But with yasnippet, one could not use "TAB" to complete the words provided by ac-dict (from auto-complete, also a fancy tool of which I fond a lot) while with yasnippet-bundle everything's OK. It's very embarrassing only to use "RET"(enter) to keep auto-complete working. Therefore, I wonder that out there might be somewhere a bug or something. The version of yasnippet I'm using is the lastest, I mean the very up-to-date. The version yasnippet-bundle is yasnippet-bundle-0.6.1c, which's also the lastest, it seems there's no more new bundle version. 


Thanks in advance for any possible help. 

--
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To view this discussion on the web visit https://groups.google.com/d/msg/smart-snippet/-/lzMlJA4zf6wJ.
To post to this group, send email to smart-snippet-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to smart-snippet+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
Qzi chiu | 14 Dec 2012 13:36
Picon

yasnippet errors on emacs.app on mac ox lion

;; yasnippet                                                                    
(add-to-list 'load-path
              "~/.emacs.d/plugins/yasnippet")
(require 'yasnippet)
(setq yas/snippet-dirs '("~/.emacs.d/plugins/yasnippet/snippets""~/.emacs.d/plu\
gins/yasnippet/extras/imported"))
(setq yas/prompt-functions
      '(yas/dropdown-prompt yas/x-prompt yas/completing-prompt yas/ido-prompt y\
as/no-prompt))
(yas-global-mode 1)
(yas-minor-mode-on)


error is below:

Debugger entered--Lisp error: (wrong-number-of-arguments called-interactively-p 1)
  (called-interactively-p (quote interactive))
  (yas--called-interactively-p (quote interactive))
  (if (yas--called-interactively-p (quote interactive)) (progn (yas--message 3 "Loaded snippets from %s." top-level-dir)))
  (when (yas--called-interactively-p (quote interactive)) (yas--message 3 "Loaded snippets from %s." top-level-dir))
  yas-load-directory("~/.emacs.d/plugins/yasnippet/extras/imported" t)
  (cond ((file-directory-p directory) (yas-load-directory directory ...) (if nojit ... ...)) (t (push ... errors)))
  (while --cl-dolist-temp-- (setq directory (car --cl-dolist-temp--)) (cond (... ... ...) (t ...)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
  (let ((--cl-dolist-temp-- ...) directory) (while --cl-dolist-temp-- (setq directory ...) (cond ... ...) (setq --cl-dolist-temp-- ...)) nil)
  (catch (quote --cl-block-nil--) (let (... directory) (while --cl-dolist-temp-- ... ... ...) nil))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let ... ... nil)))
  (block nil (let (... directory) (while --cl-dolist-temp-- ... ... ...) nil))
  (dolist (directory (reverse ...)) (cond (... ... ...) (t ...)))
  (if yas-snippet-dirs (dolist (directory ...) (cond ... ...)) (call-interactively (quote yas-load-directory)))
  (let (errors) (if yas-snippet-dirs (dolist ... ...) (call-interactively ...)) errors)
  yas--load-snippet-dirs(nil)
  (setq errors (yas--load-snippet-dirs interactive))
  (let ((errors) (snippet-editing-buffers ...)) (when snippet-editing-buffers (if interactive ... ...)) (setq yas--tables (make-hash-table)) (setq yas--parents (make-hash-table)) ($
  (catch (quote abort) (let (... ...) (when snippet-editing-buffers ...) (setq yas--tables ...) (setq yas--parents ...) (setq yas--menu-table ...) (setq yas--scheduled-jit-loads ..$
  yas-reload-all()
  (progn (yas-reload-all))
  (if yas-global-mode (progn (yas-reload-all)))
  (when yas-global-mode (yas-reload-all))
  yas--global-mode-reload-with-jit-maybe()
  run-hooks(yas-global-mode-hook yas-global-mode-on-hook)
  yas--global-mode-reload-with-jit-maybe()
  run-hooks(yas-global-mode-hook yas-global-mode-on-hook)
  yas-global-mode(1)
  eval-buffer(#<buffer  *load*> nil "/Users/qzi/.emacs" nil t)  ; Reading at buffer position 821
  load-with-code-conversion("/Users/qzi/.emacs" "/Users/qzi/.emacs" t t)
  load("~/.emacs" t t)
  #[nil "^H\205\276^ <at>   \306=\203^Q^ <at> \307^H\310Q\202A^ <at> \311=\2033^ <at> \312\307\313\314#\203#^ <at> \315\202A^ <at> \312\307\313\316#\203/^ <at> \317\202A^ <at> \315\202A^ <at>   \320=\203=^ <at> \321\202A^ <at> \307^$
  command-line()
  normal-top-level()




--
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To view this discussion on the web visit https://groups.google.com/d/msg/smart-snippet/-/XsS3PqdVUh0J.
To post to this group, send email to smart-snippet-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to smart-snippet+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
Jim Burton | 15 Nov 2012 12:24
Picon

Problem with backslashes

Hi, I have installed yasnippet 0.8 from elpa on emacs 24 and I want to write a snippet that inserts this text into a LaTeX document (using AUCTeX):

\\ \vspace{10pt}

So I have this snippet:

# -*- mode: snippet -*- # name: para # key: para # binding: direct-keybinding # expand-env: ((some-var some-value)) # type: command # -- \\\\ \\vspace{10pt}

but when I type para<TAB> all that happens is that the text para is removed. What am I doing wrong?

Thanks!

--
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To view this discussion on the web visit https://groups.google.com/d/msg/smart-snippet/-/_dHE-QIqu_8J.
To post to this group, send email to smart-snippet-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to smart-snippet+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
codesite | 3 Nov 2012 18:32
Picon
Favicon

Issue 196 in yasnippet: video links on homepage dead

Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 196 by kno...@...: video links on homepage dead
http://code.google.com/p/yasnippet/issues/detail?id=196

What steps will reproduce the problem?
1. open http://capitaomorte.github.com/yasnippet/ in a browser
2. click link to youtube

What is the expected output? What do you see instead?

youtube states that the video is no longer available as the uploader  
account is closed

Please use labels and text to provide additional information.

--

-- 
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To post to this group, send email to smart-snippet@...
To unsubscribe from this group, send email to smart-snippet+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.

codesite | 6 Oct 2012 13:45
Picon
Favicon

Issue 195 in yasnippet: Yasnippet pop-up menu missing items

Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 195 by martin.p...@...: Yasnippet pop-up menu
missing items
http://code.google.com/p/yasnippet/issues/detail?id=195

What steps will reproduce the problem?
1. Enable Yasnippet
2. Start typing a function name
3. Provided help menu is missing items

What is the expected output? What do you see instead?

Some of the items in the pop-up menu are blank. They should be visible. See  
attached screen grab for more information.

Please use labels and text to provide additional information.

> rpm -q emacs
emacs-24.1-4.fc17.x86_64

(defvar yas/version "0.6.1b")

Attachments:
	yasnippet_bug.png  7.7 KB

--

-- 
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To post to this group, send email to smart-snippet@...
To unsubscribe from this group, send email to smart-snippet+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.

shjk | 25 Jul 2012 16:20

Changelog for 0.7.0 and up?

Hi,


the changelog at http://capitaomorte.github.com/yasnippet/changelog.html stopped getting updated after the move to Github. I can't find any other place listing changes for 0.7.0 and 0.8.0, is this not documented anymore?

Best regards,
shjk

--
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To view this discussion on the web visit https://groups.google.com/d/msg/smart-snippet/-/zEIswgSBHbIJ.
To post to this group, send email to smart-snippet-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to smart-snippet+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.
shjk | 25 Jul 2012 16:26

How to hide/overriding other snippet with same name defined for parent mode?

Hi,


I've got a hl snippet to produce a horizontal line up to the fill column which is defined for text-mode. For some modes that have text-mode as parent (via .yas-parent) I want to replace this with a different snippet. In 0.5.* this was possible by just adding a snippet with the same name in the more specific mode. In 0.7.0 I get asked which of the two snippets I want to expand (without making it possible to see which is which). Is it possible to tell yasnippet to always use the more specific one in 0.7.0/0.8.0? I can create a work-around by having a more complex snippet that expands to different things depending on the major-mode but this is a bit inconvenient and a hacky non-solution.

shjk

--
You received this message because you are subscribed to the Google Groups "smart-snippet and YASnippet" group.
To view this discussion on the web visit https://groups.google.com/d/msg/smart-snippet/-/OmvOFVVBLKAJ.
To post to this group, send email to smart-snippet-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to smart-snippet+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/smart-snippet?hl=en.

Gmane