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: Thu, 20 May 2010 22:35:44 -0400 Message-ID: <94F28B33-A04E-4511-B93D-E5471EE4D0DE@gmail.com> References: <45790724-63FC-4B80-A70D-8CD49A92FEE3@gmail.com> <8339xmqob9.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 1274409362 22729 80.91.229.12 (21 May 2010 02:36:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 21 May 2010 02:36:02 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 21 04:36:00 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 1OFI5g-0007i5-Cz for ged-emacs-devel@m.gmane.org; Fri, 21 May 2010 04:36:00 +0200 Original-Received: from localhost ([127.0.0.1]:54169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFI5f-0001Y9-60 for ged-emacs-devel@m.gmane.org; Thu, 20 May 2010 22:35:59 -0400 Original-Received: from [140.186.70.92] (port=59927 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFI5Z-0001Y4-6W for emacs-devel@gnu.org; Thu, 20 May 2010 22:35:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFI5X-00089i-VH for emacs-devel@gnu.org; Thu, 20 May 2010 22:35:52 -0400 Original-Received: from mail-qy0-f191.google.com ([209.85.221.191]:63727) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFI5V-00088t-5x; Thu, 20 May 2010 22:35:49 -0400 Original-Received: by qyk29 with SMTP id 29so25262qyk.14 for ; Thu, 20 May 2010 19:35:48 -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=icvvS5G52OifHxHofrGBx/mJuOnCXDdq6cNnm1LYYHA=; b=UuUXK9CMkKzvCHC1uUSzYTZcz4WMY+MJu2FxyY7cbIs/9vg8EAiUjy6+wUGgNsf5dE ZRj+OkCB+CbdZ5JCD+0EmKHXnnl247KunGrcB4J6q4B2yp/ehDeqshJQV9RMr/WmzEF1 rc38SCgGQBBh/gr0V+u6Ek1cmuPUfAz+nQTrg= 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=cz2c6cWMd9s8kilO+Cprd3WVMlc2gF+ZzW9acNIuOuBP1QFpETpPygGHk4XjBBfyB/ oa6pMraJgBiOyEbjSyPmszlartjt39sqW0+xfBbLE56lq0ugjDRA8SnL6S8fhSxcezcE Pnred7npZzBUJwNvRwuBXO4cu0QL5tq2TczTs= Original-Received: by 10.224.110.202 with SMTP id o10mr726521qap.58.1274409348206; Thu, 20 May 2010 19:35:48 -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 20sm323471qyk.12.2010.05.20.19.35.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 20 May 2010 19:35:47 -0700 (PDT) In-Reply-To: <8339xmqob9.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:124975 Archived-At: On May 20, 2010, at 5:02 PM, Eli Zaretskii wrote: >>=20 >> + (cons (progn (vertical-motion 0) (point)) >> + (progn (vertical-motion 1) (point))))) >=20 > This will do The Wrong Thing with bidirectional text, because > vertical-motion puts you on column zero, which is not necessarily the > first character after a newline, in buffer's order of increasing > character positions (a.k.a. "logical order"). The net effect will be > that only part of the screen line will be highlighted. >=20 > I just yesterday fixed a similar problem in move-end-of-line (see > revno 100369). You need to proactively get to the line's first > character, with either skip-chars-backward or (per Stefan's > suggestion) `(forward-line 0)'. These two seem applicable to buffer lines; I'm not sure how I would do = it with word-wrap without `vertical-motion'. Should I just use `beginning-of-visual-line' and `end-of-visual-line'? On another note, I first thought of just implementing hl-line in the = redisplay code, or perhaps as an option to the cursor display. When the = cursor is drawn, we just highlight the line. No moving around overlays = in Lisp...=