help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: How do I go about debugging my Elisp code?


From: Jean Louis
Subject: Re: Fwd: How do I go about debugging my Elisp code?
Date: Sat, 15 Jan 2022 11:24:25 +0300
User-agent: Mutt/2.1.5+104 (cd3a5c8) (2022-01-09)

* Emanuel Berg via Users list for the GNU Emacs text editor 
<help-gnu-emacs@gnu.org> [2022-01-15 05:14]:
> >> One good way to comply is the package I made for friend
> >> from Sweden:
> >>
> >> your hjälpsam Package Header Assistant
> >> https://hyperscope.link/3/7/7/3/0/Your-hjälpsam-Package-Header-Assistant-37730.html
> >
> > Hahaha :D
> >
> > "hjälpsam" = helpful
> 
> Very good!
> 
> Only this:
> 
> (defun package-header-ask-keywords ()
>   "Ask author for package keywords."
>   (let ((keywords '())
>         (keyword))
>     (while (string-match "[^[:blank:]]"
>                          (setq keyword
>                                (completing-read "Keywords: " 
> (package-header-keywords) nil t)))
>       (push keyword keywords))
>     (when keywords
>       (mapconcat 'identity (sort keywords #'string<) " "))))
> 
> In the prompt string, maybe it is a good idea to mention how
> to quit? Type nothing just hit RET? Since/if every pack should
> have at least one keyword, the first PS could be
> 
>   Keyword: [TAB to complete]
> 
> (note the singular form)
> 
> after that it could be
> 
>   Keyword: [RET to quit]
> 
> Then, remove duplicates from the result, I say this because
> when I tried the software it took three times to figure out
> that was how it worked, at first I thought it didn't register,
> so when I finally quit it said
> 
>   Keywords: convenience convenience convenience

Thanks for suggestions, I have changed it now to following:

(defun package-header-ask-keywords ()
  "Ask author for package keywords."
  (let ((keywords '())
        (keyword))
    (while (string-match "[^[:blank:]]"
                         (setq keyword
                               (completing-read "Keywords (RET to quit): " 
(package-header-keywords) nil t)))
      (push keyword keywords))
    (delete-dups keywords)
    (when keywords
      (mapconcat 'identity (sort keywords #'string<) " "))))

And with double key "s p", updated the published information:
https://hyperscope.link/3/7/7/3/0/Your-hj%C3%A4lpsam-Package-Header-Assistant-37730.html



-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]