From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Fabian Braennstroem Newsgroups: gmane.emacs.help Subject: Re: change textheight and set position Date: Tue, 29 Jun 2004 07:54:42 +0200 Organization: Braennstroem Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87pt7isycd.fsf@tfdpc12.tfd.chalmers.se> References: <87r7s1ar7j.fsf@tfdpc12.tfd.chalmers.se> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1088539194 28777 80.91.224.253 (29 Jun 2004 19:59:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 29 Jun 2004 19:59:54 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 29 21:59:42 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BfOlZ-0001WT-00 for ; Tue, 29 Jun 2004 21:59:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BfOnF-0002qi-3s for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Jun 2004 16:01:25 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-X-Trace: news.uni-berlin.de bnepcY5Ci3owM1PSnqA0TgNtW7pqJCqNJc3cM6oCAbrg1tFfAz X-Orig-Path: tfdpc12.tfd.chalmers.se!news Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAAA1BMVEUA/wA0XsCoAAAADUlE QVR4nGNgGAXUBAABUAAB6+YoyQAAAABJRU5ErkJggg== User-Agent: Gnus/5.110001 (No Gnus v0.1) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:QmRB1x5EbTz+5cVt+dllJT4bk20= Original-Xref: shelby.stanford.edu gnu.emacs.help:123992 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19352 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19352 Hi, Jesper Harder writes: > Fabian Braennstroem writes: > >> I'm looking for a way to copy some text and yank it with a different >> font-size in the middle of the line. I tried using 'set-face-font', >> but that changes the font for some existing faces. It would be the >> best, if I would be able to choose just a different font style >> before I yank the text, e.g. Info-title-1-face. Does anybody have an >> idea? > > You could do something like this: > > (defun my-yank (face) > (interactive (list (read-face-name "Use face"))) > (save-restriction > (narrow-to-region (point) (point)) > (yank) > (put-text-property (point-min) (point-max) 'face face))) Thanks! I think this is exactly what I want, but when I choose some face, e.g. 'italic' or 'Info-title-2-face', there is no change in my text-property. It does not change compared to the old one. One question to this function. Shouldn't I be able to call the function 'put-text-property' with 'M-x'? I can't find it... Ah, I see, probably just because it is a build-in function!? Greetings! -- Fabian Braennstroem Duesseldorf/Berlin