From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: a review of the merge (Re: Emacs.app merged) Date: Thu, 17 Jul 2008 11:08:25 -0700 Message-ID: <200807171808.m6HI8PfJ020208@sallyv1.ics.uci.edu> References: <1C66F1FC-BF82-4365-944D-ADCC4D1F435C@gmail.com> <200807160925.m6G9PuVj012462@sallyv1.ics.uci.edu> <200807170324.m6H3OwUW018599@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1216318204 20666 80.91.229.12 (17 Jul 2008 18:10:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jul 2008 18:10:04 +0000 (UTC) Cc: emacs- devel To: Adrian Robert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 17 20:10:51 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KJXwA-0001QD-6x for ged-emacs-devel@m.gmane.org; Thu, 17 Jul 2008 20:10:43 +0200 Original-Received: from localhost ([127.0.0.1]:33817 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJXvH-0005P4-8j for ged-emacs-devel@m.gmane.org; Thu, 17 Jul 2008 14:09:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJXuC-0004RF-2s for emacs-devel@gnu.org; Thu, 17 Jul 2008 14:08:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJXuB-0004Pl-31 for emacs-devel@gnu.org; Thu, 17 Jul 2008 14:08:39 -0400 Original-Received: from [199.232.76.173] (port=46586 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJXuA-0004PW-VN for emacs-devel@gnu.org; Thu, 17 Jul 2008 14:08:39 -0400 Original-Received: from sallyv1.ics.uci.edu ([128.195.1.109]:58753) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1KJXuA-0006Yl-CI for emacs-devel@gnu.org; Thu, 17 Jul 2008 14:08:38 -0400 X-ICS-MailScanner-Watermark: 1216922907.2401@qRNc05Mv8BJ4Nd+8mUiVgg Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv1.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id m6HI8PfJ020208; Thu, 17 Jul 2008 11:08:25 -0700 (PDT) In-Reply-To: (Adrian Robert's message of "Thu, 17 Jul 2008 13:22:56 -0400") Original-Lines: 185 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.263, required 5, autolearn=disabled, ALL_TRUSTED -1.44, FM_MULTI_ODD2 1.10, TW_DV 0.08) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:100895 Archived-At: Adrian Robert writes: > On Jul 16, 2008, at 11:24 PM, Dan Nicolaescu wrote: > > > Adrian Robert writes: > > > >> On Jul 16, 2008, at 5:25 AM, Dan Nicolaescu wrote: > >> > >> > >> Index: lisp/startup.el > >> =================================================================== > >> RCS file: /sources/emacs/emacs/lisp/startup.el,v > >> retrieving revision 1.494 > >> diff -a -u -r1.494 startup.el > >> --- lisp/startup.el 2 Jul 2008 01:49:01 -0000 1.494 > >> +++ lisp/startup.el 15 Jul 2008 16:54:18 -0000 > >> @@ -182,3 +182,6 @@ > >> and VALUE is the value which is given to that frame parameter > >> \(most options use the argument for this, so VALUE is not > >> present).") > >> > >> +(defconst command-line-ns-option-alist > >> + '(("-NSAutoLaunch" 1 ns-ignore-1-arg) > >> + ("-NXAutoLaunch" 1 ns-ignore-1-arg) > >> [snip] > >> > >> Can this be put somewhere else? It would be better if all other > >> platforms > >> do not have to load this definition. > >> > >> + ;; Add the long NS options to longopts. > >> + (setq tem command-line-ns-option-alist) > >> + (while tem > >> + (if (string-match "^--" (car (car tem))) > >> + (setq longopts (cons (list (car (car tem))) longopts))) > >> + (setq tem (cdr tem))) > >> > >> Can this be avoided and use the generic code for command line > >> processing? > >> > >> > >> > >> NS has followed the X GUI in both these cases, using ns- prefix to > >> distinguish > >> variables for option lists, etc. that are specific to the NS > >> platform, as X- is > >> used to indicate X-windows. I do realize that w32 and mac (Carbon) > >> seem to > >> deal with their arguments in ways not involving this file. The > >> question is, > >> should every platform be done in the same way as X, or should X and > >> NS be > >> changed to whatever mac and w32 are doing? > > > > NS should be following whatever X, w32 and mac are doing. That makes > > maintaining the code easier. > > > > For example there are quite a few functions/variables that X, w32 and > > mac call x-BLAH. But ns calls them ns-BLAH. Please rename them to > > x-BLAH. > > Sorry if I was unclear, there are two points here. First, NS has > followed X, but mac and w32 do their own (different) thing for arg > handling. Things should be consistent, but don't know which ones > should be changed. > > The second point is about naming. I feel that ports that used the > "x-" prefix for their own functions did the wrong thing in general, > and make things more confusing. That decision was made probably more than 10 years ago, there's little point to reopen this issue now without a good reason. The fact that a platform that does not follow existing conventions just makes the code harder to maintain, and maintanability is one of the main concerns for emacs. Same argument goes for getting rid of etc/Emacs.clr. > >> Index: src/frame.c > >> ... > >> Fselect_window (XFRAME (frame)->selected_window, Qnil); > >> > >> +#ifdef NS_IMPL_COCOA > >> + /* term gets no other notification of this */ > >> + if (for_deletion) > >> + Fraise_frame(Qnil); > >> +#endif > >> > >> Why isn't his needed for other platforms too? > >> > >> > >> I don't know. I would be happy to get rid of it if I knew. > > > > IMHO this needs to be debugged and understood better. When does it > > happen? > > The case being hit was, when a frame was closed, no other frame would > get focus. As Stefan said, it would be better if this problem was understood, and the first step would be to have a proper description. > >> Index: src/getloadavg.c > >> =================================================================== > >> RCS file: /sources/emacs/emacs/src/getloadavg.c,v > >> retrieving revision 1.53 > >> diff -a -u -r1.53 getloadavg.c > >> --- src/getloadavg.c 8 Jan 2008 20:44:33 -0000 1.53 > >> +++ src/getloadavg.c 15 Jul 2008 16:59:32 -0000 > >> > >> This file comes from gnulib, we try not to change it here. It > >> should go > >> there first. > >> Why wasn't this needed until now? This should not have anything > >> to do with > >> NS... > >> > >> > >> I don't know, probably it was never working. I actually am not > >> sure if it is > >> now, but anyway the original is using #ifdef NeXT to check whether > >> mach.h is in > >> a subdirectory, but it seems all NeXT-derived systems put it in the > >> same place > >> (e.g., my OS X 10.5.4 machine here). > >> > >> ACTUALLY, it looks like this file is not even used anymore (grep thru > >> Makefile.in), so probably it should just be removed. > > > > If you don't have a getloadavg.o in your tree, then it's safe to undo > > these changes... > > I don't, but neither does anybody else. ;) How about just removing > the .c file? I don't think that would be safe, it is still used by configure for systems that do have a getloadvg function. I don't know if we still support such systems, but I'd welcome it being removed... But this is a different discussion, the fact is the code in getloadvg should not be modified in the emacs tree, and more, it should not be modified if we don't know for sure it needs to be modified. > >> Index: src/terminfo.c > >> =================================================================== > >> RCS file: /sources/emacs/emacs/src/terminfo.c,v > >> retrieving revision 1.24 > >> diff -a -u -r1.24 terminfo.c > >> --- src/terminfo.c 14 May 2008 07:49:52 -0000 1.24 > >> +++ src/terminfo.c 15 Jul 2008 17:03:07 -0000 > >> @@ -24,4 +24,7 @@ > >> so that we do not need to conditionalize the places in Emacs > >> that set them. */ > >> > >> +/* Causes a conflict on OS X 10.3 .*/ > >> +#ifndef NS_IMPL_COCOA > >> char *UP, *BC, PC; > >> +#endif > >> > >> Does "emacs -nw" work after doing this? How come this wasn't a > >> problem > >> with the Carbon port? > >> > >> > >> Yes, and I don't know. It's possible something is different in the > >> includes > >> brought in by Carbon vs. Cocoa. > > > > Is OS X 10.3 something we still want to support? > > If yes, then maybe better rename those variables. > > As far as Emacs.app, no reason not to support 10.3 for now, but > eventually some code can be removed if the decision is to drop it. In > truth, I haven't tested it in a while. I don't understand enough > about the use of these variables and their relation to the same ones > in ncurses includes to want to mess any further with these variables > though. So basically we are adding code to support a system that we don't even know that it even works, nor do we know for sure what the problem is. The termcap/terminfo code is too complicated as it is, better not add yet more complications like this. So I'd say, better take this out, we are still not very close to a release. If problems occur by then, they can be fixed with a proper understanding of what is going on and being able to test the results.