Skip to content
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

Find new way to store regular expressions #31

Open
mpfeifer opened this issue Sep 23, 2022 · 1 comment
Open

Find new way to store regular expressions #31

mpfeifer opened this issue Sep 23, 2022 · 1 comment

Comments

@mpfeifer
Copy link

mpfeifer commented Sep 23, 2022

Currently regular expressions are stored in filename. this seems to be not working well on some os (yes, windows.). May there be a new way considered to store regular expressions? Maybe in the snippet file? I currently have changed "yatemplate-regex-from-filename" to this:

;;;###autoload
(defun yatemplate-fill-alist ()
  "Fill `auto-insert-alist'."
  (yatemplate-remove-old-yatemplates-from-alist)
  (dolist (filename (reverse (yatemplate-sorted-files-in-dir)) nil)
    (let ((file-regex (yatemplate-regex-from-filename filename)))
      (if file-regex
          (push `(,(concat ".*" file-regex) . [,filename yatemplate-expand-yas-buffer]) ;; <----- here is change
                auto-insert-alist)))))

so i can use it too... of course now i lack some expressivness when defining which files to define a template for.

@piknik
Copy link

piknik commented Feb 12, 2023

See #32 for a solution to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants