From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87143 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.gnus.general Subject: Re: Endless impression~ Gnus' citation style.. Date: Tue, 19 Jul 2016 01:03:45 +0200 Message-ID: <867fci7dm6.fsf@student.uu.se> References: <9FD4EC76-7C11-4C93-8059-EB305BA9583F@yw.doraji.xyz> <861t2r826h.fsf@student.uu.se> <87h9bn9cp1.fsf@yale.edu> <86vb027mtq.fsf@student.uu.se> <8760s2adqh.fsf@yale.edu> <86oa5u7fgc.fsf@student.uu.se> <86eg6q7eb5.fsf@student.uu.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468883064 24565 80.91.229.3 (18 Jul 2016 23:04:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Jul 2016 23:04:24 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M35363@lists.math.uh.edu Tue Jul 19 01:04:13 2016 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bPHa9-0005Rj-5R for ding-account@gmane.org; Tue, 19 Jul 2016 01:04:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.86_2) (envelope-from ) id 1bPHZw-0005NY-8h; Mon, 18 Jul 2016 18:04:00 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1bPHZu-0005N3-2w for ding@lists.math.uh.edu; Mon, 18 Jul 2016 18:03:58 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.86_2) (envelope-from ) id 1bPHZs-000685-RW for ding@lists.math.uh.edu; Mon, 18 Jul 2016 18:03:57 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1bPHZr-0003NF-EM for ding@gnus.org; Tue, 19 Jul 2016 01:03:55 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bPHZp-0005Dq-7D for ding@gnus.org; Tue, 19 Jul 2016 01:03:53 +0200 Original-Received: from c-9ce1e655.08-680-7570702.cust.bredbandsbolaget.se ([85.230.225.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jul 2016 01:03:53 +0200 Original-Received: from embe8573 by c-9ce1e655.08-680-7570702.cust.bredbandsbolaget.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 19 Jul 2016 01:03:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 46 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-9ce1e655.08-680-7570702.cust.bredbandsbolaget.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:3260IaTaRoetIg45T3LN14v0uWU= X-Spam-Score: -4.2 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87143 Archived-At: Emanuel Berg [embe8573(a)student.uu.se] writes: > In article <86oa5u7fgc.fsf (at) student.uu.se>, > Emanuel Berg > writes: > > ... What do you think of this one? (I mean the first line, not the citation which happens to contain one as well.) Looks kinda' good, ey? :) By the way, is the OP's "citation style" what is called the "attribution line" in the Gnus source? E.g., line 117, in: /usr/share/emacs/24.4/lisp/gnus/gnus-cite.el.gz Only remaining obstacle changing it is the regexp setting the face must change as well! On the other hand, keeping the attribution line simple and the regexp detecting it is simple as well! And the function producing it? I'd say, pretty simple! (defun citation-style-function () (let*((from (mail-header-from message-reply-headers)) (from-data (gnus-extract-address-components from)) (name (car from-data)) (email (cadr from-data)) (citation-string (format "%s [%s] writes:" name email)) (masked-string (replace-regexp-in-string "@" "(a)" citation-string) )) (insert masked-string) (newline) (newline) )) (setq message-citation-line-function 'citation-style-function) From: http://user.it.uu.se/~embe8573/conf/emacs-init/gnus/article.el -- underground experts united .... http://user.it.uu.se/~embe8573 Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic - so far: 58 Blogomatic articles -