~ubuntu-branches/ubuntu/wily/semi/wily

« back to all changes in this revision

Viewing changes to mime-edit.el

  • Committer: Bazaar Package Importer
  • Author(s): Tatsuya Kinoshita
  • Date: 2010-02-08 23:40:04 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100208234004-zra1zdm4bgijt51o
Tags: 1.14.6+0.20100207-1
* New upstream release. (CVS semi-1_14 branch on 2010-02-07)
  - Fix non-compliant messages that are signed and encrypted with OpenPGP.
    (closes: #555472)
  - Fix missing mandatory "Version: 1" field for application/pgp-encrypted.
    (closes: #554720)
* debian/rules: Add direntry to *.texi for *.info. (closes: #528895)
* debian/prerm, debian/postinst: Removed.
* debian/control:
  - Add `dpkg (>= 1.15.4) | install-info' to Depends.
  - Add `${misc:Depends}' to Depends.
  - Set Section to lisp.
  - Update Standards-Version to 3.8.4.
* debian/copyright: Updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
     ("enriched")
206
206
     ("html")
207
207
     ("css") ; rfc2318
 
208
     ("csv") ; rfc4180
208
209
     ("xml") ; rfc2376
209
210
     ("x-latex")
210
211
     ;; ("x-rot13-47-48")
234
235
     ("news")
235
236
     )
236
237
    ("application"
 
238
     ("javascript")
 
239
     ("msword")
237
240
     ("octet-stream" ("type" "" "tar" "shar"))
238
241
     ("postscript")
239
242
     ("pdf")
 
243
     ("rtf")
 
244
     ("zip")
 
245
     ("x-shockwave-flash")
 
246
     ("x-7z-compressed")
 
247
 
 
248
                                        ; OpenOffice
 
249
     ("vnd.oasis.opendocument.text")
 
250
     ("vnd.oasis.opendocument.spreadsheet")
 
251
     ("vnd.oasis.opendocument.graphics")
 
252
     ("vnd.oasis.opendocument.chart")
 
253
     ("vnd.oasis.opendocument.formula")
 
254
     ("vnd.oasis.opendocument.text-master")
 
255
     ("vnd.oasis.opendocument.presentation")
 
256
     ("vnd.oasis.opendocument.text-template")
 
257
     ("vnd.oasis.opendocument.spreadsheet-template")
 
258
     ("vnd.oasis.opendocument.presentation-template")
 
259
     ("vnd.oasis.opendocument.graphics-template")
 
260
 
240
261
     ("msword")
241
262
     ("vnd.ms-excel")
242
263
     ("vnd.ms-powerpoint")
 
264
                                        ; Microsoft Office (OpenXML)
 
265
     ("vnd.ms-excel.addin.macroEnabled.12")
 
266
     ("vnd.ms-excel.sheet.binary.macroEnabled.12")
 
267
     ("vnd.ms-excel.sheet.macroEnabled.12")
 
268
     ("vnd.ms-excel.template.macroEnabled.12")
 
269
     ("vnd.ms-powerpoint.addin.macroEnabled.12")
 
270
     ("vnd.ms-powerpoint.presentation.macroEnabled.12")
 
271
     ("vnd.ms-powerpoint.slideshow.macroEnabled.12")
 
272
     ("vnd.ms-powerpoint.template.macroEnabled.12")
 
273
     ("vnd.ms-word.document.macroEnabled.12")
 
274
     ("vnd.ms-word.template.macroEnabled.12")
 
275
     ("vnd.openxmlformats-officedocument.presentationml.presentation")
 
276
     ("vnd.openxmlformats-officedocument.presentationml.slideshow")
 
277
     ("vnd.openxmlformats-officedocument.presentationml.template")
 
278
     ("vnd.openxmlformats-officedocument.spreadsheetml.sheet")
 
279
     ("vnd.openxmlformats-officedocument.spreadsheetml.template")
 
280
     ("vnd.openxmlformats-officedocument.wordprocessingml.document")
 
281
     ("vnd.openxmlformats-officedocument.wordprocessingml.template")
 
282
     ("vnd.ms-xpsdocument")
 
283
                                        ; Microsoft Project
 
284
     ("vnd.ms-project")
243
285
     ("x-kiss" ("x-cnf")))
244
286
    ("image"
 
287
     ("bmp")
245
288
     ("gif")
246
289
     ("jpeg")
247
290
     ("png")
 
291
     ("svg+xml")
248
292
     ("tiff")
249
293
     ("x-pic")
250
294
     ("x-mag")
251
295
     ("x-xwd")
252
 
     ("x-xbm")
253
 
     )
254
 
    ("audio" ("basic"))
255
 
    ("video" ("mpeg"))
256
 
    )
 
296
     ("x-xbm"))
 
