all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg via General discussion about ERC <emacs-erc@gnu.org>
To: emacs-erc@gnu.org
Cc: help-gnu-emacs@gnu.org
Subject: Re: ERC top/bottom 2*blank lines
Date: Wed, 23 Dec 2020 02:05:41 +0100	[thread overview]
Message-ID: <87pn31baca.fsf@zoho.eu> (raw)
In-Reply-To: 87lfdpybl6.fsf@zoho.eu

> (defun erc-scroll-to-top () [...]
> (defun erc-scroll-to-bottom () [...]
>
> https://dataswamp.org/~incal/emacs-init/erc-my.el

Oh, there is already a `erc-scroll-to-bottom'.

(defun erc-scroll-to-top-no-blanks ()
  (interactive)
  (goto-char (point-min))
  (when (and (looking-at "^$")
             (re-search-forward "[[:graph:]]" (point-max) t) )
    (beginning-of-line)
    (recenter 0) ))

(defun erc-scroll-to-bottom-no-blanks ()
  (interactive)
  (goto-char (point-max))
  (when (and (looking-at "^$")
             (re-search-backward "[[:graph:]]" (point-min) t) )
    (beginning-of-line)
    (recenter -1) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




      reply	other threads:[~2020-12-23  1:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87wnxa1mxu.fsf@zoho.eu>
     [not found] ` <87k0ta1ean.fsf@zoho.eu>
2020-12-22 17:50   ` ERC top/bottom 2*blank lines Emanuel Berg via General discussion about ERC
2020-12-23  1:05     ` Emanuel Berg via General discussion about ERC [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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pn31baca.fsf@zoho.eu \
    --to=emacs-erc@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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 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.