From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.bugs Subject: bug#13480: 24.3.50; `C-w' from Isearch should translate newlines to spaces Date: Sun, 20 Jan 2013 10:41:56 +0100 Message-ID: References: <87r4ljh54a.fsf@mail.jurta.org> <87wqva2lvg.fsf@mail.jurta.org> <87obgl5vuz.fsf@mail.jurta.org> <8738xx30eo.fsf@mail.jurta.org> <753FBC5FA6504FE187B65C5B59C262D1@us.oracle.com> <878v7okavd.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1358674931 16370 80.91.229.3 (20 Jan 2013 09:42:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Jan 2013 09:42:11 +0000 (UTC) Cc: 13480@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 20 10:42:29 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TwrQ2-0002ET-33 for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jan 2013 10:42:26 +0100 Original-Received: from localhost ([::1]:56937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwrPl-0003JQ-9O for geb-bug-gnu-emacs@m.gmane.org; Sun, 20 Jan 2013 04:42:09 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36413) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwrPi-0003JL-Ny for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2013 04:42:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwrPh-0000Qa-Gl for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2013 04:42:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwrPh-0000QV-D5 for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2013 04:42:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TwrQb-0002u6-Ve for bug-gnu-emacs@gnu.org; Sun, 20 Jan 2013 04:43:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dani Moncayo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Jan 2013 09:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13480 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13480-submit@debbugs.gnu.org id=B13480.135867497811153 (code B ref 13480); Sun, 20 Jan 2013 09:43:01 +0000 Original-Received: (at 13480) by debbugs.gnu.org; 20 Jan 2013 09:42:58 +0000 Original-Received: from localhost ([127.0.0.1]:41050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwrQY-0002tp-0c for submit@debbugs.gnu.org; Sun, 20 Jan 2013 04:42:58 -0500 Original-Received: from mail-lb0-f178.google.com ([209.85.217.178]:58130) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TwrQV-0002th-9N for 13480@debbugs.gnu.org; Sun, 20 Jan 2013 04:42:56 -0500 Original-Received: by mail-lb0-f178.google.com with SMTP id n1so1300237lba.37 for <13480@debbugs.gnu.org>; Sun, 20 Jan 2013 01:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=2kojG5+kc+2TxslpRuz4alCWqbZBk4UyocH5zr3MGCI=; b=BXWRF+CGsQ0zktGC/7HuPbzdWtOtwqL0RKDARFxNJI7A68mWk9Ee5jXIsRqX7UUlQV gMl5gLd57pWSo9fgkteDBrzYjnLeTBcQvEnXFA5Y7Giz6X/Uj53+5zqLiF+T806Cffq7 Tyo4earpm+TxuQtDOFsTYp+lKC+PsXj+N9duGqxL3HBn940FOnWjdGqzlio8vb50hLEl 3RFqV7jZQuGE0O04P11bABkOk3VhrLa+ftjcsAUaQlQksJBgfsSwC0iTGX4keOBWjSrA nMMAXQkQMHAmKFTHPWXKSMhALm2yNFlGd5vBKf1NOAyfax64SraE5mgSzG98oF5H3HEW HtTw== X-Received: by 10.152.112.36 with SMTP id in4mr13875194lab.35.1358674917081; Sun, 20 Jan 2013 01:41:57 -0800 (PST) Original-Received: by 10.114.92.68 with HTTP; Sun, 20 Jan 2013 01:41:56 -0800 (PST) In-Reply-To: <878v7okavd.fsf@mail.jurta.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:70083 Archived-At: >>>> So we could use `isearch-message' to display the translated >>>> search string but not to translate it in `isearch-string'. >>> Yes, +1. >> >> IIRC there's the same problem with case-sensitivity. > > Not downcasing the yanked string could help to fix bug#10118. Of course, because altering the original text supplied by the user is definitely a mistake. > According to the docstring of `search-upper-case', > if its value is `not-yanks', text yanked into the > search string is always downcased. > > So maybe a better default value for `search-upper-case' > would be `nil' instead of the current default `not-yanks'. I've just read the docstring of that variable, and I think its design is clearly misguided. The text in the search string that came from a yank should not be treated differently from the rest. I see no point in that approach. I would control the behavior of Isearch wrt case-sensitivity with a variable `isearch-case-sensitive' which the user could set to: 1. `auto' (the default): the search is case-sensitive only when the search string contains at least one uppercase character. 2. `nil': the search is case-insensitive. 3. (any other value): the search is case-sensitive. > If a tri-state option with three values t/nil/not-yanks > is a good customization UI then perhaps `isearch-lax-whitespace' > should provide the option `not-yanks' too, specifying whether > newlines should be translated to a single space in text yanked > into the search string. > > If the value `not-yanks' is a bad UI then search functions should > take care about translating the characters in the search string internally > depending on a new set of options specifying how search functions should > use the right case and whitespace. I don't think this is a question of good or bad UI, but of good or bad design. In summary, I see two mistake here: 1. Losing information. Example: downcasing the text in `C-s C-y' or `C-s C-w'. The text supplied by the user to search for should be kept untouched. Not doing so is asking for trouble. 2. Not interpreting correctly the search string. Example: the original post in this thread. If `isearch-lax-whitespace' is non-nil, `C-s fooXbar' should find every string `fooYbar' in the buffer, where X and Y are arbitrary strings that match `search-whitespace-regexp'. -- Dani Moncayo