From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [NonGNU ELPA] 11 new packages! Date: Sun, 27 Nov 2022 20:30:31 +0000 Message-ID: <87v8n0ta1k.fsf@posteo.net> References: <87r0y6ug9z.fsf@disroot.org> <87y1sct2hp.fsf@posteo.net> <87k03vf5m8.fsf@disroot.org> <87edu2narn.fsf@posteo.net> <8735aieqtr.fsf@disroot.org> <87cz9mlq3o.fsf@posteo.net> <875yfdd5ad.fsf@disroot.org> <87v8n2zwc6.fsf@posteo.net> <87cz9arw7t.fsf@disroot.org> <8735a46cls.fsf@posteo.net> <87a64cmatq.fsf@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14894"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Developer List To: Akib Azmain Turja Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 27 21:30:54 2022 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 1ozOIg-0003ep-69 for ged-emacs-devel@m.gmane-mx.org; Sun, 27 Nov 2022 21:30:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozOIM-00070Y-VP; Sun, 27 Nov 2022 15:30:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozOIL-00070C-Ef for emacs-devel@gnu.org; Sun, 27 Nov 2022 15:30:34 -0500 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozOIJ-0002qm-Dj for emacs-devel@gnu.org; Sun, 27 Nov 2022 15:30:33 -0500 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CD442240101 for ; Sun, 27 Nov 2022 21:30:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669581029; bh=fZux3w0F5HFXKrKYjc1zS8LCOoC7NyqjrvQqlYUuV+s=; h=From:To:Cc:Subject:Date:From; b=NOBIUdIaU/wPxr3oSe26Zv0anfqJBWPEYYnwR1VRaiRm2YvehcYcYrY+piv+zBoFW S3IqFRcT91hQoCgXgOxMW26rdBpmZ40+48JMm3sNXrsws5sLk7DRE2O8WKME9K0VUP FFrg2PSVRnrP0ErivDMDDNvWVEDRfm9UGBKQJ7xBCnmRqWcZ+WeT+D/+FKgZ/s76X+ rC4e0Ggc3Q7TmHkMhJk1swIcVI33UM7TD24b6+WUpsGpXTWOWmO/6Ub2tOdwxhVEt4 4A+WvEDcLCk1l+0Y3A3YzBIOXOlQFl2JPIrBuqNyv7W4hyw26D6G5U3LSIUfPn/t0A irMe6hGFIlGpg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NL0bT3fZfz9rxK; Sun, 27 Nov 2022 21:30:29 +0100 (CET) In-Reply-To: <87a64cmatq.fsf@disroot.org> (Akib Azmain Turja's message of "Mon, 28 Nov 2022 01:55:29 +0600") Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:300647 Archived-At: Akib Azmain Turja writes: > Philip Kaludercic writes: > >> Akib Azmain Turja writes: >> >>>> ;;;###autoload >>>> (defun gnu-indent-region (beg end) >>>> @@ -88,14 +87,15 @@ When called non-interactively, indent text between= BEG and END." >>>> (send-region process beg end) >>>> (process-send-eof process) >>>> (redisplay) >>>> - (while (process-live-p process) >>>> - (sleep-for 0.01)) >>>> + (while (accept-process-output process nil 10)) >>> >>> MILLISEC argument is obsolete, I used SECONDS instead. >> >> Actually, this change might have been pointless. I misremembed the >> warning from (elisp) Accepting Output, that said you shouldn't combine >> `accept-process-output' and `process-live-p', but what you were doing >> was probably harmless. >> >> I guess the real question is why you don't use a synchronous process? >> indent usually isn't that slow. >> > > I don't like synchronous processes, they block Emacs completely. What confuses me is that you manually re-create the behaviour of blocking, which in the end probably won't even matter because indent might even be done before you reach the first `process-live-p'. >>>> @@ -364,6 +370,7 @@ TIME-FORMAT is used to format data." >>>> 'solaire-region-face >>>> 'region)) >>>> ('line >>>> + ;; Looks like a `cond' to me >>>> (if (bound-and-true-p hl-line-mode) >>>> (if (bound-and-true-p solaire-mode) >>>> 'solaire-hl-line-face >>> >>> Yes, but I think its more efficient. (IIUC cond would test hl-line-mode >>> before returning why-this-face.) >> >> I don't think there would be a big difference. The transformation I had >> in mind was something along these lines: >> >> (if foo (if bar (if baz 0 1) 2) 3) >> =E2=87=9D >> (cond ((not foo) 3) >> ((not bar) 2) >> ((not baz) 1) >> (t 0)) > > At the first glance, I though your code is simply wrong. But after > reading more attentively, it tells me you're actually a genius. Humbled, but that might actually be a good argument against this change, if it is not that intuitive.