unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords
       [not found] ` <20220706035731.254D5C01681@vcs2.savannah.gnu.org>
@ 2022-07-06  4:30   ` Stefan Monnier
  2022-07-06  4:41     ` Protesilaos Stavrou
  2022-07-07 15:34     ` Philip Kaludercic
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2022-07-06  4:30 UTC (permalink / raw)
  To: emacs-devel; +Cc: Protesilaos Stavrou

> +  (if denote-allow-multi-word-keywords
> +      (mapcar #'denote--sluggify keywords)
> +    (mapcar #'denote--sluggify-and-join keywords)))

Aka

    (mapcar (if denote-allow-multi-word-keywords
                #'denote--sluggify
              #'denote--sluggify-and-join)
            keywords))


-- Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords
  2022-07-06  4:30   ` [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords Stefan Monnier
@ 2022-07-06  4:41     ` Protesilaos Stavrou
  2022-07-07 15:34     ` Philip Kaludercic
  1 sibling, 0 replies; 7+ messages in thread
From: Protesilaos Stavrou @ 2022-07-06  4:41 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Wed, 06 Jul 2022 00:30:22 -0400
>
>> +  (if denote-allow-multi-word-keywords
>> +      (mapcar #'denote--sluggify keywords)
>> +    (mapcar #'denote--sluggify-and-join keywords)))
>
> Aka
>
>     (mapcar (if denote-allow-multi-word-keywords
>                 #'denote--sluggify
>               #'denote--sluggify-and-join)
>             keywords))

Better.  Thank you!

-- 
Protesilaos Stavrou
https://protesilaos.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords
  2022-07-06  4:30   ` [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords Stefan Monnier
  2022-07-06  4:41     ` Protesilaos Stavrou
@ 2022-07-07 15:34     ` Philip Kaludercic
  2022-07-07 15:37       ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Philip Kaludercic @ 2022-07-07 15:34 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, Protesilaos Stavrou

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> +  (if denote-allow-multi-word-keywords
>> +      (mapcar #'denote--sluggify keywords)
>> +    (mapcar #'denote--sluggify-and-join keywords)))
>
> Aka
>
>     (mapcar (if denote-allow-multi-word-keywords
>                 #'denote--sluggify
>               #'denote--sluggify-and-join)
>             keywords))

Is there any substantial advantage to pulling the if into the mapcar?

>
> -- Stefan



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords
  2022-07-07 15:34     ` Philip Kaludercic
@ 2022-07-07 15:37       ` Stefan Monnier
  2022-07-07 16:04         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2022-07-07 15:37 UTC (permalink / raw)
  To: Philip Kaludercic; +Cc: emacs-devel, Protesilaos Stavrou

>>     (mapcar (if denote-allow-multi-word-keywords
>>                 #'denote--sluggify
>>               #'denote--sluggify-and-join)
>>             keywords))
>
> Is there any substantial advantage to pulling the if into the mapcar?

It's good for karma because you get to reduce code duplication.


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords
  2022-07-07 15:37       ` Stefan Monnier
@ 2022-07-07 16:04         ` Eli Zaretskii
  2022-07-10 13:25           ` Robert Pluim
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2022-07-07 16:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: philipk, emacs-devel, info

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: emacs-devel@gnu.org,  Protesilaos Stavrou <info@protesilaos.com>
> Date: Thu, 07 Jul 2022 11:37:30 -0400
> 
> >>     (mapcar (if denote-allow-multi-word-keywords
> >>                 #'denote--sluggify
> >>               #'denote--sluggify-and-join)
> >>             keywords))
> >
> > Is there any substantial advantage to pulling the if into the mapcar?
> 
> It's good for karma because you get to reduce code duplication.

Not if you are being paid by LOC count.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords
  2022-07-07 16:04         ` Eli Zaretskii
@ 2022-07-10 13:25           ` Robert Pluim
  2022-07-11  1:37             ` Dmitry Gutov
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Pluim @ 2022-07-10 13:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Stefan Monnier, philipk, emacs-devel, info

>>>>> On Thu, 07 Jul 2022 19:04:54 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Stefan Monnier <monnier@iro.umontreal.ca>
    >> Cc: emacs-devel@gnu.org,  Protesilaos Stavrou <info@protesilaos.com>
    >> Date: Thu, 07 Jul 2022 11:37:30 -0400
    >> 
    >> >>     (mapcar (if denote-allow-multi-word-keywords
    >> >>                 #'denote--sluggify
    >> >>               #'denote--sluggify-and-join)
    >> >>             keywords))
    >> >
    >> > Is there any substantial advantage to pulling the if into the mapcar?
    >> 
    >> It's good for karma because you get to reduce code duplication.

    Eli> Not if you are being paid by LOC count.

Iʼd much rather get paid by number of bugs fixed in my own code.

Robert
-- 



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords
  2022-07-10 13:25           ` Robert Pluim
@ 2022-07-11  1:37             ` Dmitry Gutov
  0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Gutov @ 2022-07-11  1:37 UTC (permalink / raw)
  To: Robert Pluim, Eli Zaretskii; +Cc: Stefan Monnier, philipk, emacs-devel, info

On 10.07.2022 16:25, Robert Pluim wrote:
>>>>>> On Thu, 07 Jul 2022 19:04:54 +0300, Eli Zaretskii<eliz@gnu.org>  said:
>      >> From: Stefan Monnier<monnier@iro.umontreal.ca>
>      >> Cc:emacs-devel@gnu.org,  Protesilaos Stavrou<info@protesilaos.com>
>      >> Date: Thu, 07 Jul 2022 11:37:30 -0400
>      >>
>      >> >>     (mapcar (if denote-allow-multi-word-keywords
>      >> >>                 #'denote--sluggify
>      >> >>               #'denote--sluggify-and-join)
>      >> >>             keywords))
>      >> >
>      >> > Is there any substantial advantage to pulling the if into the mapcar?
>      >>
>      >> It's good for karma because you get to reduce code duplication.
> 
>      Eli> Not if you are being paid by LOC count.
> 
> Iʼd much rather get paid by number of bugs fixed in my own code.

Sounds lucrative!



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-11  1:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <165707985011.9601.627786867785409616@vcs2.savannah.gnu.org>
     [not found] ` <20220706035731.254D5C01681@vcs2.savannah.gnu.org>
2022-07-06  4:30   ` [elpa] externals/denote e24c9ddc12 2/2: Merge pull request #36 from jeanphilippegg/allow-no-keywords Stefan Monnier
2022-07-06  4:41     ` Protesilaos Stavrou
2022-07-07 15:34     ` Philip Kaludercic
2022-07-07 15:37       ` Stefan Monnier
2022-07-07 16:04         ` Eli Zaretskii
2022-07-10 13:25           ` Robert Pluim
2022-07-11  1:37             ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).