"Use helm to select a snippet. Put this into `yas/prompt-functions.'"
(interactive)
(setq display-fn (or display-fn 'identity))
- (if (require 'helm-config)
+ (if (require 'helm-misc)
(let (tmpsource cands result rmap)
(setq cands (mapcar (lambda (x) (funcall display-fn x)) choices))
(setq rmap (mapcar (lambda (x) (cons (funcall display-fn x) x)) choices))
gem install --user-install sqlint
#+end_src
+#+begin_src sh :eval never
+ sudo port install mmark
+#+end_src
+
+#+begin_src emacs-lisp
+ (eval-after-load 'flycheck
+ '(add-hook 'flycheck-mode-hook #'flycheck-mmark-setup))
+ (eval-after-load 'markdown
+ '(add-hook 'markdown-mode-hook #'flycheck-mode))
+#+end_src
+
* [[https://github.com/kai2nenobu/guide-key][guide-key]]
Probably the best help to keep track of the not every day used keybindings.
thus installed via github.
-#+begin_src emacs-lisp
+#+begin_src emacs-lisp :tangle no
(require 'lsp-mode)
(require 'lsp-ui)
(setq lsp-keymap-prefix "s-l")
With some code from http://howardism.org/Technical/Emacs/beep-for-emacs.html
#+begin_src emacs-lisp
- (require 'log4e)
- (require 'alert)
+ (if (string-equal system-type "darwin")
+ (progn
+ (require 'log4e)
+ (require 'alert)
- (setq alert-default-style 'osx-notifier)
+ (setq alert-default-style 'osx-notifier)
- (defvar beep-speech-executable "say %s"
- "An OS-dependent shell string to speak. Replaces `%s' with a phrase.")
+ (defvar beep-speech-executable "say %s"
+ "An OS-dependent shell string to speak. Replaces `%s' with a phrase.")
- (defvar beep-alert-sound-file
- (expand-file-name "/System/Library/Sounds/Submarine.aiff")
- "A WAV or AU file used at the completion of a function.")
+ (defvar beep-alert-sound-file
+ (expand-file-name "/System/Library/Sounds/Submarine.aiff")
+ "A WAV or AU file used at the completion of a function.")
- (defun beep--beep ()
- "Play a default notification sound file.
+ (defun beep--beep ()
+ "Play a default notification sound file.
Customize the variable, `beep-alert-sound-file' to adjust the sound."
- (play-sound-file beep-alert-sound-file))
+ (play-sound-file beep-alert-sound-file))
- (defun beep--speak (phrase)
- "Call a program to speak the string, PHRASE.
+ (defun beep--speak (phrase)
+ "Call a program to speak the string, PHRASE.
Customize the variable, `beep-speech-executable'."
- (let ((command (format beep-speech-executable phrase))
- (inhibit-message t))
- (shell-command command)))
+ (let ((command (format beep-speech-executable phrase))
+ (inhibit-message t))
+ (shell-command command)))
- (defun beep--when-finished (phrase)
- "Notify us with string, PHRASE, to grab our attention.
+ (defun beep--when-finished (phrase)
+ "Notify us with string, PHRASE, to grab our attention.
Useful after a long process has completed, but use sparingly,
as this can be pretty distracting."
- (message phrase)
- (alert phrase :title "Completed")
- (beep--beep)
- (beep--speak phrase))
-
- (defun bba-notify-hook(beg end _)
- "notify after changes and remove hook."
- (beep--when-finished "The command has completed")
- (remove-hook 'after-change-functions 'bba-notify-hook t)
- )
-
- (defun bba-add-notify-hook()
- "add notify hook."
- (interactive)
- (if (buffer-file-name)
- (save-buffer)
- (set-buffer-modified-p nil)) ;; set buffer as unmodified
- (make-local-variable 'after-change-functions)
- (add-hook 'after-change-functions 'bba-notify-hook nil t)
- )
-
+ (message phrase)
+ (alert phrase :title "Completed")
+ (beep--beep)
+ (beep--speak phrase))
+
+ (defun bba-notify-hook(beg end _)
+ "notify after changes and remove hook."
+ (beep--when-finished "The command has completed")
+ (remove-hook 'after-change-functions 'bba-notify-hook t)
+ )
+ (defun bba-add-notify-hook()
+ "add notify hook."
+ (interactive)
+ (if (buffer-file-name)
+ (save-buffer)
+ (set-buffer-modified-p nil)) ;; set buffer as unmodified
+ (make-local-variable 'after-change-functions)
+ (add-hook 'after-change-functions 'bba-notify-hook nil t))))
#+end_src
* bba lookup dictionary
#+BEGIN_SRC emacs-lisp
(if (>= emacs-major-version 24)
(progn
- (add-to-list 'load-path "~/.emacs.d/elpa/ggtags-20211020.354" t)
+ (add-to-list 'load-path "~/.emacs.d/elpa/ggtags-20230602.133" t)
(require 'ggtags)
- (add-to-list 'load-path "~/.emacs.d/elpa/helm-gtags-20170116.529" t)
+ (add-to-list 'load-path "~/.emacs.d/elpa/helm-gtags-20200602.1610" t)
(require 'helm-gtags)
(add-hook 'puppet-mode-hook
(lambda()
(if (>= emacs-major-version 24)
(progn
(add-to-list 'load-path
- "~/.emacs.d/elpa/helm-20220616.1004")
+ "~/.emacs.d/elpa/helm-20230719.1306")
(require 'helm)
(helm-mode 1)
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
#+BEGIN_SRC emacs-lisp
(if (>= emacs-major-version 24)
(progn
- (add-to-list 'load-path "~/.emacs.d/elpa/helm-descbinds-20180429.1456")
+ (add-to-list 'load-path "~/.emacs.d/elpa/helm-descbinds-20190501.935")
(require 'helm-descbinds)
(define-key global-map (kbd "C-h b") 'helm-descbinds)
)