From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Stealing minibuffers [Was: Confused by y-or-n-p] Date: Sat, 09 Jan 2021 12:04:41 +0200 Message-ID: <831reuifye.fsf@gnu.org> References: <834kkcr1eo.fsf@gnu.org> <87k0t38g1z.fsf@mail.linkov.net> <83czyvkts6.fsf@gnu.org> <87bleetirr.fsf@mail.linkov.net> <87y2hhri3n.fsf@mail.linkov.net> <83pn2tkfg8.fsf@gnu.org> <871rf7ippu.fsf@mail.linkov.net> <83a6trg6mc.fsf@gnu.org> <83mtxqcauz.fsf@gnu.org> <83turva0y2.fsf@gnu.org> <83v9c8ltys.fsf@gnu.org> <83lfd3kiet.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3624"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, juri@linkov.net, rudalics@gmx.at, monnier@iro.umontreal.ca, emacs-devel@gnu.org, stefankangas@gmail.com To: Gregory Heytings Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 09 11:05:19 2021 Return-path: Envelope-to: ged-emacs-devel@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 1kyB7X-0000p3-DT for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 11:05:19 +0100 Original-Received: from localhost ([::1]:37012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyB7W-0005Wz-FG for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 05:05:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyB6z-00055H-Ss for emacs-devel@gnu.org; Sat, 09 Jan 2021 05:04:45 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57854) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyB6y-0006kL-By; Sat, 09 Jan 2021 05:04:44 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3048 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kyB6r-0001E5-8S; Sat, 09 Jan 2021 05:04:37 -0500 In-Reply-To: (message from Gregory Heytings on Sat, 09 Jan 2021 09:34:26 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262794 Archived-At: > Date: Sat, 09 Jan 2021 09:34:26 +0000 > From: Gregory Heytings > cc: Eli Zaretskii , stefankangas@gmail.com, > monnier@iro.umontreal.ca, rudalics@gmx.at, emacs-devel@gnu.org, > juri@linkov.net > > 1. Start with the old code / behavior > > 2. Carefully refactor that code to make the implicit behavior explicit, > and to make room for other possible behaviors > > 3. Add other behaviors That isn't always possible in software engineering. Sometimes you need to throw away the old code and rewrite it from scratch, using what you perceive as the requirements as your guide. For example, when the old code was written based on some restriction that you want to lift, it can be impractical refactoring the code if too many of its parts have that restriction implicitly hard-coded in the algorithm. I've bumped into this a couple of times when I made the Emacs display engine support bidirectional text.