From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master b88e7c8: Make transpose-regions interactive (Bug#30343) Date: Fri, 16 Mar 2018 10:23:31 -0500 Message-ID: <87po44jb7w.fsf@red-bean.com> References: <20180311105533.30002.78782@vcs0.savannah.gnu.org> <20180311105534.3DAFD23CF3@vcs0.savannah.gnu.org> <83woyiscns.fsf@gnu.org> Reply-To: Karl Fogel NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1521213704 12441 195.159.176.226 (16 Mar 2018 15:21:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Mar 2018 15:21:44 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Richard Copley , charles@aurox.ch To: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 16 16:21:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ewrAo-00037G-Ph for ged-emacs-devel@m.gmane.org; Fri, 16 Mar 2018 16:21:38 +0100 Original-Received: from localhost ([::1]:58088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewrCq-0007op-Br for ged-emacs-devel@m.gmane.org; Fri, 16 Mar 2018 11:23:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewrCg-0007ne-3e for emacs-devel@gnu.org; Fri, 16 Mar 2018 11:23:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewrCb-0006eX-54 for emacs-devel@gnu.org; Fri, 16 Mar 2018 11:23:34 -0400 Original-Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:34058) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ewrCa-0006eE-VK for emacs-devel@gnu.org; Fri, 16 Mar 2018 11:23:29 -0400 Original-Received: by mail-io0-x22b.google.com with SMTP id e7so13096052ioj.1 for ; Fri, 16 Mar 2018 08:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:reply-to:date:in-reply-to :message-id:user-agent:mime-version; bh=QPeMWqokrPVBiqyT0HQDqEfHmgozu6O3G7Z0LwbLENA=; b=pyzTAtjp59zIxUhZhixKyRZ3U6S9y4mXA9qxS8Ku2VSJ3D4HpBCl2ayCMZF+8ZckuE FbTMB5XSciDlgxXQGOMqoxQT398KdBEDzUC4WdzU2RNZj93RA10bxMCIDAN3KzzlqHW+ JsUWNa3mEU4deBKGMIMJy2eUFi73lAbIrgM9I7JxAFlm5R4GmgW3ygcbZi4jNSgjlF1a K+fX5OFP7G3UHVEIF46p+EkQqwKRKo+eTTKdfCXmn1ptYXABxTYpifrZeTtrVYuTGOv6 1kwoZJIqp7kLYsDncTSuDvspRb1ebrKjwuo9YLomByddVBEAEUVANORdU001UO5hfLdp etTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:reply-to :date:in-reply-to:message-id:user-agent:mime-version; bh=QPeMWqokrPVBiqyT0HQDqEfHmgozu6O3G7Z0LwbLENA=; b=ISS5qDh9n/8FX5q8aEJ6iPnhXwpdpyLasJcN6lUgSx6Jdpf1rV2sUFc+iGbR8VGHmV oeqQgaiuG/WaWPWZQ0EmdA5hYPMnGYpEepMaVPKi9Tu5ZH50z+0KOcHVTGbQ63F6oduI z3XBxEjUK9GusaY5Eo+foVLft+PT2DSWaIf3wRc+Q4ibx3+laPtJj61I6rtBv4KVTX98 a3sTwk1gaKag1NO5AxF7tmYhjznpZrKR/DLzRlYixA1z4tlI2fZdoZ4hwkdXdm7fxB3S VPXOZX4r9s9frEckyZ/uyGfp8Z7ycmDGz6zKODcKLJ1xGZ7UVw967u19vnUYGwbhFUzx Wmag== X-Gm-Message-State: AElRT7GQzR9jS6V1FKxEJkzqN+USKi03LQF0R0FA1Ew529fX6cWh3udk R3SbPFhv43suv/dBbVXsH+Q= X-Google-Smtp-Source: AG47ELsWk+FGQ9iTTNfLIEhgvRCQGhHK6vfoQ0bOmjBiAk0apQIK6hS8HJ1k2KXgl65gYpKqrEwQJA== X-Received: by 10.107.97.17 with SMTP id v17mr2244352iob.256.1521213808074; Fri, 16 Mar 2018 08:23:28 -0700 (PDT) Original-Received: from kwork (74-92-190-114-Illinois.hfc.comcastbusiness.net. [74.92.190.114]) by smtp.gmail.com with ESMTPSA id v98sm4857003ioi.48.2018.03.16.08.23.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Mar 2018 08:23:27 -0700 (PDT) In-Reply-To: (Richard Copley's message of "Thu, 15 Mar 2018 20:20:19 +0000") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223779 Archived-At: Richard Copley writes: >I agree with Eli, it seems fine to me, but I'm not sure what the >alternative is. If it's to move the body of the interactive spec into >a function in an elisp file, and replace the spec with a call to that >function, it seems overly complicated. (It also feel like a layering >violation, but that can only be true if there is a rule or guideline >saying so and I don't know of any.) One solution would be to rename the C-defined function to Ftranspose_regions_internal (with no interactive spec), and move the entry point `transpose-regions' out to Lisp with the same interactive spec. The Lisp function would just invoke `transpose-regions-internal'. I'd be happy to do this, if there's consensus that it's a good solution. (I wrote the original non-interactive Ftranspose_regions, so am perhaps motivated by nostalgia. Interestingly, while checking my memory to make sure, I discovered that although src/ChangeLog.4 has the correct record for 1994-04-29, in the git history that change is recorded as being authored by RMS -- commit b229b8d187a. This suggests that there was some information lossage in a VC-system conversion somewhere along the way. I don't know if we knew that already or not.) I looked for all other C-defined functions that have a Lisp expression starting with "(" for their interactive spec in the DEFUN, i.e., are not just using the standard code-letter strings for `interactive'. There appear to be a very small number of such functions: - Finsert_char - Ftranspose_regions - Frename_buffer - Fupcase_region - Fdowncase_region - Fdelete_file - Fset_file_modes Of these, Ftranspose_regions is certainly the most complex, with Fdelete_file and Frename_buffer as runners up. The others are relatively simple. Maybe it's fine to just rely on our collective aesthetic judgement to say that the one in Ftranspose_regions is too complex to be tolerated, while the others are okay. Best regards, -Karl