From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: asjo@koldfront.dk (Adam =?iso-8859-1?Q?Sj=F8gren?=) Newsgroups: gmane.emacs.help Subject: Re: Narrow cursor at end of line? Date: Sat, 09 Jan 2010 22:04:32 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87ocl3t2fz.fsf@topper.koldfront.dk> References: <87eilzvygz.fsf@topper.koldfront.dk> <871vhzqb39.fsf@hubble.informatimago.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1263105963 26299 80.91.229.12 (10 Jan 2010 06:46:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jan 2010 06:46:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 10 07:45:56 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NTrYh-0005LO-CB for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Jan 2010 07:45:55 +0100 Original-Received: from localhost ([127.0.0.1]:33263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTrYi-00056z-17 for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Jan 2010 01:45:56 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!newsfeed.esat.net!zen.net.uk!dedekind.zen.co.uk!nuzba.szn.dk!news.koldfront.dk!pnx.dk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: topper.koldfront.dk Original-X-Trace: virgil.koldfront.dk 1263071071 6799 192.168.1.160 (9 Jan 2010 21:04:31 GMT) Original-X-Complaints-To: abuse@koldfront.dk Original-NNTP-Posting-Date: Sat, 9 Jan 2010 21:04:31 +0000 (UTC) X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71145 Archived-At: On Sat, 09 Jan 2010 21:26:02 +0100, Pascal wrote: > asjo@koldfront.dk (Adam Sjøgren) writes: >> XEmacs indicates that point is at the end of a line by making the cursor >> slightly less wide. How do I make GNU Emacs do the same? > I guess you could change the cursor-type when it's at the end of line. > See the variable: cursor-type Ah, nice - thanks for the pointer. I guess what I want to do is to have cursor-type set to (bar . 6) at the end of the line and t otherwise. Perhaps something like: (defun asjo-indicate-end-of-line () "Change the cursor to a narrow one when at the end of line" (if (eq (point) (line-end-position)) (setq cursor-type '(bar . 6)) (setq cursor-type t))) I would need a hook called every time point is moved (or any time it is moved to/from end of line) or add an advice to something, I guess? I have looked though the list found with M-x apropos hook, but couldn't really a good candidate... Best regards, Adam -- "I'm a driver, I'm a winner, things are gonna change, Adam Sjøgren I can feel it." asjo@koldfront.dk