From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Sebastian Luque Newsgroups: gmane.emacs.help Subject: title function for boxquote Date: Sun, 30 Jan 2005 16:19:15 -0600 Message-ID: <878y6ay2zg.fsf@mun.ca> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107127204 11442 80.91.229.6 (30 Jan 2005 23:20:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 30 Jan 2005 23:20:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 31 00:19:59 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CvOMI-0003Kr-00 for ; Mon, 31 Jan 2005 00:19:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvOYt-0004Xb-92 for geh-help-gnu-emacs@m.gmane.org; Sun, 30 Jan 2005 18:32:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CvOYL-0004OR-Qf for help-gnu-emacs@gnu.org; Sun, 30 Jan 2005 18:32:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CvOYJ-0004Nk-Sn for help-gnu-emacs@gnu.org; Sun, 30 Jan 2005 18:32:24 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvOXr-0003zD-WF for help-gnu-emacs@gnu.org; Sun, 30 Jan 2005 18:31:56 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CvO3H-0005ly-KQ for help-gnu-emacs@gnu.org; Sun, 30 Jan 2005 18:00:19 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1CvO38-0005qb-4r for help-gnu-emacs@gnu.org; Mon, 31 Jan 2005 00:00:10 +0100 Original-Received: from s0106000ae61de208.wp.shawcable.net ([24.77.59.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Jan 2005 00:00:10 +0100 Original-Received: from sluque by s0106000ae61de208.wp.shawcable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 31 Jan 2005 00:00:10 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 25 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: s0106000ae61de208.wp.shawcable.net User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:D5A4YnlbCvnPITnPhCYu0SjCjG4= X-Gmane-MailScanner: Found to be clean X-Gmane-MailScanner: Found to be clean X-MailScanner-From: geh-help-gnu-emacs@m.gmane.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23763 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23763 This should be simple, but I'm flailing badly here. I'm trying to put a title to a boxquote that has been yanked from a region killed with boxquote-kill-ring-save. Something that looks like: file name [Lines: such -- such] So I came up with this, but it doesn't work: (defun my-title-function (from to) "Provide a phrase for boxquote-kill-ring-save-title." (interactive "r") (save-restriction (widen) (let ((first-line (count-lines (point-min) (from))) (last-line (count-lines (point-min) (to)))) (concat buffer-name "[Lines: " first-line " -- " last-line "]")))) (setq boxquote-kill-ring-save-title 'my-title-function) What's wrong with this picture? Thanks in advance. -- Best wishes, Sebastian