From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: Using "Emacs Configure" **and** modifying .emacs Date: Sat, 12 Aug 2017 11:53:30 -0400 Message-ID: References: <1502373086.1171866.1069247696.71F9FED4@webmail.messagingengine.com> <8660dvuzsr.fsf@zoho.com> <1502436066.2568371.1070085968.1D25E0E7@webmail.messagingengine.com> <861soitdq1.fsf@zoho.com> <86o9rmruil.fsf@zoho.com> <86bmnlsz31.fsf@zoho.com> Reply-To: gebser@mousecar.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1502553257 24591 195.159.176.226 (12 Aug 2017 15:54:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 12 Aug 2017 15:54:17 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 12 17:54:11 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgYjm-0005ol-Vg for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Aug 2017 17:54:07 +0200 Original-Received: from localhost ([::1]:35601 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgYjt-00066r-EU for geh-help-gnu-emacs@m.gmane.org; Sat, 12 Aug 2017 11:54:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgYjO-00064P-VD for help-gnu-emacs@gnu.org; Sat, 12 Aug 2017 11:53:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgYjL-0005YG-Rt for help-gnu-emacs@gnu.org; Sat, 12 Aug 2017 11:53:43 -0400 Original-Received: from mout.perfora.net ([74.208.4.197]:64981) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgYjL-0005T3-JT for help-gnu-emacs@gnu.org; Sat, 12 Aug 2017 11:53:39 -0400 Original-Received: from nv.mousecar.net ([96.27.75.237]) by mrelay.perfora.net (mreueus001 [74.208.5.2]) with ESMTPSA (Nemesis) id 0Lebpg-1dGpyQ03B8-00qPHb for ; Sat, 12 Aug 2017 17:53:36 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K0:ChgDbefsGDcfRdohtJQJfFtZC7A7kmd7lrCGro7VnmdhAI75gX1 VYkZFAehfgPypD+UUW+8qMwdDyrFUBdr+zLtz9SLOAehCNmjU4yVYDumaSkWUeogeovXX3j iIOT6tnvzW6VPIBUhGUEIkgg5VMQxHjR4jsbdN0vjkXesrJbIW3aWl0JCHfmWbE9s7dLaiU fodTIR41uFygBBoRqN7zQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:OErjqNT7wrE=:r6iIZe6bjlhO1b/21lzSc0 y+izTptxVC40smHKfqj9eMRkszJtlWc9ASHFD2crh/y+xcqMkFMbZ8gS8GneQoOiPW0vuWDHC sxPWvxuH2EbV2W6hrC8cWD2UDDWuyFtjm7jf80Oa/EXsbTncupFKYGyikrvWpr9oAeCPM+AV8 u7pzHpVt+ons6b2cg1UPyTKOKI6SRFt1lhc7GKRcG7gmimCa323P34G340wiACdUumxXggWOT nDCmw/AAGvFhJENenQQ2bgHBEatMFPlMb3TYTQBzd1zFXntw6pHzW944vHk/iPgRaJTeOxSec rHnhCOdmO0AlOinwWH5+s4BuODPFX2NJR1aDvnPdUlVFNLNqi+sZI36tfU0b2p1q+KPmZhDBA ivGfKKZiMdQSzQ65qqaasT4hXTYkS69pz/z6c+wVtaFXp4EIS6O5vXExLmiGvUD6gWLvx4OUq +fUlZum0iZw74W10eiuz7Bjbv5FXh5nDRkususqH6zelWaYwhVnjgxCtwKAo6q1MpF2wEbkL9 3sjstQxD0bqkSh1oKq2XvLMFpVU+UcotnmskmbriokpRd7HYMo0y3USeolPAsg7RhXq8942F3 k0z/QRFrGwBgiA1Pv1DByyyBraFEyUXbHxnct1XLZ0urUmjNJwLV1Xix+PzHxQbuCuNnEnLF+ xn5ICq/in7y1OQK2jYHmT/6l8NuEBcbslb3gLuX0I2hR/M7HJ+I6ylkAmJdS31BVW6rhNXEoP Jm2pVirw/5cp5V2Y3UD2TUwseDnB5bh/y19ZJO+FayjRZDIdDsMl9x+/aTg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.208.4.197 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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 Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114008 Archived-At: On 08/11/2017 03:15 PM, Drew Adams wrote: >>> It is fine to use Lisp. It is generally not >>> advisable to use it without knowing what the >>> functions you use do (or don't do). >>> That's one way to learn, of course, - by >>> experimenting, but it can also help to read >>> the fine manual. >> For setting single variables, one would think >> using common sense, and the kind of common >> sense that comes with using computers every day >> and evermore pushing the envelope to increase >> one's understanding, it would seem this would >> be enough, at the very least if the docstring >> (help system) also is consulted for the >> specific setting. But reading the manual is >> always encouraged, of course. >> >> If the docstring isn't enough, but the manual >> is, one can report it as a bug and suggest how >> the docstring can be improved. > Yes, the doc string for such an option should warn you > not to just use `setq'. But not every doc string is > perfect. ;-) > > The Elisp manual, node `Variable Definitions' says: > > ‘:set SETFUNCTION’ > Specify SETFUNCTION as the way to change the value of this option > when using the Customize interface. The function SETFUNCTION > should take two arguments, a symbol (the option name) and the new > value, and should do whatever is necessary to update the value > properly for this option (which may not mean simply setting the > option as a Lisp variable); preferably, though, it should not > modify its value argument destructively. The default for > SETFUNCTION is ‘set-default’. > > If you specify this keyword, the variable’s documentation string > should describe how to do the same job in hand-written Lisp code. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > http://www.gnu.org/software/emacs/manual/html_node/elisp/Variable-Definitions.html > > Note the second paragraph. If you define an option with a > `defcustom' that uses `:set', help users of your option by > letting them know how to change the value using Lisp. How > to change the value typically does not mean using only `setq' > in such a case. > Excellent idea. Here's a practical example: Having a fairly large screen and often many windows open, it's sometimes difficult to find the cursor in an emacs window. So I thought limegreen would be a more discernible color for a cursor than the default black. So I put this in my .emacs: (set-cursor-color "limegreen") However, the result is that only the first emacs window loaded has a limegreen cursor. All the others subsequent have the default black cursor. Running the same function in each emacs buffer does correctly yield a limegreen cursor, but not a practical solution when I have twenty or thirty buffers open, each in its own window (or frame). The help documention (C-h f set-cursor-color) shows: ----------------------------------------------------------------------- set-cursor-color is an interactive compiled Lisp function. (set-cursor-color COLOR-NAME) Set the text cursor color of the selected frame to COLOR-NAME. When called interactively, prompt for the name of the color to use. This works by setting the `cursor-color' frame parameter on the selected frame. You can also set the text cursor color, for all frames, by customizing the `cursor' face. ----------------------------------------------------------------------- If someone preferred to place a statement in .emacs to accomplish the goal-- rather than "customizing"-- what should the above documentation say?