From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 02 17:55:52 2014 Received: (at submit) by debbugs.gnu.org; 2 Aug 2014 21:55:52 +0000 Received: from localhost ([127.0.0.1]:55308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDhHL-000235-I9 for submit@debbugs.gnu.org; Sat, 02 Aug 2014 17:55:52 -0400 Received: from fely.am-1.org ([78.47.74.50]:49178) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDhHJ-00022w-IF for submit@debbugs.gnu.org; Sat, 02 Aug 2014 17:55:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=oo7W4moZG1wqjkUpxphnevepPikTvs7TtF20RaDwVzE=; b=j1PHQoJAMLWfRV8lz51Ocy+GiJGewj6lMm54u6889OsYKgPyYSheo+2zh/u3pW0v8udyZAuHlBJeSJGykup2ijLPjsRBhJBmSReKXzco/GY4W2YLJQ8r9BllNWoLOeSsKldMRUzt/fuZD1EUWSypryejQhv75zdYZJAA6c5l0ds=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XDhHG-0006hs-Ok for submit@debbugs.gnu.org; Sat, 02 Aug 2014 21:55:47 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XDhH9-0006IV-Qs for submit@debbugs.gnu.org; Sun, 03 Aug 2014 04:55:39 +0700 From: Ivan Shmakov To: submit@debbugs.gnu.org Subject: files.el: use mapc in (mapcar 'switch-to-buffer ...) Date: Sat, 02 Aug 2014 21:55:39 +0000 Message-ID: <87r40yftes.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Package: emacs Severity: wishlist Given that switch-to-buffer returns its argument, /and/ given that mapc returns the sequence it=E2=80=99s given, I suggest that the (mapcar 'switch-to-buffer LIST) forms in lisp/files.el be replaced with (mapc 'switch-to-buffer LIST), =E2=80=93 if only to avoid the unnecessary consing when the list is effectively copied in the mapcar case. The lists mapcar is applied to in such cases are returned from find-file-noselect, and so, as it seems, are =E2=80=9Cfresh=E2=80=9D ones anyway. A possible patch is MIMEd. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A --=-=-= Content-Type: text/x-diff Content-Disposition: inline diff --git a/lisp/files.el b/lisp/files.el index 9272e98..e604ce7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1428,7 +1428,7 @@ automatically choosing a major mode, use \\[find-file-literally]." (confirm-nonexistent-file-or-buffer))) (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) - (mapcar 'switch-to-buffer (nreverse value)) + (mapc 'switch-to-buffer (nreverse value)) (switch-to-buffer value)))) (defun find-file-other-window (filename &optional wildcards) @@ -1451,7 +1451,7 @@ expand wildcards (if any) and visit multiple files." (progn (setq value (nreverse value)) (cons (switch-to-buffer-other-window (car value)) - (mapcar 'switch-to-buffer (cdr value)))) + (mapc 'switch-to-buffer (cdr value)))) (switch-to-buffer-other-window value)))) (defun find-file-other-frame (filename &optional wildcards) @@ -1474,7 +1474,7 @@ expand wildcards (if any) and visit multiple files." (progn (setq value (nreverse value)) (cons (switch-to-buffer-other-frame (car value)) - (mapcar 'switch-to-buffer (cdr value)))) + (mapc 'switch-to-buffer (cdr value)))) (switch-to-buffer-other-frame value)))) (defun find-file-existing (filename) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 02 20:56:04 2014 Received: (at 18175) by debbugs.gnu.org; 3 Aug 2014 00:56:04 +0000 Received: from localhost ([127.0.0.1]:55347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDk5k-0007kU-1E for submit@debbugs.gnu.org; Sat, 02 Aug 2014 20:56:04 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:44520) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDk5g-0007jj-Se for 18175@debbugs.gnu.org; Sat, 02 Aug 2014 20:56:02 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s730trRI028617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 3 Aug 2014 00:55:54 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s730tqFH025349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 3 Aug 2014 00:55:53 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s730tp9a017898; Sun, 3 Aug 2014 00:55:51 GMT MIME-Version: 1.0 Message-ID: <3d8bb179-4e59-4d81-9ee1-54ff0da430b0@default> Date: Sat, 2 Aug 2014 17:55:53 -0700 (PDT) From: Drew Adams To: Ivan Shmakov , 18175@debbugs.gnu.org Subject: RE: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) References: <87r40yftes.fsf@violet.siamics.net> In-Reply-To: <87r40yftes.fsf@violet.siamics.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 18175 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > =09Given that switch-to-buffer returns its argument, /and/ given > =09that mapc returns the sequence it=E2=80=99s given, I suggest that the > =09(mapcar 'switch-to-buffer LIST) forms in lisp/files.el be > =09replaced with (mapc 'switch-to-buffer LIST), =E2=80=93 if only to avoi= d > =09the unnecessary consing when the list is effectively copied in > =09the mapcar case. >=20 > =09The lists mapcar is applied to in such cases are returned from > =09find-file-noselect, and so, as it seems, are =E2=80=9Cfresh=E2=80=9D o= nes > =09anyway. Not a good idea, IMHO. It's not just about performance; it's about coding style. By using `mapcar' you are signaling that you are interested in the return v= alues of the argument function (and of course the resulting list of them). By using `mapc' you are signaling that the values returned by the argument = function are unimportant (only its side effects are significant). If you want to improve the performance, and that is the only change you wan= t to make, then please consider another approach. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 03 04:55:34 2014 Received: (at 18175) by debbugs.gnu.org; 3 Aug 2014 08:55:34 +0000 Received: from localhost ([127.0.0.1]:55589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDrZm-0005V1-1T for submit@debbugs.gnu.org; Sun, 03 Aug 2014 04:55:34 -0400 Received: from fely.am-1.org ([78.47.74.50]:49217) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDrZj-0005Uq-AR for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 04:55:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=5dOgHudPOrDZLLd2e6PfSfsw9ctOw6EtIYGJcN5iJ3U=; b=Ph/MDTtsKcv1AW/D2hvuxzUxpozZ3jl17uUY7iWh4fEiTF/bmAntLy/5xCinX2rhbhfsDKkHaKaUrD4iVAadn/K5TQ25zcXyS0xPh92lL9KNI4Eo2HIOPVkVSwT5DOcHiFgB0WZgneeuweGHdunEstzNTKcko83dMuXZ1ot89B0=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XDrZh-0003ZR-Ah for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 08:55:29 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XDrZa-0007LN-3T for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 15:55:22 +0700 From: Ivan Shmakov To: 18175@debbugs.gnu.org Subject: Re: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) References: <87r40yftes.fsf@violet.siamics.net> <3d8bb179-4e59-4d81-9ee1-54ff0da430b0@default> Date: Sun, 03 Aug 2014 08:55:21 +0000 In-Reply-To: <3d8bb179-4e59-4d81-9ee1-54ff0da430b0@default> (Drew Adams's message of "Sat, 2 Aug 2014 17:55:53 -0700 (PDT)") Message-ID: <87mwbmeyva.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18175 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> Drew Adams writes: >> Given that switch-to-buffer returns its argument, /and/ given that >> mapc returns the sequence it=E2=80=99s given, I suggest that the >> (mapcar 'switch-to-buffer LIST) forms in lisp/files.el be replaced >> with (mapc 'switch-to-buffer LIST), =E2=80=93 if only to avoid the >> unnecessary consing when the list is effectively copied in the >> mapcar case. >> The lists mapcar is applied to in such cases are returned from >> find-file-noselect, and so, as it seems, are =E2=80=9Cfresh=E2=80=9D on= es anyway. > Not a good idea, IMHO. > It's not just about performance; it's about coding style. > By using `mapcar' you are signaling that you are interested in the > return values of the argument function (and of course the resulting > list of them). > By using `mapc' you are signaling that the values returned by the > argument function are unimportant (only its side effects are > significant). How do you signal that the values returned by the argument function are unimportant, /and/ that you=E2=80=99re interested in the /original/ list instead? > If you want to improve the performance, and that is the only change > you want to make, then please consider another approach. Please consider the patch MIMEd. FWIW, it avoids one more cons in both find-file-other-window and find-file-other-frame. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A --=-=-= Content-Type: text/x-diff Content-Disposition: inline diff --git a/lisp/files.el b/lisp/files.el index 9272e98..c3a6f0d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1428,7 +1428,7 @@ automatically choosing a major mode, use \\[find-file-literally]." (confirm-nonexistent-file-or-buffer))) (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) - (mapcar 'switch-to-buffer (nreverse value)) + (mapc 'switch-to-buffer (nreverse value)) (switch-to-buffer value)))) (defun find-file-other-window (filename &optional wildcards) @@ -1448,10 +1448,10 @@ expand wildcards (if any) and visit multiple files." (confirm-nonexistent-file-or-buffer))) (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) - (progn - (setq value (nreverse value)) - (cons (switch-to-buffer-other-window (car value)) - (mapcar 'switch-to-buffer (cdr value)))) + (prog1 + (setq value (nreverse value)) + (switch-to-buffer-other-window (car value)) + (mapc 'switch-to-buffer (cdr value))) (switch-to-buffer-other-window value)))) (defun find-file-other-frame (filename &optional wildcards) @@ -1471,10 +1471,10 @@ expand wildcards (if any) and visit multiple files." (confirm-nonexistent-file-or-buffer))) (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) - (progn - (setq value (nreverse value)) - (cons (switch-to-buffer-other-frame (car value)) - (mapcar 'switch-to-buffer (cdr value)))) + (prog1 + (setq value (nreverse value)) + (switch-to-buffer-other-frame (car value)) + (mapc 'switch-to-buffer (cdr value))) (switch-to-buffer-other-frame value)))) (defun find-file-existing (filename) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 03 12:32:44 2014 Received: (at 18175) by debbugs.gnu.org; 3 Aug 2014 16:32:44 +0000 Received: from localhost ([127.0.0.1]:56147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDyiB-0001F5-Hj for submit@debbugs.gnu.org; Sun, 03 Aug 2014 12:32:43 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:39366) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDyiA-0001Es-EJ for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 12:32:42 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s73GWXcP026868 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 3 Aug 2014 16:32:36 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s73GWSKB003747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 3 Aug 2014 16:32:29 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s73GWRqc024032; Sun, 3 Aug 2014 16:32:28 GMT MIME-Version: 1.0 Message-ID: <77fd6f4e-8cfd-49d1-884e-c61ce7a075a3@default> Date: Sun, 3 Aug 2014 09:32:29 -0700 (PDT) From: Drew Adams To: Ivan Shmakov , 18175@debbugs.gnu.org Subject: RE: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) References: <87r40yftes.fsf@violet.siamics.net> <3d8bb179-4e59-4d81-9ee1-54ff0da430b0@default> <87mwbmeyva.fsf@violet.siamics.net> In-Reply-To: <87mwbmeyva.fsf@violet.siamics.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 18175 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > > By using `mapcar' you are signaling that you are interested in the > > return values of the argument function (and of course the resulting > > list of them). >=20 > > By using `mapc' you are signaling that the values returned by the > > argument function are unimportant (only its side effects are > > significant). >=20 > =09How do you signal that the values returned by the argument > =09function are unimportant, /and/ that you=E2=80=99re interested in the > =09/original/ list instead? By doing what you've done now. Neither `mapc' nor `mapcar' says that, on its own. If return values are not important in some code then `mapc`, `dolist`, `while`, or any number of other imperative/procedural approaches are fine to use, and are often preferable. Looking briefly at the original code and your patches now, I am reminded that `find-file*' needs to return the list of buffers (or the single buffer, for that case). (As one user, for example, I have code that expects the list of buffers to be returned.) Your new patch does that, and it looks OK to me. I did not spend much time looking things over, so I might be missing something, but it looks like you are not changing the external behavior (good). It is fine to optimize things, but function interfaces (signatures and behavior as viewed by calling functions or by users) should not be altered. You might want to make sure that the list of buffers returned is the same in all cases as what is returned today. The doc string of `switch-to-buffer', for instance, seems to make a point of saying that it returns the buffer switched to. It does not say that it returns the buffer indicated by argument BUFFER-OR-NAME. Dunno why, but it does. I'm guessing that that can make a difference only if the intended buffer cannot be switched to (an error is raised). And in that case I'm guessing that the error raised would be handled correctly by `find-file*'. (I have not checked.) You might also want to check to be sure that the effect on what `buffer-list' returns (after the calls to `switch-buffer*') remains the same. The calls to `switch-to-buffer*' here do not use non-nil NORECORD, so that at least can be ignored. But maybe take a look, to make sure. Some commands and other functions depend on the buffer order in `buffer-list', so this too should not be altered by your proposed change. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 03 14:25:19 2014 Received: (at 18175) by debbugs.gnu.org; 3 Aug 2014 18:25:19 +0000 Received: from localhost ([127.0.0.1]:56179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XE0T8-00040E-A6 for submit@debbugs.gnu.org; Sun, 03 Aug 2014 14:25:18 -0400 Received: from fely.am-1.org ([78.47.74.50]:49254) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XE0T5-000403-N1 for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 14:25:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Sender:References:In-Reply-To:Subject:To:From; bh=CM5O5dPAmgIs71OkPDhcsfD+qlMSg2Jz1YZ6GbAXtoQ=; b=F/Kak15DeWkZV+DJXofX2MHifV/LOlQxBeyMSCo0r9W36/EUlYS9wfISX7zdwqwf8tsJSxLrbyD0FfI9p/43JIY/oZ08LxaDbrGCsBRCz5RMhQB3V4FGeELmOM9Jl1kbQzRn96KB7PsHoboYaUpIADa34AbdyTJLjzo7xocZ1lc=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XE0T3-000067-Pu for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 18:25:14 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XE0Sw-0008Dc-Hj for 18175@debbugs.gnu.org; Mon, 04 Aug 2014 01:25:06 +0700 From: Ivan Shmakov To: 18175@debbugs.gnu.org Subject: Re: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) In-Reply-To: <77fd6f4e-8cfd-49d1-884e-c61ce7a075a3@default> (Drew Adams's message of "Sun, 3 Aug 2014 09:32:29 -0700 (PDT)") References: <87r40yftes.fsf@violet.siamics.net> <3d8bb179-4e59-4d81-9ee1-54ff0da430b0@default> <87mwbmeyva.fsf@violet.siamics.net> <77fd6f4e-8cfd-49d1-884e-c61ce7a075a3@default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Date: Sun, 03 Aug 2014 18:25:06 +0000 Message-ID: <87ha1tfn25.fsf@violet.siamics.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18175 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) >>>>> Drew Adams writes: [=E2=80=A6] > Your new patch does that, and it looks OK to me. I did not spend > much time looking things over, so I might be missing something, but > it looks like you are not changing the external behavior (good). > It is fine to optimize things, but function interfaces (signatures > and behavior as viewed by calling functions or by users) should not > be altered. I expect neither of these patches to change the external behavior. > You might want to make sure that the list of buffers returned is the > same in all cases as what is returned today. The doc string of > `switch-to-buffer', for instance, seems to make a point of saying > that it returns the buffer switched to. It does not say that it > returns the buffer indicated by argument BUFFER-OR-NAME. Dunno why, > but it does. I guess it=E2=80=99s because switch-to-buffer passes its argument through window-normalize-buffer-to-switch-to, which passes it through get-buffer in turn. The docstring for the latter reads: =E2=80=A6 If BUFFER-OR-NAME is a buffer, return it as given. And I see no reason for a buffer /name/ to ever appear in the lists returned from find-file-noselect. > I'm guessing that that can make a difference only if the intended > buffer cannot be switched to (an error is raised). And in that case > I'm guessing that the error raised would be handled correctly by > `find-file*'. (I have not checked.) As there=E2=80=99re no condition-case forms around switch-to-buffer calls in find-file et al. =E2=80=93 no such error will be handled in any special way, and will just be signalled to the user as usual. > You might also want to check to be sure that the effect on what > `buffer-list' returns (after the calls to `switch-buffer*') remains > the same. AIUI, the buffer-list result depends solely on the order of calls to switch-to-buffer, which is /not/ changed in any way. > The calls to `switch-to-buffer*' here do not use non-nil NORECORD, so > that at least can be ignored. But maybe take a look, to make sure. > Some commands and other functions depend on the buffer order in > `buffer-list', so this too should not be altered by your proposed > change. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 03 14:44:03 2014 Received: (at 18175) by debbugs.gnu.org; 3 Aug 2014 18:44:03 +0000 Received: from localhost ([127.0.0.1]:56200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XE0lG-0004UY-Cf for submit@debbugs.gnu.org; Sun, 03 Aug 2014 14:44:02 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:18398) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XE0lC-0004Tv-7V for 18175@debbugs.gnu.org; Sun, 03 Aug 2014 14:43:58 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s73IhnR1009709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 3 Aug 2014 18:43:49 GMT Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s73IhlLi020300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 3 Aug 2014 18:43:48 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s73IhldJ022068; Sun, 3 Aug 2014 18:43:47 GMT MIME-Version: 1.0 Message-ID: <7ac7622e-acbc-43ee-a58d-d1d97d3e8f16@default> Date: Sun, 3 Aug 2014 11:43:48 -0700 (PDT) From: Drew Adams To: Ivan Shmakov , 18175@debbugs.gnu.org Subject: RE: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) References: <87r40yftes.fsf@violet.siamics.net> <3d8bb179-4e59-4d81-9ee1-54ff0da430b0@default> <87mwbmeyva.fsf@violet.siamics.net> <77fd6f4e-8cfd-49d1-884e-c61ce7a075a3@default> <87ha1tfn25.fsf@violet.siamics.net> In-Reply-To: <87ha1tfn25.fsf@violet.siamics.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 18175 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > The docstring for the latter reads: > =E2=80=A6 If BUFFER-OR-NAME is a buffer, return it as given. > And I see no reason for a buffer /name/ to ever appear in the > lists returned from find-file-noselect. Yes, of course not. It needs to return a list of buffers. That's why I wrote that we need to "make sure that the list of buffers returned is the same in all cases as what is returned today." ^^^^^^^ > > I'm guessing that that can make a difference only if the intended > > buffer cannot be switched to (an error is raised). And in that case > > I'm guessing that the error raised would be handled correctly by > > `find-file*'. (I have not checked.) >=20 > =09As there=E2=80=99re no condition-case forms around switch-to-buffer > =09calls in find-file et al. =E2=80=93 no such error will be handled in a= ny > =09special way, and will just be signalled to the user as usual. That all I meant by handled (treated) by `find-file*', not that there is a `condition-case' with a handler. The point is that the behavior should remain the same; that's all. If it does, fine. > > You might also want to check to be sure that the effect on what > > `buffer-list' returns (after the calls to `switch-buffer*') remains > > the same. >=20 > =09AIUI, the buffer-list result depends solely on the order of > =09calls to switch-to-buffer, which is /not/ changed in any way. >=20 > > The calls to `switch-to-buffer*' here do not use non-nil NORECORD, so > > that at least can be ignored. But maybe take a look, to make sure. > > Some commands and other functions depend on the buffer order in > > `buffer-list', so this too should not be altered by your proposed > > change. Thanks for looking at and testing these things. From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 06 13:26:51 2014 Received: (at 18175) by debbugs.gnu.org; 6 Aug 2014 17:26:51 +0000 Received: from localhost ([127.0.0.1]:60608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XF4zD-0005Ec-0R for submit@debbugs.gnu.org; Wed, 06 Aug 2014 13:26:51 -0400 Received: from mercure.iro.umontreal.ca ([132.204.24.67]:41638) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XF4zA-0005ES-Mn for 18175@debbugs.gnu.org; Wed, 06 Aug 2014 13:26:49 -0400 Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 4403C84EE0; Wed, 6 Aug 2014 13:26:48 -0400 (EDT) Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 3B41D1E5B74; Wed, 6 Aug 2014 13:26:23 -0400 (EDT) Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 12C3BB40CD; Wed, 6 Aug 2014 13:26:23 -0400 (EDT) From: Stefan Monnier To: Ivan Shmakov Subject: Re: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) Message-ID: References: <87r40yftes.fsf@violet.siamics.net> Date: Wed, 06 Aug 2014 13:26:22 -0400 In-Reply-To: <87r40yftes.fsf@violet.siamics.net> (Ivan Shmakov's message of "Sat, 02 Aug 2014 21:55:39 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-Spam-Status: No X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 18175 Cc: 18175@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) > Given that switch-to-buffer returns its argument, /and/ given > that mapc returns the sequence it=E2=80=99s given, I suggest that the > (mapcar 'switch-to-buffer LIST) forms in lisp/files.el be > replaced with (mapc 'switch-to-buffer LIST), =E2=80=93 if only to avoid > the unnecessary consing when the list is effectively copied in > the mapcar case. Thanks, I think it's indeed a valid/correct optimization, but I really dislike relying on mapc's return value (it really should not return any value at all). In this case, the optimization doesn't seem worth the inconvenient of having a very unusual code (relying on mapc's return value), since those few cons cells we save are drowned in the noise of all the code run by switch-to-buffer. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 06 20:04:23 2014 Received: (at control) by debbugs.gnu.org; 7 Aug 2014 00:04:23 +0000 Received: from localhost ([127.0.0.1]:60954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFBBu-0008Gs-P8 for submit@debbugs.gnu.org; Wed, 06 Aug 2014 20:04:22 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:44535 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFBBs-0008Gk-Bc for control@debbugs.gnu.org; Wed, 06 Aug 2014 20:04:21 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XFBBs-000187-21 for control@debbugs.gnu.org; Wed, 06 Aug 2014 20:04:20 -0400 Date: Wed, 06 Aug 2014 20:04:20 -0400 Message-Id: Subject: control message for bug 18175 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.7 (-----) tag 18175 wontfix From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 07 15:15:46 2014 Received: (at 18175) by debbugs.gnu.org; 7 Aug 2014 19:15:47 +0000 Received: from localhost ([127.0.0.1]:34287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFTAA-0006aW-8Q for submit@debbugs.gnu.org; Thu, 07 Aug 2014 15:15:46 -0400 Received: from fely.am-1.org ([78.47.74.50]:49786) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFTA6-0006aL-TK for 18175@debbugs.gnu.org; Thu, 07 Aug 2014 15:15:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=w4U3d7EzsgzBk5noi7WnegaLadVJakaIGOu3DX5GlQs=; b=MHBec09TSFOgY6fjk5ydXnq9Bi2tQZ/+6Dz9hp3jA6VEY75Cj5JNCbbSGeBqB8k+UDPR+k1PFMrRg1KpJoj/2EnZJ5oD1+QwW18P/clUtVWGVRhQUS1NX+xzRwFnyUqEQt3MpBOUq1BuypdNungTX1HhoJN5pXXGpZdi3R4x4Zs=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XFTA5-0002aO-BJ for 18175@debbugs.gnu.org; Thu, 07 Aug 2014 19:15:41 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XFT9y-0007Im-EK for 18175@debbugs.gnu.org; Fri, 08 Aug 2014 02:15:34 +0700 From: Ivan Shmakov To: 18175@debbugs.gnu.org Subject: Re: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) References: <87r40yftes.fsf@violet.siamics.net> Date: Thu, 07 Aug 2014 19:15:34 +0000 In-Reply-To: (Stefan Monnier's message of "Wed, 06 Aug 2014 13:26:22 -0400") Message-ID: <87ha1ot8kp.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18175 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >>>>> Stefan Monnier writes: >> Given that switch-to-buffer returns its argument, /and/ given that >> mapc returns the sequence it=E2=80=99s given, I suggest that the (mapcar >> 'switch-to-buffer LIST) forms in lisp/files.el be replaced with >> (mapc 'switch-to-buffer LIST), =E2=80=93 if only to avoid the unnecessa= ry >> consing when the list is effectively copied in the mapcar case. > Thanks, I think it's indeed a valid/correct optimization, but I > really dislike relying on mapc's return value (it really should not > return any value at all). I tend to disagree with that last part, =E2=80=93 it seems like a common idiom for a function (or, generally, =E2=80=93 a /form/; setq does that, for one thing) that=E2=80=99s used =E2=80=9Csolely=E2=80=9D for its side-e= ffects to return its =E2=80=9Cprimary=E2=80=9D argument, thus allowing for easy =E2=80=9Cchaining=E2=80=9D, like: (foo (bar 42 (baz data))) Instead of: (progn (foo data) (bar 42 data) (baz data)) Or something even more crude, like: (mapc (lambda (fn) (if (consp fn) (apply (car fn) `(,@(cdr fn) ,data)) (funcall fn data))) '(foo (bar 42) baz)) Surely, =E2=80=98mapc=E2=80=99 fits that pattern pretty well; cf.: (foo (bar 42 (baz lst))) (foo (mapc 'qux (baz lst))) > In this case, the optimization doesn't seem worth the inconvenient of > having a very unusual code (relying on mapc's return value), since > those few cons cells we save are drowned in the noise of all the code > run by switch-to-buffer. Yes. However, I believe that the last two hunks of the one another variant of the diff (MIMEd) actually make the intent to return the reverse of the list returned by find-file-noselect /clearer,/ =E2=80=93 although at the expense of adding one extra LoC in each case. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A --=-=-= Content-Type: text/x-diff Content-Disposition: inline --- a/lisp/files.el +++ b/lisp/files.el @@ -1428,7 +1428,7 @@ automatically choosing a major mode, use \\[find-file-literally]." (confirm-nonexistent-file-or-buffer))) (let ((value (find-file-noselect filename nil nil wildcards))) (if (listp value) - (mapcar 'switch-to-buffer (nreverse value)) + (mapc 'switch-to-buffer (nreverse value)) (switch-to-buffer value)))) (defun find-file-other-window (filename &optional wildcards) @@ -1450,8 +1450,9 @@ expand wildcards (if any) and visit multiple files." (if (listp value) (progn (setq value (nreverse value)) - (cons (switch-to-buffer-other-window (car value)) - (mapcar 'switch-to-buffer (cdr value)))) + (switch-to-buffer-other-window (car value)) + (mapc 'switch-to-buffer (cdr value)) + value) (switch-to-buffer-other-window value)))) (defun find-file-other-frame (filename &optional wildcards) @@ -1473,8 +1474,9 @@ expand wildcards (if any) and visit multiple files." (if (listp value) (progn (setq value (nreverse value)) - (cons (switch-to-buffer-other-frame (car value)) - (mapcar 'switch-to-buffer (cdr value)))) + (switch-to-buffer-other-frame (car value)) + (mapc 'switch-to-buffer (cdr value)) + value) (switch-to-buffer-other-frame value)))) (defun find-file-existing (filename) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 07 15:29:13 2014 Received: (at 18175) by debbugs.gnu.org; 7 Aug 2014 19:29:13 +0000 Received: from localhost ([127.0.0.1]:34300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFTNA-0006xC-LX for submit@debbugs.gnu.org; Thu, 07 Aug 2014 15:29:13 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:26978) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFTN7-0006wy-PJ for 18175@debbugs.gnu.org; Thu, 07 Aug 2014 15:29:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVPAqyKr/2dsb2JhbABZgwaDSlK/a4EXF3SCJQEBAQECASMzIwULCxoCGA4CAhQYDSSIBAivG6J+F4EpjR4zB4JvgUkEqwODTCE X-IPAS-Result: ArYGAIDvNVPAqyKr/2dsb2JhbABZgwaDSlK/a4EXF3SCJQEBAQECASMzIwULCxoCGA4CAhQYDSSIBAivG6J+F4EpjR4zB4JvgUkEqwODTCE X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="82403315" Received: from 192-171-34-171.cpe.pppoe.ca (HELO pastel.home) ([192.171.34.171]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Aug 2014 15:29:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id CCB4867923; Thu, 7 Aug 2014 15:29:03 -0400 (EDT) From: Stefan Monnier To: Ivan Shmakov Subject: Re: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) Message-ID: References: <87r40yftes.fsf@violet.siamics.net> <87ha1ot8kp.fsf@violet.siamics.net> Date: Thu, 07 Aug 2014 15:29:03 -0400 In-Reply-To: <87ha1ot8kp.fsf@violet.siamics.net> (Ivan Shmakov's message of "Thu, 07 Aug 2014 19:15:34 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 18175 Cc: 18175@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > I tend to disagree with that last part, =E2=80=93 it seems like a common > idiom for a function (or, generally, =E2=80=93 a /form/; setq does that, > for one thing) that=E2=80=99s used =E2=80=9Csolely=E2=80=9D for its side= -effects to > return its =E2=80=9Cprimary=E2=80=9D argument, thus allowing for easy Yes, it's common, but I strongly dislike it. It's used often enough for `setq' that I consider it to be an exception. In the case of `mapc' OTOH, I'm pretty sure 99.9% of Elisp coders have no idea what is the return value of `mapc', so using this return value is a kind of obfuscation. > Yes. However, I believe that the last two hunks of the one > another variant of the diff (MIMEd) actually make the intent to > return the reverse of the list returned by find-file-noselect > /clearer,/ =E2=80=93 although at the expense of adding one extra LoC in > each case. Agreed, and neither relies on the return value of `mapc', so those two hunks are indeed good. Please install them. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 07 15:36:44 2014 Received: (at control) by debbugs.gnu.org; 7 Aug 2014 19:36:44 +0000 Received: from localhost ([127.0.0.1]:34308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFTUR-0007Ad-4q for submit@debbugs.gnu.org; Thu, 07 Aug 2014 15:36:43 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:42120 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFTUO-0007AV-Ic for control@debbugs.gnu.org; Thu, 07 Aug 2014 15:36:41 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1XFTUN-00061c-TR for control@debbugs.gnu.org; Thu, 07 Aug 2014 15:36:39 -0400 Date: Thu, 07 Aug 2014 15:36:39 -0400 Message-Id: Subject: control message for bug 18175 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.7 (-----) tag 18175 - wontfix From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 21 05:58:09 2014 Received: (at 18175) by debbugs.gnu.org; 21 Nov 2014 10:58:09 +0000 Received: from localhost ([127.0.0.1]:40338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xrluj-0005GL-I1 for submit@debbugs.gnu.org; Fri, 21 Nov 2014 05:58:09 -0500 Received: from fely.am-1.org ([78.47.74.50]:41706) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xrlug-0005Fn-20; Fri, 21 Nov 2014 05:58:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:Cc:To:From; bh=04uopeS3Szp2mojjkXXoDzqMD+jh4JSyCWnQuBu4P58=; b=F+MSs29e6EJEicHzxnr2sbxRUmHpy+vdO+sHS6RUZZZA3LFihsf8RAYS12XZ3owDqNzqQmjcZ51aBgy6dANCBgVAx9/Ml3/KASjflg9+jmSApxk6CK3i07JORIlxd+E5lZCXsfvcUnrDecS7MuF11YxuYwzdEG/KpNkp0Ol90Zs=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Xrlua-0008Jc-P7; Fri, 21 Nov 2014 10:58:01 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XrluT-0006gH-Km; Fri, 21 Nov 2014 17:57:53 +0700 From: Ivan Shmakov To: Stefan Monnier Subject: (ping) Emacs bugs with patches? Date: Fri, 21 Nov 2014 10:57:53 +0000 Message-ID: <874mtszuq6.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18175 Cc: 18824@debbugs.gnu.org, 18850@debbugs.gnu.org, 18246@debbugs.gnu.org, 18175@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Stefan, you=E2=80=99ve previously commented on several of the bug reports I=E2=80=99ve suggested patches for. Could you please revisit these patches and either commit or explicitly reject them? (Any suggestion on how, if at all, do I improve them in the latter case will be appreciated.) The bug reports in question are as follows. TIA. http://debbugs.gnu.org/18175 Use (mapc 'switch-to-buffer =E2=80=A6) in files.el (was: mapcar.) http://debbugs.gnu.org/18246 Use inhibit-point-motion-hooks (in addition to inhibit-read-only) in enriched-encode. http://debbugs.gnu.org/18824 New diff-check-labels function (split off diff-no-select) http://debbugs.gnu.org/18850 Use diff-check-labels and the --label option to diff (was: -L =E2=80=93 deprecated) in smerge-mode.el --=20 FSF associate member #7257 np. =D0=9F=D0=BE =D0=BF=D0=BE=D0=BB=D1=8F=D0=BC= , =D0=B7=D0=B0 =D1=80=D0=B5=D0=BA=D0=BE=D0=B9 =E2=80=94 =D0=98=D0=BB=D0=BB= =D0=B5=D1=82 =E2=80=A6 B6A0 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 26 12:50:57 2014 Received: (at control) by debbugs.gnu.org; 26 Dec 2014 17:50:57 +0000 Received: from localhost ([127.0.0.1]:58376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4Z2P-00089p-BU for submit@debbugs.gnu.org; Fri, 26 Dec 2014 12:50:57 -0500 Received: from fely.am-1.org ([78.47.74.50]:46291) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4Z2K-00089c-15 for control@debbugs.gnu.org; Fri, 26 Dec 2014 12:50:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Sender:Subject:To:From; bh=LEYPoAO/uId0VyBzc7mdyosrk0mCOzG5ptSV7H8ZCUU=; b=E8vT9aoGHk4M89BYYdPeRmFwFy2K5bkuapCW7ZNsOQ0u2IgfBMvlX9Y0jotOR+IyePDalJgco3ZjrlCuVBfL0WNIOKQXvy1iCOk0h/m5gSKankw9itUF3vcfwiv1m3e0wCVHWTi7Y9AgysKVZPoiVtS2DESXWcoGy6AXd5Azb9E=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Y4Z2J-0006hi-9f for control@debbugs.gnu.org; Fri, 26 Dec 2014 17:50:51 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Y4Z2C-0004ib-4S for control@debbugs.gnu.org; Sat, 27 Dec 2014 00:50:44 +0700 From: Ivan Shmakov To: control@debbugs.gnu.org Subject: tweaking bugs Mail-Followup-To: emacs-devel@gnu.org Date: Fri, 26 Dec 2014 17:50:43 +0000 Message-ID: <877fxefggc.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) reopen 19152 tags 19445 + patch tags 19444 + patch tags 18246 + patch tags 18175 + patch thanks In news:jwvfvcykvep.fsf-monnier+emacsbugs@gnu.org, Stefan has confirmed that #19152 is not yet resolved. --=20 FSF associate member #7257 http://boycottsystemd.org/ =E2=80=A6 3013 B6A0= 230E 334A From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 23 10:27:36 2015 Received: (at 18175-done) by debbugs.gnu.org; 23 Jan 2015 15:27:36 +0000 Received: from localhost ([127.0.0.1]:54438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEg91-0003c8-Lx for submit@debbugs.gnu.org; Fri, 23 Jan 2015 10:27:36 -0500 Received: from fely.am-1.org ([78.47.74.50]:50669) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YEg8x-0003bv-OX for 18175-done@debbugs.gnu.org; Fri, 23 Jan 2015 10:27:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=siamics.net; s=a2013295; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:Sender:References:Subject:To:From; bh=bS8o/BoT72tldfuG5c6CZH/HLTghGKfHPenx4zdrjxE=; b=apKTVvXNd67cRR6h5xmz0csCqF2MZCDH1i77vnlKk1rugiNOjX6YcoSbPEZPe7yZDa6HLQiNLjHQEYdaBZr7IvWRye+rX/R7VXsqAy5p48nTTdjeWNWERPgW1Cq6birxlket3FcKZ73Ruw4BIemqBstDoI6WOKGTAVgz9mJtsyk=; Received: from [2a02:2560:6d4:26ca::1:1d] (helo=violet.siamics.net) by fely.am-1.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YEg8u-0002ce-9l for 18175-done@debbugs.gnu.org; Fri, 23 Jan 2015 15:27:28 +0000 Received: from localhost ([::1] helo=violet.siamics.net) by violet.siamics.net with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1YEg8m-0002oX-D8 for 18175-done@debbugs.gnu.org; Fri, 23 Jan 2015 22:27:20 +0700 From: Ivan Shmakov To: 18175-done@debbugs.gnu.org Subject: Re: bug#18175: files.el: use mapc in (mapcar 'switch-to-buffer ...) References: <87r40yftes.fsf@violet.siamics.net> <87ha1ot8kp.fsf@violet.siamics.net> Mail-Followup-To: 18175@debbugs.gnu.org Date: Fri, 23 Jan 2015 15:27:19 +0000 In-Reply-To: (Stefan Monnier's message of "Thu, 07 Aug 2014 15:29:03 -0400") Message-ID: <87a919o6ug.fsf@violet.siamics.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 18175-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Version: 25.1 >>>>> Stefan Monnier writes: [=E2=80=A6] >> However, I believe that the last two hunks of the one another >> variant of the diff (MIMEd) actually make the intent to return the >> reverse of the list returned by find-file-noselect /clearer,/ =E2=80=93 >> although at the expense of adding one extra LoC in each case. > Agreed, and neither relies on the return value of `mapc', so those > two hunks are indeed good. Please install them. Done; closing. commit 3e824b05af3a75768a61001fad68e2340af810eb CommitDate: 2015-01-17 19:33:08 +0000 Avoid mapcar in two cases in files.el. =20=20=20=20 * lisp/files.el (find-file-other-window, find-file-other-frame): Use mapc instead of mapcar. =20=20=20=20 Fixes: debbugs:18175 --=20 FSF associate member #7257 np. Chemical Wedding =E2=80=93 Bruce Dickinson = 230E 334A From unknown Sat Aug 16 16:08:39 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 21 Feb 2015 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator