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

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

Re: Vertical line separating the fringe and the buffer


From: Emanuel Berg
Subject: Re: Vertical line separating the fringe and the buffer
Date: Thu, 11 Sep 2014 22:56:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

user3341592 <address@hidden> writes:

> Is there a way to get a 1-px vertical line *between*
> the 8-px fringe and the buffer itself, such as in
> many other editors?

You can try with:

(set-window-margins (selected-window) 1)

Increase the digit (the "1") to get a wider left-side
margin.

Problem is, I don't know how to make that hold for all
windows, always.

It could be put in the
window-configuration-change-hook - but that wouldn't
always do it (e.g., a help window on `describe-variable')
- but for most cases it would work, something like:

(defun silly-window-update ()
  (interactive)
  (set-window-margins (car (get-buffer-window-list)) 1) )

(setq window-configuration-change-hook '(silly-window-update))

If you find a better way, do tell!

> This has first been posted onto StackOverflow

It is OK to post on both places. Even if you get an
answer on SO, you might get an even better one here...

By the way, in the help for set-window-margins it says

    WINDOW must be a live window and defaults to the
    selected one.

but the interface is (set-window-margins WINDOW
LEFT-WIDTH &optional RIGHT-WIDTH) - so how can WINDOW
"default" to anything, since it isn't optional? Answer:
if you use nil, you get the selected window. Question:
is this anything we are expected to know (as a rule) or
should it be spelled out? Opinion: it should be spelled
out.

-- 
underground experts united


reply via email to

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