all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sebastian Luque <sluque@mun.ca>
Subject: title function for boxquote
Date: Sun, 30 Jan 2005 16:19:15 -0600	[thread overview]
Message-ID: <878y6ay2zg.fsf@mun.ca> (raw)

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

             reply	other threads:[~2005-01-30 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-30 22:19 Sebastian Luque [this message]
2005-01-31  0:49 ` title function for boxquote Sebastian Luque
     [not found] ` <mailman.61.1107133370.2841.help-gnu-emacs@gnu.org>
2005-01-31 11:10   ` Sébastien Kirche
     [not found] <mailman.56.1107127949.2841.help-gnu-emacs@gnu.org>
2005-01-31  9:46 ` Karl Pflästerer
2005-01-31 14:43   ` Sebastian Luque

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=878y6ay2zg.fsf@mun.ca \
    --to=sluque@mun.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.