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

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

bug#59945: [PATCH] Fix empty pairs in js tree-sitter imenu alist


From: Yuan Fu
Subject: bug#59945: [PATCH] Fix empty pairs in js tree-sitter imenu alist
Date: Tue, 20 Dec 2022 20:48:58 -0800

"Charl P. Botha" <cpbotha@vxlabs.com> writes:

> On Fri, Dec 16, 2022, at 16:11, Robert Pluim wrote:
>>>>>>> On Fri, 16 Dec 2022 07:58:46 +0200, "Charl P. Botha" 
>>>>>>> <cpbotha@vxlabs.com> said:
>>     Charl> I followed the instructions at
>>     Charl> 
>> https://www.gnu.org/software/emacs/manual/html_node/emacs/Sending-Patches.html
>>     Charl> which said to use "git format-patch master" and include 
>> either inline
>>     Charl> (which I did) or as a mime attachment.
>>
>> Not quite. You sent the result of 'git format-patch master' as an
>> email, not inline in an email (presumably with 'git send-email'). That
>> shouldnʼt matter, because 'git apply' should work in either case, but
>> attachments are sometimes easier to work with.
>
> Thank you for the correction, Robert! I thought that sending the
> output of `git format-patch master` as a plain-text email was what was
> meant by "inline". I'm sorry about this, I'll stick to attachments in
> the future.

Not really about attachment vs inline. The first patch doesn’t have
author, commit message, etc. I’m fine with either attachment or inline
:-)

> Yuan, can you confirm that the patch I eventually attached is OK?

Thanks! I applied your patch. I made a little change to it so it’s more
idiomatic.

Elisp tip of the day: if you want to make a list of possibly nil objects
and don’t want nil’s in the list, you can use append. Basically change

(list a b c)

to

(append (and xxx (list a)) (and yyy (list b)) (and zzz (list c)))

If the condition aren’t met, eg, (and xxx (list a)) returns nil, append
just appends an empty list.

Yuan





reply via email to

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