From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.devel Subject: Re: Hl-line and visual-line Date: Sun, 23 May 2010 15:13:42 -0400 Message-ID: <47101594-5A7C-4FF1-8C58-C77AF33F35F2@gmail.com> References: <45790724-63FC-4B80-A70D-8CD49A92FEE3@gmail.com> <8339xmqob9.fsf@gnu.org> <94F28B33-A04E-4511-B93D-E5471EE4D0DE@gmail.com> <201005210834.28589.tassilo@member.fsf.org> <83wruxpt2z.fsf@gnu.org> <83r5l2o7fx.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1274642038 28905 80.91.229.12 (23 May 2010 19:13:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 May 2010 19:13:58 +0000 (UTC) Cc: tassilo@member.fsf.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 23 21:13:56 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OGGcW-0002Xe-DO for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 21:13:56 +0200 Original-Received: from localhost ([127.0.0.1]:43450 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGGcV-00056C-Qr for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 15:13:55 -0400 Original-Received: from [140.186.70.92] (port=44023 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGGcP-000566-MG for emacs-devel@gnu.org; Sun, 23 May 2010 15:13:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGGcO-0008HL-Ja for emacs-devel@gnu.org; Sun, 23 May 2010 15:13:49 -0400 Original-Received: from mail-qy0-f187.google.com ([209.85.221.187]:49633) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGGcL-0008H3-OU; Sun, 23 May 2010 15:13:45 -0400 Original-Received: by qyk17 with SMTP id 17so3772748qyk.12 for ; Sun, 23 May 2010 12:13:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=GtSPvsLpHKn6KLM15SzocwfgRAzMIVqRIoxG+gzzZR0=; b=yGt3sxkjueGr40YYYvtxak3bYlj+0dTP2bI3Y2thBCGCgs+AO/+3gem9P2d/fXNyjI TLpe+wVRbjjOPLChq6J7wyNfE9Vh4xhD1OEhKXYXxtGDyCefC5oQf0Jm4Y+8Ubot8GdT M3jrRtwQ/feNvryDr7Kdli9rwPo0RLiJvnaSQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=JRMyHc22cMVYX0hCfo3mXsYNRjEb40N5SQZJ5e4dB1kCrPgn9hTUQ8DAD95m8IEzRr zhRmZOpxYdkVdFc40+Jp+7f4m6YPHFoIr+rEdJDADPFoEgqEWv9BbQZPvt9Vc9BlTjlV dTkhhMJkgpR/qVTX6TQAsn12wcgjke+6VL7fg= Original-Received: by 10.224.44.77 with SMTP id z13mr2596666qae.213.1274642024980; Sun, 23 May 2010 12:13:44 -0700 (PDT) Original-Received: from [192.168.1.17] (pool-96-235-7-98.pitbpa.east.verizon.net [96.235.7.98]) by mx.google.com with ESMTPS id 21sm2055767qyk.9.2010.05.23.12.13.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 23 May 2010 12:13:43 -0700 (PDT) In-Reply-To: <83r5l2o7fx.fsf@gnu.org> X-Mailer: Apple Mail (2.1078) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:125148 Archived-At: On May 23, 2010, at 1:26 PM, Eli Zaretskii wrote: > I have one request, though: could you (or someone else) please post > requirements for what these functions should do? That is, of course, > trivial with unidirectional text, but what about reordered text? >=20 > Let's say we have buffer text >=20 > abcde ABCDE FGHIJ xyz >=20 > which will be displayed under Visual Line mode as >=20 > abcde JIHGF > EDCBA xyz >=20 > Where should beginning/end-of-visual-line put point in each one of > these two screen lines? The first use case would be to jump to beginning and end of a visual = line. That means, if point is at any of {abcde JIHGF}, beginning would = be at "a" and the end at " " (between "E " and "F"). If point is at any of {ABCDE xyz}, then beginning would be at "E" and = end would be after "z". This would cover my use case and C-a, C-e. C-k (kill-visual-line) would probably need to be rewritten anyway. A quick grep through the Emacs and Aquamacs source codes does not reveal = uses in different contexts. The second use case would be to actually capture a whole line. I have = functions that kill the whole line (from left to right). They would = use `kill-region' from X to Y. The same goes for hl-line-mode, where = ONE overlay is drawn. So, these functions would need a new function such as = "regions-within-visual-line" or so, returning a list of (from . to) = regions, or some other means of identifying the region.=20 So far for two requirements. Are we going to have discontinuous regions? When I set the Mark at "c" = in your example, and point at "G", what is highlighted = (transient-mark-mode), and what is killed? I'm not quite sure what the general interface will be for other = functions in such situations, so I can't help further with that... (NB = You're throwing some of the most basic assumptions away. This could = get interesting.)