From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Motif support Date: Sun, 19 Dec 2021 20:23:35 +0800 Message-ID: <878rwg7ph4.fsf@yahoo.com> References: <878rwhbb91.fsf.ref@yahoo.com> <878rwhbb91.fsf@yahoo.com> <83ee699irm.fsf@gnu.org> <87r1a99icp.fsf@yahoo.com> <835yrl9gob.fsf@gnu.org> <87fsqp9cvn.fsf@yahoo.com> <87mtkwzxpd.fsf@telefonica.net> <871r2898rl.fsf@yahoo.com> <87ilvkzx1m.fsf@telefonica.net> <87wnk07tfq.fsf@yahoo.com> <87sfuo7t0a.fsf@yahoo.com> <87czlszvcu.fsf@telefonica.net> <87h7b47rie.fsf@yahoo.com> <878rwgztoc.fsf@telefonica.net> 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="7118"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: =?utf-8?Q?=C3=93scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 19 13:24:43 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 1myvF5-0001d5-M9 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 13:24:43 +0100 Original-Received: from localhost ([::1]:51570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myvF4-0001M6-DY for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 07:24:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myvED-0000Wj-1K for emacs-devel@gnu.org; Sun, 19 Dec 2021 07:23:49 -0500 Original-Received: from sonic308-56.consmr.mail.ne1.yahoo.com ([66.163.187.31]:36119) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myvEB-0001fb-Do for emacs-devel@gnu.org; Sun, 19 Dec 2021 07:23:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639916693; bh=LjNvRSvl22FJxntjqgIjc70UL78eDKF1gFlDpC+R0go=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=b12EkRynZp4qWZ2DB9GzZf/FGlaC+S7QndopYSYowsp/OVECXvGL/NKALOdWaHTyLEKx5RoDPEnapbYMU+tEsNPasONquPM7NTm+uASrCJWIQEiWnDROnD7WoRVAXa49sixJXevW70+ACuTQofrjRmc5SyTgqPQpgQriR8PyAG1g8nJQcjghr/HFE8sZ3mLmFPl4PbcXv20S9hNEFQ55Z0B4hsQ4JZcS+If8+xQ1gYMdwi61tzSMStX9bNaS7Hr0mppoa23e/1ZdWdeTbCo6cQbDMN7vZDzPg0bs/Lq1U/wy4gQAiDCYvObzx4Cs5b7LUvVihUr5ievcYEfZ/HFaxg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639916693; bh=kc93mMrhY+QJrwCYh0cJiKD1NhsjUXyv4SlmoL0TZeY=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Ocxbh2r+2HJFzMGSmaXESG+BR/HrquAv0fms1AYrU8UDgW2jZ1FOA52OvHokuBG6vpPGebV8vazKv5mXQx00VOLGulGP37bD7UbzO7P+URCjBJink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wMKPvl_QqaHoxi.6p92r2PpbVxQDIRD7o X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.ne1.yahoo.com with HTTP; Sun, 19 Dec 2021 12:24:53 +0000 Original-Received: by kubenode508.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 2e9ca3d6f79565519e1985c5e8383334; Sun, 19 Dec 2021 12:23:40 +0000 (UTC) In-Reply-To: <878rwgztoc.fsf@telefonica.net> (=?utf-8?Q?=22=C3=93scar?= Fuentes"'s message of "Sun, 19 Dec 2021 13:05:23 +0100") X-Mailer: WebService/1.1.19498 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.187.31; envelope-from=luangruo@yahoo.com; helo=sonic308-56.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" Xref: news.gmane.io gmane.emacs.devel:282421 Archived-At: =C3=93scar Fuentes writes: > Po Lu writes: > I disagree. I worked on some code bases much larger than Emacs' C part, > with an application domain much more technical and specialized, and > achieved productivity on non-trivial tasks after a few hours of study. > Those are projects that put a lot of thought on code architecture, both > macro and micro, with no tolerance for long-lived hacks or "somehow this > seems to work" changes. If you spend a week of study on X-Windows and Xt, along with spending some time to read the comments in keyboard.c, you will be able to understand the code in the X port fairly well. I've personally seen both the "no tolerance for long-lived-hacks" and the "you don't have to understand it to work on it" attitudes destroy decades-old pieces of software, so I don't recommend following it unconditionally. X is a very complicated system, so people interested in working on its support in Emacs are recommended to spend at least a week of study on it beforehand, just as they must also study C. Either way, the discussion has turned to a tangent. The original point was that the complexity added by Motif is too negligble to be considered extra. > Well, we always can pick a counter-example where GTK simplifies the job, > can't we? What XTflash does is somewhat weird, but for other more > mundane tasks GTK can be better. Or so I'll guess, since I don't know > that library and I've heard lots of times that it is a bit difficult to > work with in comparison with other contemporary toolkits. That sort of counter-example doesn't exist in the code in both kinds of GTK builds, IME. Both types of GTK build consistently need large amounts of hacks to work correctly, which are usually one or to five lines of straightforward code in an Xt or a no-toolkit build. For example, you can look at the function `xg_update_scrollbar_pos', and compare it to the code `XTset_vertical_scroll_bar' runs on an Xt or no-toolkit scroll bars build: This is run on Xt: XtConfigureWidget (SCROLL_BAR_X_WIDGET (FRAME_X_DISPLAY (f), bar), left, top, width, max (height, 1), 0); And this is run on when there are no toolkit scroll bars: /* Move/size the scroll bar window. */ if (mask) { XWindowChanges wc; wc.x =3D left; wc.y =3D top; wc.width =3D width; wc.height =3D height; XConfigureWindow (FRAME_X_DISPLAY (f), bar->x_window, mask, &wc); } Both of which are more straightforward to understand and work with than `xg_update_scrollbar_pos', where even the tiniest detail can cause the function to stop working correctly.