unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* require basic stuff from specific packages
@ 2016-07-03 23:13 Emanuel Berg
  2016-07-04  8:10 ` Stefan Monnier
                   ` (2 more replies)
  0 siblings, 3 replies; 30+ messages in thread
From: Emanuel Berg @ 2016-07-03 23:13 UTC (permalink / raw)
  To: help-gnu-emacs

(require 'cl-lib)
(require 'erc)

;; Here is a common situation.
;; You are in need of something low-level, generic.
;; You make a search.
;; You find it, only it is in some other pack that is not
;; low-level or generic, but very specific and
;; has nothing to do with what you do.
;; To `require' it is like venturing into the
;; master's secret workshop to get nails and bolts!
;; What should you do then?
;; Here is an example:

(defun sequence-string (start stop &optional step delim)
  (let*((the-step  (or step 1))
        (the-delim (or delim " "))
        (string    (format "%s" start))
        )
    (cl-loop for n from (+ start the-step) to stop by the-step do
             (setq string
                   (format "%s%s%s" string the-delim n) ))
    (erc-trim-string string) ; here
    ))

;;;; testing for dummies - the fun and easy way:
;;
;; (sequence-string 1 10)          ; "1 2 3 4 5 6 7 8 9 10"
;; (sequence-string 3 5 3)         ; "3"
;; (sequence-string 5 15 2)        ; "5 7 9 11 13 15"
;; (sequence-string 20 30 3 ", ")  ; "20, 23, 26, 29"

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


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

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

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-03 23:13 require basic stuff from specific packages Emanuel Berg
2016-07-04  8:10 ` Stefan Monnier
2016-07-04  8:31 ` Lars Magne Ingebrigtsen
2016-07-05  0:44   ` Emanuel Berg
2016-07-13  1:26     ` Howard Melman
2016-07-13  1:58       ` Drew Adams
     [not found]       ` <mailman.1251.1468375187.26859.help-gnu-emacs@gnu.org>
2016-07-13  2:11         ` Emanuel Berg
     [not found]     ` <mailman.1248.1468373420.26859.help-gnu-emacs@gnu.org>
2016-07-13  2:06       ` Emanuel Berg
2016-07-13 13:31         ` Howard Melman
2016-07-13 14:10           ` Drew Adams
     [not found]         ` <mailman.1273.1468416740.26859.help-gnu-emacs@gnu.org>
2016-07-13 13:40           ` Emanuel Berg
2016-07-13 15:13             ` Drew Adams
     [not found]             ` <mailman.1301.1468422827.26859.help-gnu-emacs@gnu.org>
2016-07-13 16:07               ` Emanuel Berg
2016-07-13 16:16                 ` Kaushal Modi
2016-07-13 16:19                   ` Kaushal Modi
2016-07-13 16:41                     ` Drew Adams
2016-07-13 16:25                 ` Drew Adams
     [not found]                 ` <mailman.1322.1468427133.26859.help-gnu-emacs@gnu.org>
2016-07-13 19:24                   ` Emanuel Berg
2016-07-14  3:12                     ` Howard Melman
     [not found]                     ` <mailman.1377.1468465957.26859.help-gnu-emacs@gnu.org>
2016-07-15  1:49                       ` Emanuel Berg
2016-07-16  7:07                       ` Emanuel Berg
2016-07-19 20:43                         ` EB double-grep function for bash Tomas Nordin
2016-07-14  1:35                   ` require basic stuff from specific packages Emanuel Berg
2016-08-09 14:16 ` Udyant Wig
2016-08-10 15:39   ` Emanuel Berg
2016-08-10 15:51     ` Drew Adams
2016-08-10 17:54     ` Udyant Wig
2016-08-10 19:43       ` Emanuel Berg
2016-08-11  5:38         ` Udyant Wig
2016-08-11 14:49           ` Eli Zaretskii

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).