From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: mark-sexp again Date: Mon, 8 Jun 2015 20:37:23 +0100 Message-ID: References: <556F07CA.1020001@online.de> <55740199.9000505@online.de> <5575A5A1.1010806@online.de> <5575E526.70902@online.de> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1433792260 13765 80.91.229.3 (8 Jun 2015 19:37:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Jun 2015 19:37:40 +0000 (UTC) Cc: emacs-devel To: =?UTF-8?Q?Andreas_R=C3=B6hler?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 08 21:37:39 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Z22rZ-0000rD-LY for ged-emacs-devel@m.gmane.org; Mon, 08 Jun 2015 21:37:37 +0200 Original-Received: from localhost ([::1]:59983 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z22rT-0004Gd-SR for ged-emacs-devel@m.gmane.org; Mon, 08 Jun 2015 15:37:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z22rP-0004EW-2p for emacs-devel@gnu.org; Mon, 08 Jun 2015 15:37:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z22rN-0008Uc-FG for emacs-devel@gnu.org; Mon, 08 Jun 2015 15:37:26 -0400 Original-Received: from mail-lb0-x22a.google.com ([2a00:1450:4010:c04::22a]:36160) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z22rN-0008U7-5n for emacs-devel@gnu.org; Mon, 08 Jun 2015 15:37:25 -0400 Original-Received: by lbbqq2 with SMTP id qq2so87219887lbb.3 for ; Mon, 08 Jun 2015 12:37:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:content-transfer-encoding; bh=A5KIQEcyyElLGGx+15E1HDAhwtV9EVutYGSVhmngNyo=; b=fOIXoleNOGmlIeFv9RyJAGdWUrXfrw60roG7l+n42ZvZRFEZsTtWKBuIg5cAHLiDLk b1e+D5OWSN3XKpbS9IUlKyf/bHO69VfxNvr1DrPGPuQV8+p1ruwu8nGJPX78SIlpf8di GH5Qfv+51YJa1PbORKRvffTGnxuKZ74WV6mI4Setvu1X3Vo7tH5gV/bcHRz4hWpR69ho SCuf/Ni0RBMvflG6SKbFgDiV8tZAMGtYqexQwdBojn2SeJLxee/l0Fx1c2vm2rnn4vg5 G3PvIQBWOtlrivLoiJh8xe3P2wPCluWyPw/1ge+8+skKzfxKcGZ9ixyYFJJ13TZnCSk8 xGXA== X-Received: by 10.112.210.137 with SMTP id mu9mr18248630lbc.95.1433792243527; Mon, 08 Jun 2015 12:37:23 -0700 (PDT) Original-Received: by 10.25.214.133 with HTTP; Mon, 8 Jun 2015 12:37:23 -0700 (PDT) In-Reply-To: <5575E526.70902@online.de> X-Google-Sender-Auth: PsuyV3_7F0_ATEynJEGcVXWMB6Q X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187110 Archived-At: 2015-06-08 19:55 GMT+01:00 Andreas R=C3=B6hler : > > Am 08.06.2015 um 18:09 schrieb Artur Malabarba: >> >> 2015-06-08 15:24 GMT+01:00 Andreas R=C3=B6hler : >>> >>> When inside a string, mark-sexp should mark the string. IMO doesn't mak= e >>> sense to consider the contents then. >>> >>> Example, cursor at beginning of docstring at "Just" >>> >>> (defun foo1 () >>> "Just foo") >>> >>> M-x mark-sexp RET marks word "Just", not the string. >>> >>> Respectivly forward-sexp should reach the end of string, if called >>> inside. >> >> That would make it redundant with `up-list'. > > > Don't think so: I didn't mean the two commands are completely identical. I meant that the action of moving out of a string while inside a string is already achieved by the `up-list' command (which is also generally useful but has no binding), so changing `forward-sexp' to do that as well would be redundant. Specially since you'd be removing `forward-sexp's ability to move inside a string, which is useful. > (list "asdfsdf adfsadf " "asdfsd asd asdf " "asdfasf asdfsad ") > > When started a "list", forward-sexp travels string by string, which is o= k > and also means, it recognises a string as sexp already. > > Accordingly from inside a string, it should go to the end first. You seem to think this would make forward-sexp more consistent, but it would make it less consistent. Currently, a pair of parentheses delineates a sexp in the same way that a pair of double quotes does. If you place point at the "a" on the following two examples, `forward-sexp' will do the exact same thing in both cases. That's consistent. (abc def) "abc def" If you want to move out of a string, just use the same command you would use on parentheses (`up-list'). If you want to mark a whole string while inside it, just use the same procedure you would use on parentheses (`backward-up-list' with `mark-sexp').