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: Mon, 24 May 2010 21:16:13 +0300 Message-ID: <83fx1hnp1u.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> <83ljbanytd.fsf@gnu.org> <4D3EC595-2FF1-42BC-8DB3-26F3A91501D4@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1274725087 29315 80.91.229.12 (24 May 2010 18:18:07 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 May 2010 18:18:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 24 20:18:06 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 1OGcDz-0003RD-R9 for ged-emacs-devel@m.gmane.org; Mon, 24 May 2010 20:18:04 +0200 Original-Received: from localhost ([127.0.0.1]:49167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGcDB-0000dK-B6 for ged-emacs-devel@m.gmane.org; Mon, 24 May 2010 14:17:13 -0400 Original-Received: from [140.186.70.92] (port=36374 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGcCs-0000Z5-NH for emacs-devel@gnu.org; Mon, 24 May 2010 14:17:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGcCm-0007Xg-3B for emacs-devel@gnu.org; Mon, 24 May 2010 14:16:54 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:35366) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGcCl-0007XG-Jp for emacs-devel@gnu.org; Mon, 24 May 2010 14:16:47 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L2X00500S15EY00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 24 May 2010 21:16:11 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.221.110]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L2X004ITS2YTE20@a-mtaout20.012.net.il>; Mon, 24 May 2010 21:16:11 +0300 (IDT) In-reply-to: <4D3EC595-2FF1-42BC-8DB3-26F3A91501D4@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:125201 Archived-At: > From: David Reitter > Date: Sun, 23 May 2010 19:04:02 -0400 > Cc: emacs-devel@gnu.org > > On May 23, 2010, at 4:33 PM, Eli Zaretskii wrote: > > > >> 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? > > Back to your example, buffer text is "abcde ABCDE FGHIJ xyz", displayed with word-wrap as > > 0) abcde JIHGF > 1) EDCBA xyz > > Say, point is in line 0, at "c". Deleting the visual line should delete line 0, which is two portions of text: "abcde" and "FGHIJ". > My reference to C-k assumed visual-line-mode semantics, as well, so C-k would delete "de" and "FGHIJ". Right. So the main issue here is not where to move point, but rather how to generate the list of the regions needed for doing something with the entire visual line. IOW, we need to introduce a new subroutine (that would produce such a list), not change beginning/end-of-visual-line. Do you agree?