unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Kaushal Modi <kaushal.modi@gmail.com>
Cc: code.falling@gmail.com, Emacs developers <emacs-devel@gnu.org>
Subject: Re: Patch to highlight current line number [nlinum.el]
Date: Tue, 19 Jul 2016 08:28:39 -0400	[thread overview]
Message-ID: <jwvk2ghhl4i.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAFyQvY3QZWmM=yaCNURHXo9sfxFHKdGjnon0uRzvnqDJpBq6Eg@mail.gmail.com> (Kaushal Modi's message of "Tue, 19 Jul 2016 05:00:03 +0000")

> I need the line-diff to get the line begin/end positions for the last-line.

Exactly: if you have a marker showing you where is that "last-line", you
don't need the line-diff.  If you really want the beg/end of that line,
you `goto-char' to that marker and then use line-beginning-position and
line-end-position from there with no argument.

>> (progn
>>   (forward-line -2)
>>   (insert "a\nb\n")
>>   (forward-line -4))
> That case worked fine too.

Hmm... I wonder how, but in any case, that's good.

> One reason was that it looked like the nlinum group was anyways
> autogenerated when gloabl-nlinum-mode was created. It just wasn't formally
> defined. So it was missing the description. On evaluating "(customize-group
> 'nlinum)", it gave:

Oh, the gloabl-nlinum-mode was missing a ":group 'linum" argument!

> ===== patch follows

Please install it, and thank you very much.


        Stefan



  reply	other threads:[~2016-07-19 12:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 17:10 Patch to highlight current line number [nlinum.el] Kaushal Modi
2016-07-16  2:15 ` Stefan Monnier
2016-07-18  4:31   ` Kaushal Modi
2016-07-18 13:40     ` Stefan Monnier
2016-07-18 15:28       ` Kaushal Modi
2016-07-18 17:09         ` Stefan Monnier
2016-07-18 22:05           ` Kaushal Modi
2016-07-18 22:55             ` Kaushal Modi
2016-07-19  0:32             ` Stefan Monnier
2016-07-19  5:00               ` Kaushal Modi
2016-07-19 12:28                 ` Stefan Monnier [this message]
2016-07-19 12:40                   ` Kaushal Modi
2016-07-20 19:30                     ` Stefan Monnier
2016-07-20 19:38                       ` Kaushal Modi
2016-07-20 20:28                         ` Stefan Monnier
2016-07-20 20:31                           ` Kaushal Modi

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=jwvk2ghhl4i.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=code.falling@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=kaushal.modi@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).