From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Tury Newsgroups: gmane.emacs.help Subject: Re: Mark current column Date: Wed, 02 Nov 2005 19:57:34 GMT Organization: Nokia Message-ID: References: <1129661993.706624.223700@f14g2000cwb.googlegroups.com> <19mkcmkplfhvc$.18vsz81vk3nj3.dlg@40tude.net> <1130951266.648730.290240@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1130961413 20572 80.91.229.2 (2 Nov 2005 19:56:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 2 Nov 2005 19:56:53 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 02 20:56:45 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EXOhg-0002RV-Jk for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Nov 2005 20:55:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EXOha-0004qA-SB for geh-help-gnu-emacs@m.gmane.org; Wed, 02 Nov 2005 14:55:19 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!canoe.uoregon.edu!newshub.sdsu.edu!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.bahnhof.se!195.197.54.117.MISMATCH!feeder1.news.jippii.net!nntp.inet.fi!inet.fi!newsfeed1.nokia.com!news1.nokia.com!news2.nokia.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: 40tude_Dialog/2.0.15.1 Original-Lines: 52 Original-NNTP-Posting-Host: 172.24.170.172 Original-X-Complaints-To: newsmaster@nokia.com Original-X-Trace: news2.nokia.com 1130961454 172.24.170.172 (Wed, 02 Nov 2005 21:57:34 EET) Original-NNTP-Posting-Date: Wed, 02 Nov 2005 21:57:34 EET Original-Xref: shelby.stanford.edu gnu.emacs.help:135173 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor 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:30764 Archived-At: On 2 Nov 2005 09:07:46 -0800, rgb wrote: >>>> Is it possible somehow easily (=using at most a few elisp lines in .emacs?) >>>> to highlight the current column (in all the (visible) lines of the current >>>> buffer) by a (custom)key sequence? >>> >>> This is a piece of a bigger package I've been putting together. >>> Maybe I'll get this part polished up and posted to the wiki >>> sometime later this week. >> >> Thanks! I can't see these things on your wiki, but I started to use your >> column-marker posted here. It makes almost exactly what I wanted. (Though I >> can't mark several lines at the same time (what would be good) > > The version on the wiki lets you define as many markers as you want. > For example: > > (require 'column-marker) > (column-marker-create-dynamic my-other-marker) > > The new marker is named my-other-marker and works the same as > column-marker-here. Finally I find it in the wiki ;-) Thanks for it! However, as I would like to learn elisp, I tried to understand it and compare to my original needs. It seemed to be a little cryptic for me (as I am a beginner in elisp), and I think it is not exactly what I imagined. So I tried to create another solution. Here it is (as in my .emacs): (defun vvb-toggle-curr-in-columns () "Toggles the current column inside vvb-columns." (interactive) (if (member (current-column) vvb-columns) (setq vvb-columns (remove (current-column) vvb-columns)) (setq vvb-columns (append vvb-columns (list (current-column)))))) (global-set-key [?\C-c ?l] 'vvb-toggle-curr-in-columns) And this is what I wanted. However, unfortunately, it needs vvb-mode :-( > >> + I can't >> see the marker in shorter lines, however it would also be good.) > > I think lots of people would like that, including me. > If you pad all the shorter lines with blanks it makes the marker > visible. Maybe not a great solution but sometimes its viable. Isn't it possible to highlight the "columns" somehow differently: not using background colors for existing chars, but ... ?? E.g. put a "layer" (as in some picture editor programs?) "onto" the original text, and highlight the positions in this "layer"...?