Closed Randy1Burrell closed 3 years ago
Hi! Happy to hear that you enjoy the package. Could you post your yankpad-file? I haven't had this problem myself.
Yeah mon (Jamaican Voice) nice work. The problem seems to have mysteriously disappeared after deleting two of the three snippets I had.
Here's what my yankpad.org file looked like:
* emacs-lisp-mode
** use-package
(use-package $0)
** function
(defun $0)
** package-install
(unless (package-installed-p '${0})
(package-install '$0))
While I have you here, there is another small query that you might be able to help me with. Are there anyway to do mirroring in the snippets? yasnippet has this feature, but I haven't been able to get it to work in Yankpad. An example of what I was trying is in the package-install snippet above.
The bug has returned. After using Yankpad for the past few days I have found that this bug occurs when I have snippets for multiple modes.
Here's my current Yankpad file:
emacs-lisp-mode use-package (use-package $0) function (defun $0)
org-mode Weekly Planning \* Last weeks big 3 \* How far did you get [%]$7 ** [$2] $1 \** [$4] $3 \** [$6] $5 \* What worked? \** $8 \* What didn't work? \** $9 \* What will you keep doing? \** $10 \* What will you improve? \** $11 \* What will you start doing? \** $12 \* What will you stop doing? \** $13 \*** Review tasks and actions [/]$17 \ [$14] DEFERRED TASKS \ [$15] DELEGATED TASKS \ [$16] REVIEW DAILY NOTES \ Important updates, deadlines and task this week [/]$24 \* [$19] Personal
snippets when in emacs-lisp-mode
snippets when in org-mode
This has to be related to ivy
because when you disable ivy-mode
, yankpad
items in emacs
' built-in completing-read
interface aren't doubled as they are in ivy
interface.
I verified this on emacs 28 with heavily customized doom, on emacs 27 with vanilla doom and also on vanilla emacs 27 config.
edit: Tracing this down, yankpad-active-snippets
returns doubled items and completing-read
just hides them but ivy
set by global ivy-mode
doesn't filter non-unique items out. Going further down it seems like something undesirable is happening in yankpad-set-active-snippets
.
edit2: I think this line https://github.com/Kungsgeten/yankpad/blob/06d85f04133fbd49a6469174032f4c10a0abe98d/yankpad.el#L268 effectively doubles the yankpad
candidates
@AloisJanicek Thanks you for bug searching!
The bug was introduced in #75, but should be fixed now. Sorry for not noticing earlier @Randy1Burrell, I hadn't pulled the Github version into my local branch.
This is a really handy package for org-mode users. However, whenever I invoke the function yankpad-insert I see repetitions of the snippets I currently have for the mode I am in.
Notice in the picture of the options that gets displayed are repeated options.
Here is my Yankpad configuration:
Though it's not a critical bug, it's annoying and any solution would be appreciated.