all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* require CL once and Gnus twice; also, downscoring threads
@ 2016-08-12  1:20 Emanuel Berg
  2016-08-12 14:03 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Emanuel Berg @ 2016-08-12  1:20 UTC (permalink / raw)
  To: help-gnu-emacs

A while back, I was told you shouldn't do

    xxx

(pedagogically, I don't mention what you
shouldn't do), instead, you should only do

    (require 'cl-lib)

for every and all such cases.

Who told me? It doesn't matter. I believed him.

However, with Gnus, building up the function
provided last, this

    (require 'gnus)

won't do it, instead

    (require 'gnus-score)
    (require 'gnus-sum)

will.

Is this because Gnus is a program and CL is
a library, or is it just one of them
inconsistencies the world - and in particular
the world of computing - is consistently
filled with?

Also, the code:

(defun gnus-summary-uncool-subject ()
  (interactive)
  (let ((subject (gnus-summary-article-subject)))
    (when subject
      (gnus-summary-score-entry
       "Subject" subject
       'e    ; exact string
       -1000 ; enough to mark-and-expunge; see .SCORE file
       nil)  ; no expiration DATE
      )))

Keep it real time.

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 64 Blogomatic articles -                   


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

* Re: require CL once and Gnus twice; also, downscoring threads
  2016-08-12  1:20 require CL once and Gnus twice; also, downscoring threads Emanuel Berg
@ 2016-08-12 14:03 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2016-08-12 14:03 UTC (permalink / raw)
  To: help-gnu-emacs

> A while back, I was told you shouldn't do
>
>     xxx
>
> (pedagogically, I don't mention what you
> shouldn't do), instead, you should only do
>
>     (require 'cl-lib)
>
> for every and all such cases.

I think you've misunderstood the rule to be a lot more general than what
it really is.  That rule was for `cl-lib' only (well, and `cl' as well,
actually).


        Stefan



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

end of thread, other threads:[~2016-08-12 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-12  1:20 require CL once and Gnus twice; also, downscoring threads Emanuel Berg
2016-08-12 14:03 ` Stefan Monnier

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.