From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#39624: 26.3; Inserting text in a specified face Date: Thu, 20 Feb 2020 18:52:07 +0100 Message-ID: <87blptrvso.fsf@gmx.net> References: <79CCB225-06A3-40F0-A9C7-F5FE1A74165B@gmail.com> <87pnefl9ha.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="12855"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 39624-done@debbugs.gnu.org To: Greg Hill Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 20 18:53:50 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j4q1B-00036f-H3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Feb 2020 18:53:45 +0100 Original-Received: from localhost ([::1]:47264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4q1A-0003kV-CY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Feb 2020 12:53:44 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44521) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4q0W-0003ge-Cz for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 12:53:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4q0V-0002wq-BP for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 12:53:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39854) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4q0V-0002wl-4e for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 12:53:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j4q0V-00006f-4C for bug-gnu-emacs@gnu.org; Thu, 20 Feb 2020 12:53:03 -0500 Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Feb 2020 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 39624 X-GNU-PR-Package: emacs Mail-Followup-To: 39624@debbugs.gnu.org, stephen.berman@gmx.net, gregoryohill@gmail.com Original-Received: via spool by 39624-done@debbugs.gnu.org id=D39624.1582221137321 (code D ref 39624); Thu, 20 Feb 2020 17:53:02 +0000 Original-Received: (at 39624-done) by debbugs.gnu.org; 20 Feb 2020 17:52:17 +0000 Original-Received: from localhost ([127.0.0.1]:45821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4pzl-000054-23 for submit@debbugs.gnu.org; Thu, 20 Feb 2020 12:52:17 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:37089) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4pzi-0008WT-FS for 39624-done@debbugs.gnu.org; Thu, 20 Feb 2020 12:52:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1582221128; bh=SgmMJmZhPkd0WKBftFLzSLEYivlwMC4O0YYKVgtiXSI=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=VjfVe2IOlS4MCkCdAnveNc0g1V98f9oyEwl/Fgh6UY8aVP9Om8BSbhKW7eLon0tGG hmQ6PpvnJJh8qLwTOBnAWR89KbP9SKish+QDwYCLGVDGNUDJWV7xKyQdWgMh3J28bL WAj1gXUZJQG7ffnrKkgbkHHAWikfBCSXf4b81wTE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobe-lfs84 ([178.6.212.58]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mf078-1jfZWf3a8o-00gaMw; Thu, 20 Feb 2020 18:52:07 +0100 In-Reply-To: <87pnefl9ha.fsf@gmx.net> (Stephen Berman's message of "Sun, 16 Feb 2020 00:24:49 +0100") X-Provags-ID: V03:K1:f6tKgXCYICwg9HFvue6+1iILGaODOi4nS1l7XeecwabuMeei/dI 6KsabVeLnzYkPdzVfUqkKvOY6DYlIvNKqzHn5hHhYIWC1nNSZNuceQdpRM1BzRAgzBc/Xng R9dEXUhskByJx8GkDUSdQ8IRbTuA6Nb/6dZSw9dSTc4wggF70tQ5a7gG0K/8B5YAI0g/+Td jXy+HqdJOuryc3LoVwzhw== X-UI-Out-Filterresults: notjunk:1;V03:K0:ELkj+bo1vK8=:g20U+IJYHK+5/wcoco9PEj ZageUD0fgb7vboHyUCwxb3Y3OYNm6HN/0TIzlS1LwZRuaVvpJWoSWQ+2LS646jyQlorPzcGeQ GyGQMOm4RSmEViQuToIQ+iccJ362oUo5bOoSdMKF9JB0AwCzVbAHxawOa3x5MaBIV5Rg33JPR 1fFTzT5APLrsqT6l04eUSkvRE/6RkC4S4ZsTS69yrHonsvBZZmUbB0IKNAQwEzxlaHU6ZKXnv XhwyC6YPPp+M96FpzZOTn7CkvM6weN4wutmihyBjxHutglDPEh129BMjPDmvHKN3Fz9glnr4r 2Xtj8MeVyUA4Bmm22CRx8rCw3kaOH0C/o9UmSIPe1+mRD3kIRq+HOEFmVran5hCucxZmb+0Jb 0T7GMBN21OhYb99h8QnqDZH3ci9VE9/jWGSdRmVtaX/L4laJYv3GYhbZ4UKamGeBwKBCj8atZ wQX5DUYbKZCYlOf5xNQ0j+KWOMPtmWoLx5qN6eDGQ75CUJO+PCQU9TkgUeklOHnz22ePIIXy2 WDZtlUJWlHpLR8rfGLScPKUKfKRWer5saGV1KxGiRoBtQmon377hhV9k9rKVjn00qeaHoXBbf v9zEripC7wLm5T21PLpJb5k++CxvBb+E4oBY4YRVpCrdoVzb5Us3aLMg287jyNzYDXnUVBlOh 6M3LxjydsQa1A3q3Ke0CUnSNQ9cGNyb5hdvztSFZWoxnWhKWAro4l0VYogIAJZ5OkgHGyhwT8 BYD4yaozeE+h/T2S6F+C8DElNDEkWE075MWWgcwTvpq5UEAyIvuuu186suLxdBNCNITSnYI5 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:176304 Archived-At: The OP confirmed to me off-list that this bug can be closed, so I'm doing so. On Sun, 16 Feb 2020 00:24:49 +0100 Stephen Berman = wrote: > On Sat, 15 Feb 2020 13:20:01 -0800 Greg Hill wr= ote: > >> I'm just trying to figure out how to use the 'insert' function to inser= t >> one string in the currently active buffer in a specific face like >> 'custom-comment'). I'm sure it's easy to do, but I have spent >> several hours searching through all the Info documentation and haven't >> found a single clue. > > Here's one way: > > (insert (propertize "Test" 'face 'custom-comment)) > > And here's how you might have found that in the documentation: If you > look in the Elisp manual at the node Faces, it says: "One way to > represent a face is as a property list of attributes", and if you look > at the node Insertion, it says that most of the insertion functions > "copy text characters from strings and buffers along with their > properties". So properties are a point of intersection between faces > and insertion. In the Elisp node Text Properties there is a menu that > contains the entry Changing Properties with the description "Setting the > properties of a range of text", which seems to be what you're looking > for. And indeed, the node Changing Properties describes the function > propertize, saying it is "the easiest way to make a string with text > properties". > > Steve Berman