From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80922 Path: news.gmane.org!not-for-mail From: Yagnesh Raghava Yakkala Newsgroups: gmane.emacs.gnus.general Subject: Re: Customize citation character Date: Fri, 20 Jan 2012 06:13:02 +0900 Message-ID: <87aa5jpfa9.fsf@live.com> References: <87wr8pohnv.fsf@nzebook.haselwarter.org> <87ty3tqxf7.fsf@marauder.physik.uni-ulm.de> <878vl4riz3.fsf@live.com> <8739bcri5p.fsf@live.com> <87fwfbmr5y.fsf@nzebook.haselwarter.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1327007547 15115 80.91.229.12 (19 Jan 2012 21:12:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Jan 2012 21:12:27 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M29204@lists.math.uh.edu Thu Jan 19 22:12:23 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RnzHT-0005Iu-5y for ding-account@gmane.org; Thu, 19 Jan 2012 22:12:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1RnzGw-00052t-GN; Thu, 19 Jan 2012 15:11:50 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RnzGt-00052h-TK for ding@lists.math.uh.edu; Thu, 19 Jan 2012 15:11:47 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RnzGs-0003Va-2t for ding@lists.math.uh.edu; Thu, 19 Jan 2012 15:11:47 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RnzGp-0001TR-8I for ding@gnus.org; Thu, 19 Jan 2012 22:11:43 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RnzGn-0004sY-J8 for ding@gnus.org; Thu, 19 Jan 2012 22:11:41 +0100 Original-Received: from okhotsk19.lowtem.hokudai.ac.jp ([133.87.217.175]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jan 2012 22:11:41 +0100 Original-Received: from yagnesh by okhotsk19.lowtem.hokudai.ac.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 Jan 2012 22:11:41 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 36 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: okhotsk19.lowtem.hokudai.ac.jp User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) Cancel-Lock: sha1:5R2wkkJOs0SKurK04jkMX3r/p+4= X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80922 Archived-At: Philipp Haselwarter writes: > Thanks for all the input, here's what I've come up with so far: > > (defcustom my-citation-look '("" "│" "") > "(prefix citation-string suffix)" :group 'my) > > (defun my-citation-style nil > (let ((inhibit-read-only t) > (alist gnus-cite-face-list) > cflist face gnus-cite-prefix-alist) > (save-excursion > (gnus-narrow-to-body) > (gnus-cite-parse) > (dolist (prefix gnus-cite-prefix-alist) ;(reverse > (setq cflist (append cflist (list (car alist))) > alist (cdr alist)) > (let* ((current-cflist cflist) > (depth (length cflist)) > (len (length (car prefix))) > (look > (concat > (car my-citation-look) > (mapconcat > (lambda (s) (propertize s 'face (pop current-cflist))) > (make-vector depth (cadr my-citation-look)) "") > (caddr my-citation-look)))) > (dolist (line (cdr prefix)) > (goto-char (point-min)) (forward-line (1- line)) > (put-text-property (point) (+ (point) len) 'display look))))) > (widen))) I like this version; looks really nice. -- YYR