From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Hl-line and visual-line Date: Sun, 23 May 2010 23:33:02 +0300 Message-ID: <83ljbanytd.fsf@gnu.org> 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> <47101594-5A7C-4FF1-8C58-C77AF33F35F2@gmai0l.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1274646796 11176 80.91.229.12 (23 May 2010 20:33:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 23 May 2010 20:33:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 23 22:33:15 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 1OGHrG-0005ZO-Rp for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 22:33:15 +0200 Original-Received: from localhost ([127.0.0.1]:54173 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGHrG-0004OO-5H for ged-emacs-devel@m.gmane.org; Sun, 23 May 2010 16:33:14 -0400 Original-Received: from [140.186.70.92] (port=39365 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGHrA-0004KL-1g for emacs-devel@gnu.org; Sun, 23 May 2010 16:33:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGHr8-0007FU-GB for emacs-devel@gnu.org; Sun, 23 May 2010 16:33:07 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:60701) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGHr8-0007FK-84 for emacs-devel@gnu.org; Sun, 23 May 2010 16:33:06 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0L2W000003NV0C00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Sun, 23 May 2010 23:33:04 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.45.48]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L2W00KSA3R0B880@a-mtaout21.012.net.il>; Sun, 23 May 2010 23:33:01 +0300 (IDT) In-reply-to: <47101594-5A7C-4FF1-8C58-C77AF33F35F2@gmail.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) 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:125150 Archived-At: > From: David Reitter > Date: Sun, 23 May 2010 15:13:42 -0400 > Cc: tassilo@member.fsf.org, > emacs-devel@gnu.org > > 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 already works today, so no change seems to be needed to cover this. > C-k (kill-visual-line) would probably need to be rewritten anyway. Why? it seems to work already, killing the visual line. Am I missing something? > 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. Sorry, I don't get this part. Can you give an example that uses kill-region and another one with one overlay for hl-line-mode, and explain how the list of the form you mention would help? > 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? Both the region and kill commands work in logical order. So after C-w, you will see ab JIHG xyz I don't think we should have discontinuous regions. Their semantics is not clear (there's more than one way of interpreting them), and no bidi-aware application I've seen supports them. Users expect logical-order regions. Logical-order regions may surprise the first time you see it, but are easy to get used to, since that's the order you read the text you mark. > (NB You're throwing some of the most basic assumptions away. This could get interesting.) Yes, I'm in this "interesting" stuff for several months now.