* Help me with adding emacs features.
@ 2008-11-10 8:32 Alexander M
2008-11-10 14:45 ` Juanma Barranquero
0 siblings, 1 reply; 3+ messages in thread
From: Alexander M @ 2008-11-10 8:32 UTC (permalink / raw)
To: help-gnu-emacs
Hello
I'm writing to ask if anyone could help me create a few functions for emacs.
The first function I would like to implement in emacs is that it should
display some kind of marker on every n:th line.
This functions purpose is to help me remember where page-breaks would
occur when printing.
The second function I would like to have is a sort of vertical marker at
the n:th column to show me where line-breaks would occur when printing.
I guess these functions could be created with a bit of emacs lisp,
unfortunately I don't know emacs lisp so if anyone would help me it
would be much appreciated.
Best Regards
Alexander M
P.S. If anyone know of any good forum for this kind of discussion,
please notify me.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help me with adding emacs features.
2008-11-10 8:32 Help me with adding emacs features Alexander M
@ 2008-11-10 14:45 ` Juanma Barranquero
2008-11-10 14:53 ` Juanma Barranquero
0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2008-11-10 14:45 UTC (permalink / raw)
To: Alexander M; +Cc: help-gnu-emacs
On Mon, Nov 10, 2008 at 09:32, Alexander M <alex334599@gmail.com> wrote:
> The first function I would like to implement in emacs is that it should
> display some kind of marker on every n:th line.
> This functions purpose is to help me remember where page-breaks would
> occur when printing.
You can use linum.el to add line numbers, and by customizing
linum-before-numbering-hook and linum-format you can make it to show
certain lines in a different way. If you've got Emacs from the CVS
repository, you already have linum.el; otherwise, check
http://stud4.tuwien.ac.at/~e0225855/linum/linum.html
> The second function I would like to have is a sort of vertical marker at
> the n:th column to show me where line-breaks would occur when printing.
There are several libraries which can help you do that
(colum-marker.el, col-highlight.el, vline.el, etc.). Take a look at
http://www.emacswiki.org/emacs/HighlightCurrentColumn
Juanma
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help me with adding emacs features.
2008-11-10 14:45 ` Juanma Barranquero
@ 2008-11-10 14:53 ` Juanma Barranquero
0 siblings, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2008-11-10 14:53 UTC (permalink / raw)
To: Alexander M; +Cc: help-gnu-emacs
On Mon, Nov 10, 2008 at 15:45, Juanma Barranquero <lekktu@gmail.com> wrote:
> You can use linum.el to add line numbers, and by customizing
> linum-before-numbering-hook and linum-format you can make it to show
> certain lines in a different way.
Just adding this to your .emacs is enough:
(defvar my-page-length 60)
(setq linum-format (lambda (n)
(if (zerop (mod n my-page-length))
"^L"
" ")))
(global-linum-mode 1)
or you can leave the last line out and use M-x linum-mode in the
buffers you're interested.
Juanma
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-10 14:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-10 8:32 Help me with adding emacs features Alexander M
2008-11-10 14:45 ` Juanma Barranquero
2008-11-10 14:53 ` Juanma Barranquero
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.