[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strip signature on reply without standard separator
From: |
Satoshi Yoshida |
Subject: |
Re: Strip signature on reply without standard separator |
Date: |
Sun, 04 Sep 2022 09:48:53 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) |
Satoshi Yoshida <dynamisxar@icloud.com> writes:
> Sorry, I'll fix three problems.
>
> 1) It doesn't work well without .signature
> 2) "> >" in signature is replaced to ">>"
> 3) For example, Can't add "> " to "a>" at the top of line
> in citation.
Fixed.
Add to .emacs
(autoload 'mu-cite-original "mu-cite" nil t)
(setq message-cite-function #'mu-cite-original)
Add to .gnus.el
(setq mu-cite-prefix-format '("> "))
(setq mu-cite-cited-prefix-regexp "\\(^[^[:blank:]\n<>]+>+[[:blank:]]*\
\\)")
(setq mu-cite-top-format '(from " writes:\n\n"))
(add-hook 'mu-cite-post-cite-hook
(lambda ()
(save-excursion
(goto-char (point-min))
(replace-regexp "^\n-- \n\\(.*\n\\)*" "")
(goto-char (point-min))
(replace-regexp "^\\([^[:blank:]\n<>]+>.*\\)" "> \\1")
(goto-char (point-min))
(replace-regexp "^\\([^\n>].+\n\n\\)\\(>[[:blank:]]+\n\
\\)+" "\\1")
(goto-char (point-min))
(replace-regexp "^> >" ">>")
(goto-char (point-min))
(replace-regexp "^> -- .*\n\\(>.*\n\\)*" "")
(goto-char (point-min))
(replace-regexp "^\\(>[[:blank:]]+\n\\)+> \\(best\
\\( regards\\| wishes\\)?\\|cheers\\|\\(good\\)?bye\\|good luck\
\\|\\(kind \\|warm\\(est\\)? \\)?regards\\|respectfully\\|\
\\(yours \\)?sincerely\\( yours\\)?\\|thank you\\( very much\\)?\
\\|\\(many \\)?thanks\\( in advance\\| very much\\)?\
\\),[[:blank:]]*\n\\(>.*\n\\)*" "")
(goto-char (point-min))
(replace-regexp "^\\(>[[:blank:]]+\n\\)+> [[:blank:]]*\
\\(-+[[:blank:]]*\\)?[[:alpha:]]+[[:blank:]]*\n\\(>[[:blank:]]+\n\
\\)*\\'" "")
(goto-char (point-min))
(replace-regexp "^\\(>[>[:blank:]]+\n\\)+\\'" "")
(ignore-errors
(goto-char (point-max))
(insert-file-contents "~/.signature")
(insert "\n-- \n"))
(goto-line 1)
(delete-blank-lines)
(set-window-start () 1))))
--
Satoshi Yoshida
- Re: Strip signature on reply without standard separator,
Satoshi Yoshida <=
- Re: Strip signature on reply without standard separator, Emanuel Berg, 2022/09/03
- Re: Strip signature on reply without standard separator, Satoshi Yoshida, 2022/09/06
- Re: Strip signature on reply without standard separator, Emanuel Berg, 2022/09/06
- Re: Strip signature on reply without standard separator, Satoshi Yoshida, 2022/09/15
- Re: Strip signature on reply without standard separator, Emanuel Berg, 2022/09/18
- Re: Strip signature on reply without standard separator, Satoshi Yoshida, 2022/09/21
- Re: Strip signature on reply without standard separator, Emanuel Berg, 2022/09/21
- Re: Strip signature on reply without standard separator, Satoshi Yoshida, 2022/09/23
- Re: Strip signature on reply without standard separator, Emanuel Berg, 2022/09/24
- Re: Strip signature on reply without standard separator, Satoshi Yoshida, 2022/09/24