* attachment questions - notify, and read attachments
@ 2004-11-14 20:48 concernedconsumer
0 siblings, 0 replies; only message in thread
From: concernedconsumer @ 2004-11-14 20:48 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]
Hi,
I've just started using Gnus last week although I am still having
troubles with reading attachments - as well as knowing when I have
them. As of yesterday I downloaded 5.10.6 and replaced 5.9, but still
am not sure how to deal with text, pdf,ps ... attachments I am
receiving. I have apparently configured myself so that I do not even
know about the attachments until I hit t to toggle all my headers.
I see in section 9 p. 316 of the manual discussion of Decoding and
Viewing, but haven't yet figured out how to using this information
(but I can demonstrate my ability to effortlessly break my .gnus file
:) ). Is there a relatively simple line I can add to my .gnus file
that will show the attachment in the message; and, at least, allow me
to save it (or view it)?
I've attacheD my .gnus file as I suspect some things are set
incorrectly or can be improved. Also I am attaching it using C-u C-a,
and will let default options work - I noticed that sending myself
attachments this way sends them encoded in something other than text
(octet-stream?) and I would often prefer it to default to a straight
text attachment - if there is still such a thing?
(ok earthlink gave message won't send application file so I am trying
text/plain)
[-- Attachment #2: how to gnus determine appropriate fileform? --]
[-- Type: text/plain, Size: 6570 bytes --]
;; requires
(require 'bbdb-gnus)
;; Tell Gnus about the news server and method for storing mail
; for earthlink need login name and password stored in .authinfo
(setq nntp-authinfo-file (expand-file-name "~/.authinfo"))
(setq gnus-select-method '(nntp "news.earthlink.net"))
(setq gnus-secondary-select-methods '((nnfolder "")))
;; for sending email
(setq user-full-name " ")
(setq user-mail-address "concernedconsumer@earthlink.net")
(setq message-send-mail-function 'smtpmail-send-it)
(setq send-mail-function 'smtpmail-send-it)
(setq smtpmail-default-smtp-server "mail.earthlink.net")
;; also view these headers in summary buffer
;(setq gnus-extra-headers
; '(To X-Mailer X-Newsreader Message-Id))
;; set visible headers in article buffer
(setq gnus-visible-headers '("^From:" "^Newsgroups:" "^Subject:" "^Date:"
"^Organization:" "^To:" "^Cc:" "Followup-To"
"X-Sent:" "X-URL:" "User-Agent:" "X-Newsreader:"
"^X-Mailer:" "^Reply-To:" "^Followup-To:"
"Posted-To:" "^Summary" "Apparently-To:"
"^Mail-Copies-To:" "^X-Attachments"
"^Gnus-Warning:"))
;receive mail from follow mail boxes
(setq mail-sources
'((file)))
;; where to store sent mail
(setq gnus-message-archive-method
'(nnfolder "archive"
(nnfolder-directory "~/Mail/archive")
(nnfolder-active-file "~/Mail/archive/active")
(nnfolder-get-new-mail nil)
(nnfolder-inhibit-expiry t)))
(setq gnus-message-archive-group
'((concat "sent-mail-"
(format-time-string "%Y" (current-time))))) ;; one yearly sent-mail file
;; splitting mail
(setq nnmail-split-methods
'(("junk" "^Subject:.*viagra")
("consumer" "^To:.*concernedconsumer")
("consumer" "Received:.*concerned")
("inbox" "")))
(setq nnmail-expiry-wait-function
(lambda (group)
(cond ((string= group "inbox") 'never)
( (string= group "junk") 60)
(t 300))))
;; set some faces (see manual p. 359)
;; first define color foregrounds
(copy-face 'bold 'my-green)
(set-face-foreground 'my-green "ForestGreen")
;; \gnusr{create three face types. 12.4.5 usr manual p. 358}
(setq gnus-face-1 'bold)
(setq gnus-face-2 'my-green)
(setq gnus-face-3 'italic)
;; set format for group lines and show all groups
(setq gnus-group-line-format "%M%S%p%P%5y: %(%G%)%l\n")
(gnus-group-list-all-groups)
;also make all groups visible
;(setq gnus-permanently-visible-groups "[^nndraft:(drafts|delayed)]")
;; summary buffer ( manual section 3.1.1 p. 53)
;(defun gnus-user-format-function-d (header)
; "Render date in (dd/mm) format"
; (let* ((date (mail-header-date header))
; (tz (timezone-parse-date date)))
; (format "%02d/%02d"
; (string-to-int (aref tz 2))
; (string-to-int (aref tz 1)))))
(defun gnus-user-format-function-d (header)
; "Render date in (dd/mm) format"
(let* ((date (mail-header-date header))
(tz (timezone-parse-date date)))
(format "%s/%s/%s"
(aref tz 1)
(aref tz 2)
(aref tz 0))))
(setq gnus-summary-line-format "%U%R %ud %I %(%[%2{ %-21,21f%} %]%) %B%s\n")
;(setq gnus-summary-line-format "%U%R%o%I%(%[%-23,23f%]%) %s\n")
;; (see manual p. 57)
(setq gnus-ignored-from-addresses "concernedconsumer@")
(setq gnus-extra-headers '(To Newsgroup))
(setq nnmail-extra-headers gnus-extra-headers)
;(setq gnus-summary-line-format "%U%R%z %4i %([%4L: %-25,25f]%) %s\n")
;(setq gnus-summary-same-subject "-||-")
;;highlighting and menus
;(setq gnus-visual '(highlight))
(setq gnus-visual t)
;;nifty window configurations (see manual section 12.5 p. 360)
(gnus-add-configuration
'(article
(horizontal 1.0
(vertical 25 (group 1.0))
(vertical 1.0
(summary 0.23 point)
(article 1.0)))))
(gnus-add-configuration
'(summary
(horizontal 1.0
(vertical 25 (group 1.0))
(vertical 1.0 (summary 1.0 point)))))
;; bbdb settings
(bbdb-initialize)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
(add-hook 'gnus-startup-hook 'bbdb-insinuate-message)
(add-hook 'gnus-startup-hook 'bbdb-define-all-aliases)
;; web browser
;(setq browse-url-browser-function 'browse-url-w3m)
;;dired support (new in gnus 5.10.6)
(require 'gnus-dired)
(add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
;; Signature separators
(setq gnus-signature-separator
'("^-- $" ; The standard
"^-- *$" ; A common mangling
"^-------*$" ; Many people just use a looong line of dashes. Shame!
"^ *--------*$" ; Double-shame!
"^________*$" ; Underscores are also popular
"^========*$")) ; Pervert!
(setq gnus-signature-limit nil)
;; to fix broken gnus attachment for pdf's
(setq mm-content-transfer-encoding-defaults
(cons '("application/pdf" base64)
mm-content-transfer-encoding-defaults))
;; check attachments are attached
;; from Daniel Barlow's Online Diary (http://ww.telent.net/diary/2003/1/)
(defun check-attachments-attached ()
(interactive)
(save-excursion
(goto-char (point-min))
(let* (
;; Nil when message came from outside (eg calling emacs as editor)
;; Non-nil marker of end of headers.
(internal-messagep
(re-search-forward
(concat "^" (regexp-quote mail-header-separator) "$") nil t))
(end-of-headers ; Start of body.
(copy-marker
(or internal-messagep
(re-search-forward "^$" nil t)
(point-min))))
(limit
(or (re-search-forward "^-- $" nil t)
(point-max)))
(old-case-fold-search case-fold-search))
(unwind-protect
(progn
(goto-char end-of-headers)
(when (search-forward "attach" limit t)
(goto-char end-of-headers)
;; the word 'attach' has been used, can we find an
;; attachment?
(unless
(or (re-search-forward "^<#/" limit t)
(y-or-n-p
"Found the word `attach' but no MIME attachment: send anyway?"
)
(error "Aborted send")))))
(set-marker end-of-headers nil)))))
;
(add-hook 'message-send-hook 'check-attachments-attached)
[-- Attachment #3: Type: text/plain, Size: 21 bytes --]
Many Thanks!
-J.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-11-14 20:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-14 20:48 attachment questions - notify, and read attachments concernedconsumer
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 NNTP newsgroup(s).