From: mus5mk2ly001@sneakemail.com (Lee)
Subject: Re: Can header-line track a row in my file?
Date: 28 Oct 2002 12:11:27 -0800 [thread overview]
Message-ID: <a1385921.0210281211.32bb6b26@posting.google.com> (raw)
In-Reply-To: a1385921.0210270613.685c79aa@posting.google.com
And at last, here is the final version (I hope). I found that having
tabs would sometimes offset the header and I have also unhardcoded the
line number. You can just put the cursor on the line you want
displayed in the header and then do M-x my-set-header-line-format:
(defun my-set-header-line-format ()
(interactive)
(set (make-local-variable 'my-line-number)
(save-restriction
(widen)
(save-excursion
(beginning-of-line)
(1+ (count-lines 1 (point))))))
(set (make-local-variable 'header-line-format)
'(" " (:eval
(save-excursion
(goto-line my-line-number)
(move-to-column (window-hscroll))
(untabify (point) (line-end-position))
(buffer-substring (point) (line-end-position)))))))
Lee
prev parent reply other threads:[~2002-10-28 20:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-25 19:44 Can header-line track a row in my file? Lee
2002-10-25 21:04 ` Stefan Monnier <foo@acm.com>
2002-10-27 14:13 ` Lee
2002-10-28 20:11 ` Lee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a1385921.0210281211.32bb6b26@posting.google.com \
--to=mus5mk2ly001@sneakemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).