Skip to main content
syntax highlighting
Source Link
Kaushal Modi
  • 26.4k
  • 4
  • 84
  • 193

Not a general-purpose, but will solve your case:

(apply 'format "%s %s %s" (make-list 3 'a)) 
(apply 'format "%s %s %s" (make-list 3 'a)) 

Using provided example:

(apply 'format (concat " * - :raw-html:`<img width=\"100%%\" " "src=\"http://xxx.xxx/images/languages/" "staff/%s.jpg\" alt=\"%s.jpg\"/>` - .. _%s:") (make-list 3 'some-image)) 

gives:

(apply 'format (concat " * - :raw-html:`<img width=\"100%%\" "  width=\"100%\" "src=\"httpsrc=\"http://xxx.xxx/images/languages/" "staffstaff/%ssome-image.jpg\" alt=\"%salt=\"some-image.jpg\"/>` - .. _%s:")  (make-list 3 'some_some-image)):" 

gives:

" * - :raw-html:`<img width=\"100%\" src=\"http://xxx.xxx/images/languages/staff/some-image.jpg\" alt=\"some-image.jpg\"/>` - .. _some-image:"

Not a general-purpose, but will solve your case:

(apply 'format "%s %s %s" (make-list 3 'a)) 

Using provided example:

(apply 'format (concat " * - :raw-html:`<img width=\"100%%\" "  "src=\"http://xxx.xxx/images/languages/" "staff/%s.jpg\" alt=\"%s.jpg\"/>` - .. _%s:")  (make-list 3 'some-image)) 

gives:

" * - :raw-html:`<img width=\"100%\" src=\"http://xxx.xxx/images/languages/staff/some-image.jpg\" alt=\"some-image.jpg\"/>` - .. _some-image:"

Not a general-purpose, but will solve your case:

(apply 'format "%s %s %s" (make-list 3 'a)) 

Using provided example:

(apply 'format (concat " * - :raw-html:`<img width=\"100%%\" " "src=\"http://xxx.xxx/images/languages/" "staff/%s.jpg\" alt=\"%s.jpg\"/>` - .. _%s:") (make-list 3 'some-image)) 

gives:

" * - :raw-html:`<img width=\"100%\" src=\"http://xxx.xxx/images/languages/staff/some-image.jpg\" alt=\"some-image.jpg\"/>` - .. _some-image:" 
added 443 characters in body
Source Link
wvxvw
  • 11.6k
  • 3
  • 33
  • 58

Not a general-purpose, but will solve your case:

(apply 'format "%s %s %s" (make-list 3 'a)) 

Using provided example:

(apply 'format (concat " * - :raw-html:`<img width=\"100%%\" " "src=\"http://xxx.xxx/images/languages/" "staff/%s.jpg\" alt=\"%s.jpg\"/>` - .. _%s:") (make-list 3 'some-image)) 

gives:

" * - :raw-html:`<img width=\"100%\" src=\"http://xxx.xxx/images/languages/staff/some-image.jpg\" alt=\"some-image.jpg\"/>` - .. _some-image:"

Not a general-purpose, but will solve your case:

(apply 'format "%s %s %s" (make-list 3 'a)) 

Not a general-purpose, but will solve your case:

(apply 'format "%s %s %s" (make-list 3 'a)) 

Using provided example:

(apply 'format (concat " * - :raw-html:`<img width=\"100%%\" " "src=\"http://xxx.xxx/images/languages/" "staff/%s.jpg\" alt=\"%s.jpg\"/>` - .. _%s:") (make-list 3 'some-image)) 

gives:

" * - :raw-html:`<img width=\"100%\" src=\"http://xxx.xxx/images/languages/staff/some-image.jpg\" alt=\"some-image.jpg\"/>` - .. _some-image:"

Source Link
wvxvw
  • 11.6k
  • 3
  • 33
  • 58

Not a general-purpose, but will solve your case:

(apply 'format "%s %s %s" (make-list 3 'a))