[Flug] il file .emacs di RMS ?
Gianni Bianchini
giannibi@firenze.linux.it
Gio 23 Maggio 2013 22:51:51 CEST
Il 15/05/2013 09:15, Marco Calamari ha scritto:
> Io non ce l'ho mai avuto, ma avete provato con Nina?
Eccolo qua, ad imperitura memoria. Me lo ha passato la mitica Nina Bigi,
che lo estorse personalmente a RMS avendolo sedotto la sera del 21
Giugno 2002 a Bologna, dopo la prima giornata dell'indimenticabile
Hackit al TPO. Che tempi! E che gran p@ssera che era la Nina a quell'epoca!
Ciao,
Gianni
-------------- parte successiva --------------
(setq garbage-collection-messages t)
(setq vc-cvs-global-switches '("-z9"))
(setq x-alt-keysym 'meta)
(modify-frame-parameters nil '((screen-gamma . 1.5)))
(setq frame-title-format (concat "%b - " (invocation-name)))
;;(if (string-match "20" emacs-version)
(define-key esc-map "[3~" [delete])
(setq default-frame-alist (cons (cons 'screen-gamma 1.5) default-frame-alist))
(setq initial-frame-alist (cons (cons 'screen-gamma 1.5) initial-frame-alist))
(or window-system
(set-screen-width 80))
(setq load-path (cons "/usr/share/emacs/site-lisp/mailcrypt/"
load-path))
;;; (require 'mailcrypt-init)
(load-library "mailcrypt")
(mc-setversion "gpg")
;;; This is for all machines.
(add-hook 'dired-mode-hook
'(lambda ()
(if (equal dired-directory "~/inout/")
(setq revert-buffer-function '(lambda (&rest ignore) (error "Can't revert"))))))
(put 'narrow-to-region 'disabled nil)
(put 'eval-expression 'disabled nil)
(setq history-length 100)
(setq version-control t)
(setq next-line-add-newlines t)
(setq kept-new-versions 100)
(setq lpr-headers-switches '("-p"))
(setq rmail-confirm-expunge nil)
;(setq debug-on-error t)
;(rmail)
(setq-default abbrev-mode t)
(defun copy-to-mail ()
(interactive)
(let ((string
(save-excursion
(if (not (eq major-mode 'rmail-mode))
(progn
(set-buffer "RMAIL")
(buffer-substring (point) (mark)))
(buffer-substring (region-beginning) (region-end)))))
(obuf (current-buffer))
(mailbuf (if (eq major-mode 'mail-mode) (current-buffer)
(choose-mail-buffer))))
(if (get-buffer-window mailbuf)
(select-window (get-buffer-window mailbuf))
(switch-to-buffer-other-window mailbuf))
(let ((opoint (point)))
(if (and (not (string-match "\`\n" string))
(or (not (bolp))
(save-excursion
(forward-line -1)
(not (looking-at "$\\|--text follows this line--$")))))
(newline))
(insert string)
(push-mark opoint)
(indent-rigidly opoint (point) 4))))
(defun mail-setup-1 ()
(save-excursion
(goto-char (point-min))
(insert "From: Richard Stallman <rms@gnu.org>\n")))
(add-hook 'mail-setup-hook 'mail-setup-1)
(defun choose-mail-buffer ()
(car (all-completions "*mail*"
(mapcar 'list (mapcar 'buffer-name (buffer-list))))))
(setq mail-mode-hook
'(lambda ()
(define-key mail-mode-map "\M-," 'copy-to-mail)))
(defun wget ()
(interactive)
(search-forward "http://")
(let ((beg (match-beginning 0)))
(skip-chars-forward "^ \t\n\")")
(skip-chars-backward ",.>")
(mail nil "wget" (concat "wget " (buffer-substring beg (point))))))
;;(load "~/vc/vc-hooks")
;;(load "~/vc/vc")
(load "~/replies.el")
(add-hook 'rmail-mode-hook
'(lambda ()
(define-key rmail-mode-map "R" 'send-fast-reply)
(define-key rmail-mode-map "B" 'change-bug-status)
(define-key rmail-mode-map "s" nil)
(define-key rmail-mode-map "\M-," 'copy-to-mail)))
(setq directory-abbrev-alist
(cons '("^/usr/gnu/gcc/ccdir/" . "~/cc/") directory-abbrev-alist))
(setq auto-mode-alist
(cons '("\\(\\`\\|/\\)out-[0-9]+\\'" . mail-mode)
(cons '("\\(\\`\\|/\\)private-[0-9]+\\'" . mail-mode)
auto-mode-alist)))
(defun raisin ()
(interactive)
(raise-frame (selected-frame)))
(global-set-key "\C-cr" 'raisin)
(defun c-unprotoize-function ()
(interactive)
(search-forward "{")
(beginning-of-line)
(forward-sexp -1)
(forward-char 1)
(let (args (beg (point)))
(forward-char -1)
(forward-sexp 1)
(forward-char -1)
(setq args (buffer-substring beg (point)))
(narrow-to-region beg (point))
(goto-char (point-min))
(skip-chars-forward " \t\n")
(if (eobp)
nil
(goto-char (point-min))
(let ((op (point)))
(while (search-forward "," nil t)
(forward-sexp -1)
(delete-region op (point))
(insert " ")
(search-forward ",")
(setq op (point)))
(goto-char (point-max))
(forward-sexp -1)
(delete-region op (point))
(insert " "))
(goto-char (point-min))
(delete-region (point) (1+ (point)))
(widen)
(forward-line 1)
(insert args)
(narrow-to-region 1 (point))
(goto-char (- (point) (length args)))
(while (search-forward "," nil t)
(delete-region (1- (point)) (point))
(insert ";")
(c-indent-command)
(or (eolp)
(newline)))
(goto-char (point-max))
(insert ";")
(c-indent-command)
(widen)
(or (eolp)
(newline)))))
(put 'erase-buffer 'disabled nil)
(defun lafreply ()
(interactive)
(let* ((from (mail-fetch-field "from"))
(from-address from)
found)
(if (string-match "<\\([^>]\\)>" from)
(setq from-address (substring from (match-beginning 1) (match-end 1))))
(unwind-protect
(save-excursion
(set-buffer (get-buffer-create " laftemp"))
(erase-buffer)
(insert-file-contents "~/lpf-recruit")
(setq found (search-forward from nil t))
(or found
(write-region (concat from "\n") nil "~/lpf-recruit" t)))
(kill-buffer " laftemp"))
(or found
(progn
(mail nil from "Unrelated question" nil nil nil nil)
(insert "\
By the way, on another topic, what do you think about look and feel
lawsuits? Do you think it is a good thing for interfaces to be
copyrighted?")))))
(require 'rsz-mini)
(setq send-all-mail-files-done nil)
(defun send-all-mail ()
(interactive)
(let ((buffer (get-buffer-create "*sending*"))
(dir default-directory)
(send-mail-function 'sendmail-send-it)
(files (append (nreverse (file-name-all-completions
"out-" default-directory))
(nreverse (file-name-all-completions
"private-" default-directory)))))
(save-excursion
(set-buffer buffer)
(setq default-directory dir)
(mail-mode)
(while files
(progn
(erase-buffer)
(message "Sending %s..." (car files))
(insert-file-contents (car files))
(mail-send)
;; Rename the file to make it as sent.
(let ((dir (file-name-directory (car files)))
(nondir (file-name-nondirectory (car files))))
(rename-file (car files)
(expand-file-name
(concat "sent"
(substring nondir
(string-match "-" nondir)))
dir)))
(message "Sending %s...done" (car files))
(if (cdr files)
(sit-for 1.3)))
(setq files (cdr files)))
(message "All sent"))))
(defun merge-mail-file (into-file)
(interactive "FMerge into file: ")
(save-restriction
(widen)
(goto-char (point-min))
(search-forward "\037")
(append-to-file (point) (point-max) into-file)))
(defun narrow-to-defun (&optional arg)
"Make text outside current defun invisible.
The defun visible is the one that contains point or follows point."
(interactive)
(save-excursion
(widen)
(beginning-of-defun)
(narrow-to-region (point) (progn (end-of-defun) (point)))))
(define-key ctl-x-map "nd" 'narrow-to-defun)
(defun find-outs ()
(interactive)
(mapc 'find-file-noselect (file-expand-wildcards "out-*[0-9]")))
(defun test-pretester ()
"Send mail to one old pretester asking if he wants to keep pretesting.
This should be used in a buffer with one address per line
and nothing on the line except the address."
(interactive)
(beginning-of-line)
(let ((name (buffer-substring (point) (save-excursion (end-of-line) (point)))))
(save-excursion
(set-buffer (get-buffer-create "*pretestmail*"))
(erase-buffer)
(mail-setup name (concat "Emacs pretesting (" name ")") nil nil nil nil)
(goto-char (point-max))
(insert
"If you are still interested in being on the Emacs pretest list,
would you please tell me? I would like to remove the inactive names
from the list, so I can see where we really stand in terms of pretesters.")
(mail-send))
(forward-line 1)))
(defun cancel-spam ()
(interactive)
(save-restriction
(narrow-to-region (rmail-msgbeg rmail-current-message) (point-max))
(let ((msgid (mail-fetch-field "Message-ID"))
(group (mail-fetch-field "Newsgroups")))
;; Ensure we are looking at the whole message.
(save-current-buffer
(news-post-news t)
(goto-char (point-min))
(search-forward "Newsgroups:")
(end-of-line)
(insert group)
(search-forward "Subject:")
(end-of-line)
(insert "cmsg cancel " msgid)
(forward-line 1)
(insert "Control: cancel " msgid "\n")
(goto-char (point-max))
(insert "Cancelling a spam.")
(news-inews)))))
(defvar private-regexp
"dzm@\\|sarah\\|brainsploitation@\\|rhonda@\\|pucepea@\\|gep@")
(defun my-send-it ()
(save-excursion
(let (buffer-undo-list
list-to-undo)
(if (save-excursion
(goto-char (point-min))
(re-search-forward "^to:")
(let ((end (save-excursion (forward-line 1) (point))))
(re-search-forward private-regexp end t)))
(save-excursion
(goto-char (point-min))
(re-search-forward "^reply-to:")
(let ((end (save-excursion (forward-line 1) (point))))
(replace-string "rms@" "rms-private@" nil (point) end)))
(save-excursion
(goto-char (point-min))
(unless (re-search-forward "^bcc: rms-outgoing@gnu.org\n" nil t)
(re-search-forward "^reply-to:")
(beginning-of-line)
(insert "bcc: rms-outgoing@gnu.org\n"))
(setq list-to-undo buffer-undo-list)))
(if (save-excursion
(goto-char (point-min))
(re-search-forward "^reply-to:")
(let ((end (save-excursion (forward-line 1) (point))))
(re-search-forward "rms-private" end t)))
(my-send-1 "out-")
(my-send-1 "out-"))
(while list-to-undo
(let ((undo-in-progress t))
(setq list-to-undo (primitive-undo 1 list-to-undo)))))))
(defun my-send-1 (base)
(let* ((default-directory (expand-file-name "~/outgoing/"))
(files (file-name-all-completions base default-directory))
(versions (mapcar (function (lambda (name)
(string-to-int (substring name (length base)))))
files))
(coding-system-for-write 'iso-latin-1))
(write-region (point-min) (point-max)
(format "%s%d" base
(if versions
(1+ (apply 'max versions))
1)))))
(setq send-mail-function 'my-send-it)
(setq mail-default-reply-to "rms@gnu.org")
(setq user-mail-address "rms@gnu.org")
(global-unset-key [home])
(setq vc-make-backup-files t)
(defun assistant ()
(interactive)
(let (start header-end body-start end (buf (current-buffer)))
(goto-char (point-min))
(search-forward "\n#######")
(forward-line 1)
(if (looking-at "From: ")
(forward-line 1))
(setq start (point))
(search-forward "\n\n")
(forward-line -1)
(setq header-end (point))
(forward-line 1)
(setq body-start (point))
(search-forward "\n#######")
(beginning-of-line)
(setq end (point))
(mail)
(goto-char (point-min))
(if (looking-at "From: ")
(forward-line 1))
(let ((beg (point)))
(forward-line 2)
(delete-region beg (point)))
(insert-buffer-substring buf start header-end)
(save-excursion
(goto-char (point-max))
(insert-buffer-substring buf body-start end))))
(setq resend-message-ignored-headers "^via:\\|^mail-from:\\|^origin:\\|^received:\\|^status:\\|^x400-originator:\\|^x400-recipients:\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:\\|^\\(resent-\\|\\)message-id:\\|^summary-line:\\|^resent-date:\\|^nntp-posting-host:\\|^path:\\|^x-char.*:\\|^x-face:\\|^x-mailer:\\|^delivered-to:\\|^lines:\\|^mime-version:\\|^content-transfer-encoding:\\|^x-coding-system:\\|^return-path:\\|^errors-to:\\|^return-receipt-to:\\|^x-attribution:\\|^x-disclaimer:\\|^user-agent:\\|^content-type:\\|^date:\\|^from:\\|^resent-[-a-z]*:\\|^x-authentication-warning:\\|^delivery-date:\\|^envelope-to:")
(defun resend-message ()
(interactive)
(let (start header-end body-start end (buf (current-buffer)))
(goto-char (point-min))
(search-forward "\n#######")
(forward-line 1)
(if (looking-at "From: ")
(forward-line 1))
(setq start (point))
(search-forward "\n\n")
(forward-line -1)
(setq header-end (point))
(forward-line 1)
(setq body-start (point))
(if (search-forward "\n#######" nil t)
(progn
(beginning-of-line)
(setq end (point)))
(setq end (point-max)))
(mail)
(goto-char (point-min))
(forward-line 1)
(delete-region (point) (mail-header-end))
(insert-buffer-substring buf start header-end)
(goto-char (point-max))
(insert "\n\n")
(save-restriction
(goto-char (point-min))
;; Skip the standard From line inserted by mail-setup-1.
(forward-line 1)
(insert "bcc: respm\n")
(narrow-to-region (point) (point-max))
(rmail-clear-headers resend-message-ignored-headers)
(flush-lines "^>From "))
(save-excursion
(goto-char (point-max))
;; Delete the two blank lines
(delete-char -2)
(insert "[I sent this message a few weeks ago but did not get a response.
Could we get the discussion moving again?]\n\n")
(insert-buffer-substring buf body-start end))))
(defun cleanup ()
"Delete the buffers of outgoing mail and saved incoming mail."
(interactive)
(let* ((buffers (buffer-list)))
(dolist (buffer buffers)
(when (buffer-name buffer)
(let ((file (with-current-buffer buffer
(or buffer-file-name dired-directory))))
(when file (setq file (expand-file-name file)))
(if (and file
(equal (file-name-directory file)
(expand-file-name "~/outgoing/"))
(not (equal file (expand-file-name "~/outgoing/"))))
(kill-buffer buffer)
(and file
(string-match (concat "^" (expand-file-name "~/inout/"))
(file-name-directory file))
(not (equal file (expand-file-name "~/inout/")))
(kill-buffer buffer))
(and file
(string-match (concat "^" (expand-file-name "~/1inout/"))
(file-name-directory file))
(not (equal file (expand-file-name "~/1inout/")))
(kill-buffer buffer))
(and file
(string-match (concat "^" (expand-file-name "~/0inout/"))
(file-name-directory file))
(not (equal file (expand-file-name "~/0inout/")))
(kill-buffer buffer))))))))
(if (fboundp 'tty-suppress-bold-inverse-default-colors)
(tty-suppress-bold-inverse-default-colors t))
(defun mime-decode ()
(interactive)
(re-search-forward "^--")
(beginning-of-line)
(let ((string (buffer-substring-no-properties
(point) (save-excursion (end-of-line) (point))))
(buf (current-buffer))
start end)
(save-excursion
(search-forward "\n\n")
(setq start (point))
(search-forward string)
(beginning-of-line)
(setq end (point)))
(switch-to-buffer (get-buffer-create "*foo*"))
(erase-buffer)
(set-buffer-multibyte nil)
(insert-buffer-substring buf start end)
(base64-decode-region (point-min) (point-max))))
(autoload 'debian-bug "~/debian-bug.el" "" t)
-------------- parte successiva --------------
Un allegato non testuale è stato rimosso....
Nome: signature.asc
Tipo: application/pgp-signature
Dimensione: 253 bytes
Descrizione: OpenPGP digital signature
URL: <http://lists.linux.it/pipermail/flug/attachments/20130523/bddd0552/attachment.sig>
Maggiori informazioni sulla lista
flug