unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* with-no-display-updates?
@ 2022-05-13 22:14 Emanuel Berg
  2022-05-14 15:54 ` with-no-display-updates? Emanuel Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Emanuel Berg @ 2022-05-13 22:14 UTC (permalink / raw)
  To: help-gnu-emacs

This is about ERC but actual question general Elisp so
gmane.emacs.help and not gmane.emacs.erc.general.

When I connect a lot of ERC buffers flickers by.
Sometime I think, ah, done, and type a couple of words "we're
in! OK, listen up everyone" and then it switches to another
buffer etc. Annoying ... and worse - unstylish!

Do everything in the background then show onee buffer of your
choise! Like when you eat a burger at zero-time downtime, you
always say first if the toothpicks should be oak or
mahogny, right?

As you see, I tried with `inhibit-redisplay' but didn't work.

(re-search-forward "DNC")

?

;;; -*- lexical-binding: t -*-
;;
;; this file:
;;   https://dataswamp.org/~incal/emacs-init/erc/erc-connect.el

(require 'cl-lib)
(require 'erc)
(require 'erc-incal)
(require 'erc-kill)
(require 'erc-scroll)
(require 'string)

(defun erc-connect-to-server (&optional srv passwd)
  (interactive "sserver: \nspassword: ")
  (let ((inhibit-redisplay t)) ; DNC?
    (if (string-data-p srv)
        (if (string-data-p passwd)
            (erc-tls :server srv :passwd passwd)
          (erc-tls :server srv))
      (cl-loop for s in (erc-get-connect-servers) do
               (let ((server (car   s))
                     (pass   (cadr  s))
                     (conn   (caddr s)) )
                 (when conn
                   (if pass
                       (erc-tls :server server :password pass)
                     (erc-tls :server server) )))))))

(defun erc-goto-irc (&optional connect)
  (interactive "P")
  (let ((irc-buffer (car (erc-buffer-list))))
    (if (not irc-buffer)
      (if connect
          (erc-connect-to-server)
        (message "%s %s to connect"
         (substitute-command-keys "\\[universal-argument]")
         (substitute-command-keys (format "\\[%s]" this-command)) ))
      (switch-to-erc-buffer irc-buffer) )))

(provide 'erc-connect)

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: with-no-display-updates?
  2022-05-13 22:14 with-no-display-updates? Emanuel Berg
@ 2022-05-14 15:54 ` Emanuel Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Emanuel Berg @ 2022-05-14 15:54 UTC (permalink / raw)
  To: help-gnu-emacs

> As you see, I tried with `inhibit-redisplay' but
> didn't work.

Really, no one knows?

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-14 15:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-13 22:14 with-no-display-updates? Emanuel Berg
2022-05-14 15:54 ` with-no-display-updates? Emanuel Berg

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