297
    ("audio"
 
298
     ("basic")
 
299
     ("mpeg")
 
300
     ("ogg")
 
301
     ("vorbis"))
 
302
    ("video"
 
303
     ("mpeg")
 
304
     ("ogg")
 
305
     ("mp4")
 
306
     ("quicktime")
 
307
     ("x-flv")))
257
308
  "*Alist of content-type, subtype, parameters and its values.")
258
309
 
259
310
(defcustom mime-file-types
287
338
 
288
339
    ;; Text or translated text
289
340
 
290
 
    ("\\.txt$"
 
341
    ("\\.txt$\\|\\.pln$"
291
342
     "text"     "plain"         nil
292
343
     nil
293
344
     "inline"           (("filename" . file))
294
345
     )
295
346
 
 
347
    ("\\.css$"
 
348
     "text"     "css"           nil
 
349
     nil
 
350
     "inline"           (("filename" . file))
 
351
     )
 
352
 
 
353
    ("\\.csv$"
 
354
     "text"     "csv"           nil
 
355
     nil
 
356
     "inline"           (("filename" . file))
 
357
     )
 
358
 
 
359
    ("\\.tex$\\|\\.latex$"
 
360
     "text"     "x-latex"       nil
 
361
     nil
 
362
     "inline"           (("filename" . file))
 
363
     )
 
364
 
296
365
     ;; .rc : procmail modules pm-xxxx.rc
297
366
     ;; *rc : other resource files
298
367
 
317
386
     "text"     "plain"         nil     nil     nil     nil)
318
387
 
319
388
 
320
 
    ;;  Octect binary text
 
389
    ("\\.js$"
 
390
     "application"      "javascript" nil
 
391
     nil
 
392
     "inline"   (("filename" . file))
 
393
     )
321
394
 
 
395
    
 
396
    ;; Microsoft Project
 
397
    ("\\.mpp$"
 
398
     "application" "vnd.ms-project" nil
 
399
     "base64"
 
400
     "attachment" (("filename" . file))
 
401
     )
 
402
    
 
403
    
 
404
    ;; Microsoft Office (none-OpenXML)
 
405
    
 
406
    ("\\.rtf$"                          ; Rich text format
 
407
     "application" "rtf" nil
 
408
     "base64"
 
409
     "attachment" (("filename" . file))
 
410
     )
322
411
    ("\\.doc$"                          ;MS Word
323
412
     "application" "msword" nil
324
413
     "base64"
335
424
     "attachment" (("filename" . file))
336
425
     )
337
426
 
338
 
    ("\\.pln$"
339
 
     "text"     "plain"         nil
340
 
     nil
341
 
     "inline"           (("filename" . file))
342
 
     )
 
427
    
 
428
    ;; Microsoft Office (OpenXML)
 
429
    
 
430
                                        ; MS Word
 
431
    ("\\.docm$"
 
432
     "application" "vnd.ms-word.document.macroEnabled.12" nil
 
433
     "base64"
 
434
     "attachment" (("filename" . file))
 
435
     )
 
436
    ("\\.docx$"
 
437
     "application" "vnd.openxmlformats-officedocument.wordprocessingml.document" nil
 
438
     "base64"
 
439
     "attachment" (("filename" . file))
 
440
     )
 
441
    ("\\.dotm$"
 
442
     "application" "vnd.ms-word.template.macroEnabled.12" nil
 
443
     "base64"
 
444
     "attachment" (("filename" . file))
 
445
     )
 
446
    ("\\.dotx$"
 
447
     "application" "vnd.openxmlformats-officedocument.wordprocessingml.template" nil
 
448
     "base64"
 
449
     "attachment" (("filename" . file))
 
450
     )
 
451
    
 
452
                                        ; MS Power Point
 
453
    ("\\.potm$"
 
454
     "application" "vnd.ms-powerpoint.template.macroEnabled.12" nil
 
455
     "base64"
 
456
     "attachment" (("filename" . file))
 
457
     )
 
458
    ("\\.potx$"
 
459
     "application" "vnd.openxmlformats-officedocument.presentationml.template" nil
 
460
     "base64"
 
461
     "attachment" (("filename" . file))
 
462
     )
 
463
    ("\\.ppam$"
 
464
     "application" "vnd.ms-powerpoint.addin.macroEnabled.12" nil
 
465
     "base64"
 
466
     "attachment" (("filename" . file))
 
467
     )
 
468
    ("\\.ppsm$"
 
469
     "application" "vnd.ms-powerpoint.slideshow.macroEnabled.12" nil
 
470
     "base64"
 
471
     "attachment" (("filename" . file))
 
472
     )
 
473
    ("\\.ppsx$"
 
474
     "application" "vnd.openxmlformats-officedocument.presentationml.slideshow" nil
 
475
     "base64"
 
476
     "attachment" (("filename" . file))
 
477
     )
 
478
    ("\\.pptm$"
 
479
     "application" "vnd.ms-powerpoint.presentation.macroEnabled.12" nil
 
480
     "base64"
 
481
     "attachment" (("filename" . file))
 
482
     )
 
483
    ("\\.pptx$"
 
484
     "application" "vnd.openxmlformats-officedocument.presentationml.presentation" nil
 
485
     "base64"
 
486
     "attachment" (("filename" . file))
 
487
     )
 
488
    
 
489
                                        ; MS Excel
 
490
    ("\\.xlam$"
 
491
     "application" "vnd.ms-excel.addin.macroEnabled.12" nil
 
492
     "base64"
 
493
     "attachment" (("filename" . file))
 
494
     )
 
495
    ("\\.xlsb$"
 
496
     "application" "vnd.ms-excel.sheet.binary.macroEnabled.12" nil
 
497
     "base64"
 
498
     "attachment" (("filename" . file))
 
499
     )
 
500
    ("\\.xlsm$"
 
501
     "application" "vnd.ms-excel.sheet.macroEnabled.12" nil
 
502
     "base64"
 
503
     "attachment" (("filename" . file))
 
504
     )
 
505
    ("\\.xlsx$"
 
506
     "application" "vnd.openxmlformats-officedocument.spreadsheetml.sheet" nil
 
507
     "base64"
 
508
     "attachment" (("filename" . file))
 
509
     )
 
510
    ("\\.xltm$"
 
511
     "application" "vnd.ms-excel.template.macroEnabled.12" nil
 
512
     "base64"
 
513
     "attachment" (("filename" . file))
 
514
     )
 
515
    ("\\.xltx$"
 
516
     "application" "vnd.openxmlformats-officedocument.spreadsheetml.template" nil
 
517
     "base64"
 
518
     "attachment" (("filename" . file))
 
519
     )
 
520
    
 
521
    
 
522
    ;; Open Office
 
523
    ("\\.odt$"
 
524
     "application" "vnd.oasis.opendocument.text" nil
 
525
     "base64"
 
526
     "attachment" (("filename" . file))
 
527
     )
 
528
    ("\\.ods$"
 
529
     "application" "vnd.oasis.opendocument.spreadsheet" nil
 
530
     "base64"
 
531
     "attachment" (("filename" . file))
 
532
     )
 
533
    ("\\.odg$"
 
534
     "application" "vnd.oasis.opendocument.graphics" nil
 
535
     "base64"
 
536
     "attachment" (("filename" . file))
 
537
     )
 
538
    ("\\.odf$"
 
539
     "application" "vnd.oasis.opendocument.formula" nil
 
540
     "base64"
 
541
     "attachment" (("filename" . file))
 
542
     )
 
543
    ("\\.odm$"
 
544
     "application" "vnd.oasis.opendocument.text-master" nil
 
545
     "base64"
 
546
     "attachment" (("filename" . file))
 
547
     )
 
548
    ("\\.odp$"
 
549
     "application" "vnd.oasis.opendocument.presentation" nil
 
550
     "base64"
 
551
     "attachment" (("filename" . file))
 
552
     )
 
553
    ("\\.ott$"
 
554
     "application" "vnd.oasis.opendocument.text-template" nil
 
555
     "base64"
 
556
     "attachment" (("filename" . file))
 
557
     )
 
558
    ("\\.ots$"
 
559
     "application" "vnd.oasis.opendocument.spreadsheet-template" nil
 
560
     "base64"
 
561
     "attachment" (("filename" . file))
 
562
     )
 
563
    ("\\.otp$"
 
564
     "application" "vnd.oasis.opendocument.presentation-template" nil
 
565
     "base64"
 
566
     "attachment" (("filename" . file))
 
567
     )
 
568
    ("\\.otg$"
 
569
     "application" "vnd.oasis.opendocument.graphics-template" nil
 
570
     "base64"
 
571
     "attachment" (("filename" . file))
 
572
     )
 
573
    
 
574
        ;; Postscript and PDF
343
575
    ("\\.ps$"
344
576
     "application" "postscript" nil
345
577
     "base64"
368
600
     "base64"
369
601
     "inline"           (("filename" . file))
370
602
     )
 
603
    ("\\.bmp$"
 
604
     "image"    "bmp"           nil
 
605
     "base64"
 
606
     "inline"           (("filename" . file))
 
607
     )
 
608
    ("\\.svg$"
 
609
     "image"    "svg+xml"   nil
 
610
     "base64"
 
611
     "inline"           (("filename" . file))
 
612
     )
371
613
    ("\\.tiff$"
372
614
     "image"    "tiff"          nil
373
615
     "base64"
393
635
     "base64"
394
636
     "inline"           (("filename" . file))
395
637
     )
396
 
    ("\\.au$"
 
638
 
 
639
        ;; Audio and video
 
640
 
 
641
    ("\\.au$\\|\\.snd$"
397
642
     "audio"    "basic"         nil
398
643
     "base64"
399
644
     "attachment"               (("filename" . file))
400
645
     )
401
 
    ("\\.mpg$"
 
646
    ("\\.mp[234]\\|\\.m4[abp]$"
 
647
     "audio"    "mpeg"          nil
 
648
     "base64"
 
649
     "attachment"               (("filename" . file))
 
650
     )
 
651
    ("\\.ogg$"
 
652
     "audio"    "ogg"           nil
 
653
     "base64"
 
654
     "attachment"               (("filename" . file))
 
655
     )
 
656
    ("\\.ogg$"
 
657
     "audio"    "vorbis"                nil
 
658
     "base64"
 
659
     "attachment"               (("filename" . file))
 
660
     )
 
661
    ("\\.mpg\\|\\.mpeg$"
402
662
     "video"    "mpeg"          nil
403
663
     "base64"
404
664
     "attachment"       (("filename" . file))
405
665
     )
 
666
    ("\\.mp4\\|\\.m4v$"
 
667
     "video"    "mp4"           nil
 
668
     "base64"
 
669
     "attachment"       (("filename" . file))
 
670
     )
 
671
    ("\\.qt$\\|\\.mov$"
 
672
     "video"    "quicktime"             nil
 
673
     "base64"
 
674
     "attachment"       (("filename" . file))
 
675
     )
 
676
    ("\\.flv$"
 
677
     "video"    "x-flv"         nil
 
678
     "base64"
 
679
     "attachment"       (("filename" . file))
 
680
     )
 
681
    ("\\.swf$"
 
682
     "application"      "x-shockwave-flash"             nil
 
683
     "base64"
 
684
     "attachment"       (("filename" . file))
 
685
     )
 
686
 
 
687
 
 
688
        ;; Compressed files
 
689
 
406
690
    ("\\.tar\\.gz$"
407
691
     "application" "octet-stream" (("type" . "tar+gzip"))
408
692
     "base64"
443
727
     "base64"
444
728
     "attachment"       (("filename" . file))
445
729
     )
 
730
    ("\\.7z$"
 
731
     "application" "x-7z-compressed" nil
 
732
     "base64"
 
733
     "attachment"       (("filename" . file))
 
734
     )
446
735
 
447
736
    ;; Rest
448
737
 
1157
1446
          (disposition-type (nth 4 guess))
1158
1447
          (disposition-params (nth 5 guess))
1159
1448
          )
1160
 
    (if verbose
1161
 
        (setq type    (mime-prompt-for-type type)
 
1449
    (if (or (interactive-p) verbose)
 
1450
        (setq type (mime-prompt-for-type type)
1162
1451
              subtype (mime-prompt-for-subtype type subtype)
1163
 
              ))
1164
 
    (if (or (interactive-p) verbose)
1165
 
        (setq encoding (mime-prompt-for-encoding encoding))
1166
 
      )
 
1452
              encoding (mime-prompt-for-encoding encoding)))
1167
1453
    (if (or (consp parameters) (stringp disposition-type))
1168
1454
        (let ((rest parameters) cell attribute value)
1169
1455
          (setq parameters "")
1935
2221
--%s
1936
2222
Content-Type: application/pgp-encrypted
1937
2223
 
 
2224
Version: 1
1938
2225
--%s
1939
2226
Content-Type: application/octet-stream
1940
2227
Content-Transfer-Encoding: 7bit
2604
2891
                   (match-end 0)
2605
2892
                 )))
2606
2893
        )
2607
 
    (if beg
2608
 
        (dolist (pgp-processing mime-edit-pgp-processing)
2609
 
          (case pgp-processing
2610
 
            (sign
2611
 
             (mime-edit-enclose-pgp-signed-region 
2612
 
              beg (point-max))
2613
 
             )
2614
 
            (encrypt
2615
 
             (mime-edit-enclose-pgp-encrypted-region 
2616
 
              beg (point-max))
2617
 
             )))
 
2894
    (when beg
 
2895
      (if (memq 'sign mime-edit-pgp-processing)
 
2896
          (mime-edit-enclose-pgp-signed-region beg (point-max)))
 
2897
      (if (memq 'encrypt mime-edit-pgp-processing)
 
2898
          (mime-edit-enclose-pgp-encrypted-region beg (point-max)))
2618
2899
      )))
2619
2900
 
2620
 
 
2621
2901
;;; @ split
2622
2902
;;;
2623
2903