From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: Using "Emacs Configure" **and** modifying .emacs Date: Mon, 14 Aug 2017 16:17:04 -0700 Message-ID: References: <1502373086.1171866.1069247696.71F9FED4@webmail.messagingengine.com> <8660dvuzsr.fsf@zoho.com> <1502436066.2568371.1070085968.1D25E0E7@webmail.messagingengine.com> <87tw1ekxgo.fsf@127.0.0.1> <867ey9sva2.fsf@zoho.com> <86k226rtwd.fsf@zoho.com> <86d17yrp6u.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1502752767 26959 195.159.176.226 (14 Aug 2017 23:19:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 14 Aug 2017 23:19:27 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Aug 15 01:19:22 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 1dhOdj-0006XF-7l for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Aug 2017 01:19:19 +0200 Original-Received: from localhost ([::1]:37139 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhOdp-0006Dg-H0 for geh-help-gnu-emacs@m.gmane.org; Mon, 14 Aug 2017 19:19:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58186) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhObw-0005Uy-H3 for help-gnu-emacs@gnu.org; Mon, 14 Aug 2017 19:17:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhObv-0003Id-7b for help-gnu-emacs@gnu.org; Mon, 14 Aug 2017 19:17:28 -0400 Original-Received: from mail-qk0-x22a.google.com ([2607:f8b0:400d:c09::22a]:37909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dhObv-0003ID-3c for help-gnu-emacs@gnu.org; Mon, 14 Aug 2017 19:17:27 -0400 Original-Received: by mail-qk0-x22a.google.com with SMTP id x191so58377258qka.5 for ; Mon, 14 Aug 2017 16:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=XnobExQnAcnC0fYeQDxn55KNbJGVX8Cjhv/piA7iKaE=; b=oUHL5KhGESFboqnaUVmC/nqf1Go03E0KzoQEawFZbFys3fw8YjcavGQNEoZfkxIqOq k9lh64Ik40sdab7ZbUonGWdF1CZiqz3UtqnUTcVm1magSXUm3ZQ42Le6atCDrvkH59cX VHbEvQjD/351XqCli4u6jwXnjRCnwLO8MDoHhRGPhDJgZXO341/H3lEvwAYgGz4eZD8E 42YdIubqznTuwG2SMyDU3fEQCYJytH1vsHrhl5TPurzxyFi1ewfzjV45dPAXJ0OlpFWA ygsW/6z7GfPihn4fpEjhko6skedahQkcKhoHucweoSmrwosaiWQ9PkyZQSLDSq0i4ChE d4qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=XnobExQnAcnC0fYeQDxn55KNbJGVX8Cjhv/piA7iKaE=; b=SyFP9RxGDlf0W4UC4CFvM33eRo0sJSxUG1GVIzJP4BLrzhV+7bSrAp/H+zheIt4xcJ 2J+JQjxpS0gbJnmT05pduivyCRukT5oLXh1oUouOGNs0WljhOD7BkIE3LRcdIY/w3caH 45z+3n+hY4vLWCJcCczUZqT9uQxLancWhRzcqNuv/gE7OepYk8NhBkpwdYu4K0EyuXHf p+3++oOVudqCwvS/f/sxL+MDsK8qjr55+JbaxRE4RQ01/3Pvvw7hpoXoXq+/5EjlHNy+ 7BFemqnM6fFbk8T9ribqa9dxHxJZ6TW0xgeHQkGIb611yS0RKVbT6bGxAdskoKVjtXKs OtYg== X-Gm-Message-State: AHYfb5gpT6MIpaaDdd5Mh0MdXudvozQUFMX3ldkxLvF9gxfpH8siKCXL h6SjCiCCDw4ujhRN2jbnUMRW4Dr56t3NPPg= X-Received: by 10.55.215.26 with SMTP id m26mr31264532qki.95.1502752644849; Mon, 14 Aug 2017 16:17:24 -0700 (PDT) Original-Received: by 10.200.15.156 with HTTP; Mon, 14 Aug 2017 16:17:04 -0700 (PDT) In-Reply-To: <86d17yrp6u.fsf@zoho.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::22a 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:114031 Archived-At: Emanuel Berg wrote: > Here is something that can help speed up the > tracking down of user variables in code already > written: > > (defun echo-user-variable () > (interactive) > (let ((var (variable-at-point t))) ; ANY-SYMBOL > (if (custom-variable-p var) > (message "user variable") > (message "something else") ))) > (defalias 'euv 'echo-user-variable) Here's a quick & dirty [and wrong in some way(s)] command you could use to actively search for such variables. It only reports ones that, in addition to meeting `custom-variable-p', have a `custom-set' property. (cl-defun find-custom-set-variable () (interactive) (let (sexp) (while (and (re-search-forward "([ \t]*set[fq]\\_>" nil t) (not (or (nth 3 (syntax-ppss)) (nth 4 (syntax-ppss)))) (setq sexp (ignore-errors (save-excursion (goto-char (match-beginning 0)) (read (current-buffer)))))) (cl-loop for (sym val) on (cdr sexp) by #'cddr when (and (custom-variable-p sym) (get sym 'custom-set)) do (progn (message "`%s'" sym) (cl-return-from find-custom-set-variable)))))) Besides any errors, one limitation is that it will of course only work for variables defined in packages that have been loaded. John