From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: finding the hork point in ~/.emacs Date: Wed, 26 Aug 2020 19:37:13 -0400 Message-ID: <9e70a795-6b9d-a5aa-e042-8c22d1685fa8@mousecar.com> References: <877dtljfjk.fsf@ebih.ebihd> Reply-To: gebser@mousecar.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19050"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 27 01:37:49 2020 Return-path: Envelope-to: geh-help-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 1kB4zF-0004tk-JV for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 27 Aug 2020 01:37:49 +0200 Original-Received: from localhost ([::1]:54046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB4zE-0000zh-Jb for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 26 Aug 2020 19:37:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB4yj-0000yj-6p for help-gnu-emacs@gnu.org; Wed, 26 Aug 2020 19:37:17 -0400 Original-Received: from mout.perfora.net ([74.208.4.196]:49141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB4yh-0001hv-3a for help-gnu-emacs@gnu.org; Wed, 26 Aug 2020 19:37:16 -0400 Original-Received: from [192.168.0.17] ([96.27.75.237]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LkNiv-1km4YM3NDX-00cOyY for ; Thu, 27 Aug 2020 01:37:13 +0200 In-Reply-To: <877dtljfjk.fsf@ebih.ebihd> Content-Language: en-US X-Provags-ID: V03:K1:D19d6tFEuvxiIcCbxkr0IogL2rLJy43N5osactAaLq2cqOkYik2 UCYcByouOUM0JbpuA35DHi57BqXSaWYHVPDyPaEa6AVxmzq8oX/R/ziXX2N47mjsEg6dKVe sxNgJLejRUPMBL+eZvd69xERmfeUqcyBQ4z2hWZByBCrmfvuA73/z6dpV8BP6SHgdbehZsb /0HmA0W7fb1yxTumUCNnw== X-UI-Out-Filterresults: notjunk:1;V03:K0:l85++Wff/Gw=:kYBfNuRsLV6Es165eKZGKj jOOo1AlnkYc8Cu1aRQhSjJWLeLB2TA4yZB0YZjZy5JFsj+2u/FBHF+emQS5mOG21GyY0RNc2d ZGd+lxucNZ7xclK2K8flFyLU+ESC9ewEKXx4wmQOh90cVkmFYjcsofVsgzGSn2xVPMk83Pkhb 9BxeoZFOZMfHOxp/hXzPN8xONVCKCE4OjwttHSA+hYYQzfSgz61spBn9sGrWHXHFitMtI+45K Rp3rjKEqa+k0jVv6Euec1Xb+KnAL9ciqu2zcqX2TqtlmtCgF2U96eCP7yqBYE13AeoKv1NZ6v EeNWXRjLXgapAO4Mq8fILy4gOPU6IZXFXkKFXGl5TATix+Mneo++8H2cWiStmdIHoig4aCJAR MQW2qLTG3z7RoHkATVoYbwW3q96A7Snq1xQ7qNwoUgEVZM0MDS0hQv/OfoS5yp/YtWbjIOgP8 mtpoULTr71tjR90v5EKlyxFHJf1C5IApcl6vuDE7y7COZ3gMnHELoOmkvr5ptG7iucU3dmUUp aX4ypHo0bSZPwKhwltB4gFqDH2ygpaJhVMJSKHdpcWQaskI0N1UJ3qCWke1v5xNnMNTir1T90 NF+QuGT64YWBCJcH2q3zRIiE3XTj5ETlRiI1+dyzPufx2+spXCbzKvuzEnWepB21pGJwAx28J ysupcDTqBDp39jPxgbeVHdwg6SA2mmCxbUb6r6PliOsWuVzcIPDL3afZvPORHJ7hmFIis2hwX DNDwSNZD884V10s8WFm3F+Ih5e6/h/YY9A8JvvyCEB6nQdmpq76PeAJGWR1yZK4RGE65+nUV Received-SPF: none client-ip=74.208.4.196; envelope-from=gebser@mousecar.com; helo=mout.perfora.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/26 19:37:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-2.239, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:123781 Archived-At: On 8/26/20 4:52 PM, Emanuel Berg via Users list for the GNU Emacs text editor wrote: > ken wrote: > >> In another thread I spoke too soon about my >> ~/.emacs fully working.  A lot of it isn't being >> executed.  This, to my understanding, means that >> some code is no longer working (since my recent >> emacs upgrade).  Is there some really good method >> or log file or something else which would help >> finding where the hork point is? > You can do the so-called binary search, which is > a fancy name for this method > > code_1 > code_2 > code_n > code_m > > then do > > code_1 > code_2 > ;; code_n > ;; code_m > > if it still doesn't work, problem is in 1 or 2, so > > code_1 > ;; code_2 > ;; code_n > ;; code_m > > if it ... etc Yes, good.  I know that technique, and I think it's better known as, "isolating the problem."  I've done lots of error chasing using that method, not only looking at code, but also looking for a problem with a car, or in my house's electrical system, fixing the washing machine, lots and lots of places.  Everywhere really.  However, my ~/.emacs is a bit over a thousand lines long (well, more than half is probably documentation, but still), a lot of code to look at line by line, even if the binary method narrows it down to roughly a third of those lines. What I've done in the past and could still do:  I put a line in my ~/.emacs like this: (set-cursor-color "red") ;;if cursor isn't the spec'd color, error is above In fact, I can put two or three such lines in my code, using different colors (blue, limegreen, whatever), telling me (very approximately) where the problem is depending upon what color the cursor is.  It's also much easier to find and remove-back-to-normal my .emacs.  But frankly, with so much code, even this method is still tedious. Most programming languages has some facility which actually pinpoints, down to the line, sometimes down to the character, where a coding error is, at least where the compiler or interpreter thinks it is.  I thought shure elisp would have something like that. > > And: the better you write the code to begin with, the > better this method will work :) The code in my ~/.emacs (and elsewhere) has been working fine for years.  It's only when I do a major upgrade to emacs that I have these problems... for some strange reason newer emacs versions remove working functions that my code uses, so obviously it's not going to work anymore.  I've been using C and bash as my two main progamming platforms for decades and have never had such a problem.  Bash is planning on obsoleting some small bit of code, but they've been warning people about it for over five years now.  That much is considerate.  On the other hand, I wrote one small piece of code in Tk/Tcl and another for Gnome and both of them made changes which obsoleted support code (or libraries) which made my code useless.. so I doubt I'll ever write code for either of those platforms again.  Same reason I'd never choose to live in a hurricane zone.