Closed zeltak closed 6 years ago
I do not quite understand what you wish to do. It sounds like you want snippets which can be expanded with the space key (I don't use abbrev-mode
myself, but I guess thats what it does)?
Hi again
sorry for not explaining correctly :)
i guess that yes i want to use my built in abbrev-mode
expansions (which indeed use the space key to expand) but manage the actual abbrv file text inside my yankpad. does that make any sense ? :)
so for example instead of adding my individual abbrv file like currently
** personal abbriviations
:PROPERTIES:
:ID: e09fad19-96c8-4670-8769-29618e50f0d1
:END:
*** new collected abbrv
:PROPERTIES:
:ID: 8b86b856-59b2-402e-ac9d-7cb7c030a145
:END:
to quickly peak at the personal file look here:
file:/home/zeltak/.emacs.d/abbrv/personal_abbrv.txt
to set
#+BEGIN_SRC emacs-lisp :results none
(setq abbrev-file-name "/home/zeltak/.emacs.d/abbrv/personal_abbrv.txt")
#+END_SRC
to autoload it
#+BEGIN_SRC emacs-lisp :results none
(load "/home/zeltak/.emacs.d/abbrv/personal_abbrv.txt")
#+END_SRC
*** loads a huge common abbreviations file
:PROPERTIES:
:ID: a7f03b5c-7e74-4a66-8f56-20bb3bf2b1d3
:END:
file:/home/zeltak/.emacs.d/abbrv/common_abbrv.txt
#+BEGIN_SRC emacs-lisp :results none
(load "/home/zeltak/.emacs.d/abbrv/common_abbrv.txt")
#+END_SRC
*** misc abbrv file (general stuff to quick add)
:PROPERTIES:
:ID: 018d14e4-b169-4c31-8eb2-2588d2b31661
:END:
file:/home/zeltak/.emacs.d/abbrv/misc_abbrv.txt
#+BEGIN_SRC emacs-lisp :results none
(load "/home/zeltak/.emacs.d/abbrv/misc_abbrv.txt")
i would just store and edit them in yankpad. the expansions would still be handed via the emacs internal abbrev-mode
commands. sorta like the complementary use of yasnippet?
if this dosent make sense i understand, just a thought i had :)
best
Z
It's now possible to use yankpad
to add definitions to abbrev-mode
. You need to set the variable yankpad-descriptive-list-treatment
to 'abbrev
. Then abbrevs can be added as descriptive lists inside categories (see the README). Another new features is the :global:
tag which can be added to categories, so that their snippets are always available. This might be useful if you want global abbrevs.
thx so much!
i seem to be missing something since i cant get it to work
i have this in my yankpad conf
(setq yankpad-descriptive-list-treatment "abbrev")
then i added this to my yankpad
* abbrv mode :global:
- name :: zeltak brisbane
when i type name
it dosent get expanded to zeltak brisbane
after i press enter as in emacs other abbrevs. isnt that the way it should work? am i missing something and is my config correct?
thx!
Z
It should be 'abbrev (a symbol) not "abbrev" (a string).
On Sat, Mar 31, 2018, 16:59 zeltak notifications@github.com wrote:
thx so much!
i seem to be missing something since i cant get it to work
i have this in my yankpad conf
(setq yankpad-descriptive-list-treatment "abbrev")
then i added this to my yankpad
- abbrv mode :global:
- name :: zeltak brisbane
when i type name it dosent get expanded to zeltak brisbane after i press enter as in emacs other abbrevs. isnt that the way it should work? am i missing something and is my config correct?
thx!
Z
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/Kungsgeten/yankpad/issues/31#issuecomment-377698900, or mute the thread https://github.com/notifications/unsubscribe-auth/ADysufrhbZ3ixSeZfBiJ-aSjelqa1JE3ks5tj5m9gaJpZM4Srmio .
thx!
so i have this now
(setq yankpad-descriptive-list-treatment 'abbrev )
and i confirmed it
yankpad-descriptive-list-treatment is a variable defined in `yankpad.el'.
Its value is abbrev
yet still cant get name to expand to zeltak brisbane
anything else i should configure/check?
I think it should work. It might be the case that you have to set a category first, so please try yankpad-set-category
. You could also try yankpad-reload
. Also make sure that you've turned on abbrev-mode
.
Hi again and happy Easter ;-)
first i did verify im in abbrev-mode
and also that other non yankpad abbrevs do indeed work
I have reloaded yankpad but a strange thing is (and this maybe a clue to the issue) is that the abbrev section does not appear in the select category! ive even literally copied your section
* Category 2
Descriptive lists at the top-level of a category will be treated as snippets.
You can set them to be treated as =abbrev-mode= abbrevs instead, by setting
=yankpad-descriptive-list-treatment= to abbrev.
- name :: Erik Sjöstrand
- key :: Typing "key" followed by `yankpad-expand' will insert this snippet.
reloaded and still there is now category 2
in yankpad-set-category
could that be the issue
thx!
Z
Perhaps you have a different yankpad-category-level?
On Sun, Apr 1, 2018, 06:27 zeltak notifications@github.com wrote:
Hi again and happy Easter ;-)
first i did verify im in abbrev-mode and also that other non yankpad abbrevs do indeed work
I have reloaded yankpad but a strange thing is (and this maybe a clue to the issue) is that the abbrev section does not appear in the select category! ive even literally copied your section
Category 2
Descriptive lists at the top-level of a category will be treated as snippets. You can set them to be treated as =abbrev-mode= abbrevs instead, by setting =yankpad-descriptive-list-treatment= to abbrev.
- name :: Erik Sjöstrand
- key :: Typing "key" followed by `yankpad-expand' will insert this snippet.
reloaded and still there is now category 2 in yankpad-set-category
could that be the issue
thx!
Z
— You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/Kungsgeten/yankpad/issues/31#issuecomment-377742842, or mute the thread https://github.com/notifications/unsubscribe-auth/ADysucQAMTM6DSDJoknkrHExujoIbxkXks5tkFcZgaJpZM4Srmio .
yes you were right :blush: i changed the category level and it works now as advertised :D
thx so much again for your epic work, seriously its my #1 package i the emacs universe ;-)
best
Z
final question for the day ;-)
as i said yankpad is my most used emacs package and im trying to do as much as i can through it as i find its so great in organizing all my snippets and text entries. One thins i always use alongside snippets in emacs is a misc. abbrv file that i load in each session:
this file has something like this inside
was wondering if i can manage this within yankpad, i know there is overlap and maybe i dont fully understand how abbrv should be used, but wondering what your thoughts are on this?
thx!
z