From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62191 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: Larger smilies Date: Thu, 09 Mar 2006 20:19:07 +0100 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: References: <87adgwl8ht.fsf@virgil.koldfront.dk> <871wxw5vje.fsf@koldfront.dk> <87u0arez27.fsf@catnip.gol.com> <871wxc3e68.fsf@topper.koldfront.dk> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1141932278 11175 80.91.229.2 (9 Mar 2006 19:24:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Mar 2006 19:24:38 +0000 (UTC) Original-X-From: ding-owner+m10719@lists.math.uh.edu Thu Mar 09 20:24:27 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FHQk6-0005r9-UG for ding-account@gmane.org; Thu, 09 Mar 2006 20:24:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1FHQjw-0007xC-00; Thu, 09 Mar 2006 13:24:00 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FHQgN-0007x4-00 for ding@lists.math.uh.edu; Thu, 09 Mar 2006 13:20:19 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1FHQgK-0006Lx-2Y for ding@lists.math.uh.edu; Thu, 09 Mar 2006 13:20:19 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FHQgI-0002WH-00 for ; Thu, 09 Mar 2006 20:20:14 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FHQg6-0004LE-S6 for ding@gnus.org; Thu, 09 Mar 2006 20:20:05 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de ([134.60.10.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Mar 2006 20:20:02 +0100 Original-Received: from Reiner.Steib by bridgekeeper.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Mar 2006 20:20:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 175 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T;w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv,vbL^XF1nIp\:F=$Ei2o&mEe:%N~,:3]vtQ~s9u$9izmX$IF@VgGl7/,^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Copies-To: nobody User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:rjX+UwjOSpzCuV9e9yesfC8xFGI= X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62191 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit On Wed, Mar 08 2006, Adam Sjøgren wrote: > I have now updated my set of garish AOL-smilies so they match the full > set found in etc/images/smilies/ in Gnus CVS. > > I have also created a set of dull smilies that are grey and without > borders. They can do with a lot of improvement though. > > Apply the attached patch, put Adam's smilies into a /medium and /grayscale ("dull-*.tar.gz") subdirectory of etc/images/smilies, do `M-: (push "/path/to/No_Gnus/lisp/" load-path) RET', and customize `smiley-style'. WDYT? For my font size (14) your 16 pixel smilies are too large (causing increased "linespread"). Maybe you could remove the empty lines from your "dull" variants? Bye, Reiner. Test text with all kinds of smilies follows: Lorem ipsum dolor ^:-) sit amet, consectetuer ^:) adipiscing elit. Aenean ;-) tincidunt ultrices ;) nisl. Nullam fermentum turpis eu ante. Nunc magna :-] augue, rutrum ut, suscipit non, mollis vitae, erat. Vivamus ullamcorper ligula 8-) ut nisi. Donec ultrices massa sed metus semper :-| congue. Vivamus dignissim, neque non placerat :-/ pharetra, mauris sapien mattis justo, a nonummy :-\ dui nulla ac dolor. Suspendisse purus eros, :-( sagittis vel, mollis non, adipiscing a, justo. Vivamus ultricies, >:-) ipsum quis placerat consectetuer, leo lorem eleifend odio, id tincidunt neque mi ac mauris. X-) Pellentesque vehicula orci ut nisl. Suspendisse potenti. Phasellus ornare, elit a hendrerit :-D vulputate, ipsum libero viverra dui, ac imperdiet lectus mi eget metus. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=rs-smiley-larger.patch --- smiley.el 08 Feb 2006 13:32:51 +0100 7.8 +++ smiley.el 09 Mar 2006 20:16:36 +0100 @@ -31,8 +31,21 @@ ;; I'm not sure we need that degree of rococoness and defaults like a ;; yellow background. Also, using PBM means we can display the images ;; more generally. -- fx +;; `smiley.el' was replaced by `smiley-ems.el' on 2002-01-26 (after fx' +;; comment). -;;; Test smileys: :-) :-\ :-( :-/ +;; Test smileys: +;; smile ^:-) ^:) +;; blink ;-) ;) +;; forced :-] +;; braindamaged 8-) +;; indifferent :-| +;; wry :-/ :-\ +;; sad :-( +;; evil >:-) +;; cry ;-( +;; dead X-) +;; grin :-D ;;; Code: @@ -45,25 +58,59 @@ :group 'gnus-visual) ;; Maybe this should go. -(defcustom smiley-data-directory (nnheader-find-etc-directory "images/smilies") +(defcustom smiley-style 'low-color + "Smiley style." + :type '(choice (const :tag "small, 3 colors" low-color) + (const :tag "medium, ~10 colors" medium) + (const :tag "dull, grayscale" grayscale)) + :set (lambda (symbol value) + (set-default symbol value) + (setq smiley-data-directory (smiley-directory)) + (smiley-update-cache)) + :initialize 'custom-initialize-default + :group 'smiley) + +;; For compatibility, honor the variable `smiley-data-directory' if the user +;; has set it. + +(defun smiley-directory (&optional style) + "Return a the location of the smiley faces files. +STYLE specifies which style to use, see `smiley-style'. If STYLE +is nil, use `smiley-style'." + (unless style (setq style smiley-style)) + (nnheader-find-etc-directory + (concat "images/smilies" + (cond ((eq smiley-style 'low-color) "") + ((eq smiley-style 'medium) "/medium") + ((eq smiley-style 'grayscale) "/grayscale"))))) + +(defcustom smiley-data-directory (smiley-directory) "*Location of the smiley faces files." + :set (lambda (symbol value) + (set-default symbol value) + (smiley-update-cache)) + :initialize 'custom-initialize-default :type 'directory :group 'smiley) ;; The XEmacs version has a baroque, if not rococo, set of these. (defcustom smiley-regexp-alist - '(("\\(:-?)\\)\\W" 1 "smile") + '(("\\(\\^:-?)\\)\\W" 1 "smile") ("\\(;-?)\\)\\W" 1 "blink") ("\\(:-]\\)\\W" 1 "forced") ("\\(8-)\\)\\W" 1 "braindamaged") ("\\(:-|\\)\\W" 1 "indifferent") ("\\(:-[/\\]\\)\\W" 1 "wry") ("\\(:-(\\)\\W" 1 "sad") - ("\\(:-{\\)\\W" 1 "frown")) + ("\\(:-{\\)\\W" 1 "frown") + ("\\(>:-)\\)\\W" 1 "evil") + ("\\(;-(\\)\\W" 1 "cry") + ("\\(X-)\\)\\W" 1 "dead") + ("\\(:-D\\)\\W" 1 "grin")) "*A list of regexps to map smilies to images. -The elements are (REGEXP MATCH FILE), where MATCH is the submatch in -regexp to replace with IMAGE. IMAGE is the name of a PBM file in -`smiley-data-directory'." +The elements are (REGEXP MATCH IMAGE), where MATCH is the submatch +in regexp to replace with IMAGE. IMAGE is the name of an image +file in `smiley-data-directory'." :type '(repeat (list regexp (integer :tag "Regexp match number") (string :tag "Image name"))) @@ -78,7 +125,7 @@ (when (gnus-image-type-available-p 'xpm) (push "xpm" types)) types) - "*List of suffixes on picon file names to try." + "*List of suffixes on smiley file names to try." :version "22.1" :type '(repeat string) :group 'smiley) @@ -86,6 +133,7 @@ (defvar smiley-cached-regexp-alist nil) (defun smiley-update-cache () + (setq smiley-cached-regexp-alist nil) (dolist (elt (if (symbolp smiley-regexp-alist) (symbol-value smiley-regexp-alist) smiley-regexp-alist)) @@ -104,12 +152,13 @@ (push (list (car elt) (cadr elt) image) smiley-cached-regexp-alist))))))) -(defvar smiley-mouse-map - (let ((map (make-sparse-keymap))) - (define-key map [down-mouse-2] 'ignore) ; override widget - (define-key map [mouse-2] - 'smiley-mouse-toggle-buffer) - map)) +;; Not implemented: +;; (defvar smiley-mouse-map +;; (let ((map (make-sparse-keymap))) +;; (define-key map [down-mouse-2] 'ignore) ; override widget +;; (define-key map [mouse-2] +;; 'smiley-mouse-toggle-buffer) +;; map)) ;;;###autoload (defun smiley-region (start end) --=-=-=--