help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: visually mark off 80th column?


From: Brendan Miller
Subject: Fwd: visually mark off 80th column?
Date: Fri, 22 Jan 2010 13:33:54 -0800

Er, woops I forgot to cc the list.

---------- Forwarded message ----------
From: Brendan Miller <address@hidden>
Date: Fri, Jan 22, 2010 at 1:33 PM
Subject: Re: visually mark off 80th column?
To: Drew Adams <address@hidden>


M-: (column-marker-1 80)

*does* work, but for some reason just having:

(add-to-list 'load-path "~/emacs/")
(require 'column-marker)
(column-marker-1 80)

In my .emacs file does nothing! Very confusing. I'll post my whole
.emacs file at the end, just in case I'm doing something that
conflicts...

I also notice that when I type M-: (column-marker-1 80) it only
highlights the part of the column that have characters, which isn't
really what I want. Is there any way to make this highlight the whole
column?

This is my complete ~/.emacs file running on emacs 23:

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(column-number-mode t)
 '(initial-buffer-choice nil)
 '(scroll-bar-mode (quote right)))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
(setq inhibit-splash-screen t)
(add-to-list 'load-path "~/emacs/")
(require 'column-marker)
(column-marker-1 80)

;; tabbar
(require 'tabbar)
(tabbar-mode)
(global-set-key [(s-right)] 'tabbar-forward)
(global-set-key [(s-left)] 'tabbar-backward)

;; try to get clipboard working
; stops selection with a mouse being immediately injected to the kill ring
(setq mouse-drag-copy-region nil)
; stops killing/yanking interacting with primary X11 selection
(setq x-select-enable-primary nil)
; makes killing/yanking interact with clipboard X11 selection
(setq x-select-enable-clipboard t)


;; supposedly this part may be stopped by a bug...
;  active region sets primary X11 selection
(setq select-active-regions t)
; make mouse middle-click only paste from primary X11 selection, not
clipboard and kill ring.
(global-set-key [mouse-2] 'mouse-yank-primary)

On Fri, Jan 22, 2010 at 11:41 AM, Drew Adams <address@hidden> wrote:
>> On Thu, Jan 21, 2010 at 5:53 PM, Drew Adams wrote:
>> >> In my other editors I always turn on a little line that
>> >> delimits the 80th column. How do I do this in emacs?
>> >
>> > http://www.emacswiki.org/emacs/FindLongLines#ShowLongLines
>>
>> I installed ColumnMarker from here:
>> http://www.emacswiki.org/emacs/ColumnMarker
>> into ~/emacs and then put this in my emacs file to always highlight
>> the 80th column:
>>
>> (add-to-list 'load-path "~/emacs/")
>> (require 'column-marker)
>> (column-marker-1 80)
>>
>> However this does nothing.
>
> Hm. Works for me.
>
> Do you actually have lines longer than 80 chars? ;-)
> If not, try using (column-marker 30) as a test.
>
> What happens if you do this interactively (in a buffer with long lines)?
>
> M-: (column-marker-1 80)
>
>> If I m-x column-marker-1 it simply highlights the current line...
>
> That's the expected behavior.
>
> If it works for you interactively like that, there's no reason it shouldn't 
> also
> work for you in your .emacs.
>
> If it really doesn't work, try (a) loading column-marker.el (not *.elc), then
> (b) `M-x debug-on-entry column-marker-1', and step through the execution using
> `d', to see what happens.
>
>
> BTW, if you want the highlighting only for certain modes, then use the mode 
> hook
> functions to turn it on there:
>
> (add-hook 'foo-mode-hook
>          (lambda ()
>            (interactive)
>            (column-marker-1 80)))
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]