From: Yagnesh Raghava Yakkala <yagnesh@live.com>
To: ding@gnus.org
Subject: Re: Customize citation character
Date: Fri, 20 Jan 2012 06:13:02 +0900 [thread overview]
Message-ID: <87aa5jpfa9.fsf@live.com> (raw)
In-Reply-To: <87fwfbmr5y.fsf@nzebook.haselwarter.org>
Philipp Haselwarter <philipp.haselwarter@gmx.de> 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
next prev parent reply other threads:[~2012-01-19 21:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 2:42 Philipp Haselwarter
2012-01-18 3:57 ` Katsumi Yamaoka
2012-01-18 7:31 ` Reiner Steib
2012-01-18 17:58 ` Yagnesh Raghava Yakkala
2012-01-18 18:15 ` Yagnesh Raghava Yakkala
2012-01-19 19:24 ` Philipp Haselwarter
2012-01-19 21:13 ` Yagnesh Raghava Yakkala [this message]
2012-01-18 6:17 ` Martin
2012-01-18 8:48 ` Eric S Fraga
2012-01-18 10:06 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aa5jpfa9.fsf@live.com \
--to=yagnesh@live.com \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).