erc-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-discuss] trying to erc-fill-disable


From: Giorgos Keramidas
Subject: [Erc-discuss] trying to erc-fill-disable
Date: Sun, 02 Nov 2008 06:04:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix)

Hi all,

My ERC version is the one included in the CVS repository of Emacs,
checked out on Thu Oct 30 19:21:07 2008 +0000.

I have almost managed to configure ERC to autoload and configure itself
correctly by adding in my .emacs file:

    (add-to-list 'load-path "~/elisp")

    (eval-after-load "erc"
      '(require 'keramida-erc))

and then saving my ERC options at `keramida-erc.el'.  Attached to the
end of this message is a copy of that file.

But something is not right in my setup.  I tried both ways of disabling
erc-fill shown here:

    (require 'erc-fill)             ;Support for message filling
    (erc-fill-disable)              ;  but disable it by default.

    (require 'erc-fill)             ;Support for message filling
    (erc-fill-mode -1)              ;  but disable it by default.

but ERC still adds `erc-fill' to the `erc-insert-modify-hook' and
`erc-send-modify-hook' hooks.

Do you see anything obviously wrong with this setup?  How can I convince
ERC not to fill anything at all, and use the full frame width of Emacs?

The `keramida-erc.el' setup file contains the following options.  I have
only edited manually the `erc-nickserv-passwords' and `erc-notify-list'
to anonymize them a bit.

---8<--- cut here ---8<--- cut here ---8<--- cut here ---8<---

  ;;; keramida-erc.el --- My ERC configuration

  ;;; Commentary:
  ;;
  ;; This file is not part of GNU Emacs.  It sets up basic configuration
  ;; options that I find useful for ERC, one of the Emacs IRC clients.
  ;;
  ;; Copyright (C) 2002-2008, Giorgos Keramidas <address@hidden>
  ;; All rights reserved.
  ;;
  ;; Redistribution and use in source and binary forms, with or without
  ;; modification, are permitted provided that the following conditions
  ;; are met:
  ;; 1. Redistributions of source code must retain the above copyright
  ;;    notice, this list of conditions and the following disclaimer.
  ;; 2. Redistributions in binary form must reproduce the above copyright
  ;;    notice, this list of conditions and the following disclaimer in the
  ;;    documentation and/or other materials provided with the distribution.
  ;;
  ;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  ;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  ;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  ;; FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  ;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  ;; OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  ;; HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  ;; LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  ;; OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  ;; SUCH DAMAGE.

  ;;; Code:
  ;;
  ;; Startup file for the ERC Emacs IRC client.

  ;; The default prompt string compensates for timestamps on the left of
  ;; each line.
  (setq erc-prompt "      >")

  (require 'erc-goodies)                  ;Various neat ERC features
  (setq erc-beep-p nil)                   ;No beeping, please

  (require 'erc-lang)
  (setq erc-server-coding-system (cons 'utf-8-unix 'utf-8-unix))
  (add-to-list 'erc-encoding-coding-alist '("#emacs" . utf-8-unix))
  (add-to-list 'erc-encoding-coding-alist '("#demo-gr" . iso-8859-7))
  (add-to-list 'erc-encoding-coding-alist '("#linux" . utf-8-unix))

  (require 'erc-fill)                     ;Support for message filling
  (erc-fill-disable)                    ;  but disable it by default.

  (require 'erc-log)                      ;Enable IRC message logging
  (setq erc-log-channels-directory "/home/keramida/irclogs/erc")
  (setq erc-save-buffer-on-part t         ;Laptop friendly logging.
        erc-save-queries-on-quit t
        erc-log-write-after-send nil
        erc-log-write-after-insert nil)
  (erc-log-enable)

  (require 'erc-ring)                     ;Enable input history/ring
  (erc-ring-mode 1)

  (require 'erc-stamp)                    ;Enable message timestamping
  (setq erc-timestamp-format "%H:%M ")
  (setq erc-insert-timestamp-function 'erc-insert-timestamp-left)
  (setq erc-insert-away-timestamp-function 'erc-insert-timestamp-left)

  (require 'erc-pcomplete)                ;Enable nick-completion commands
  (erc-completion-mode 1)

  (require 'erc-services)                 ;Enable auto-identify
  (erc-services-mode 1)
  (setq erc-prompt-for-nickserv-password nil)     ;Try to auto-identify
  (setq erc-nickserv-identify-mode 'autodetect)   ;Try to auto-identify
  ;;
  ;; The `erc-nickserv-passwords' symbol points to an alist mapped by the
  ;; name of the current network:
  ;;
  ;;         ((NETWORK LIST) (NETWORK LIST))
  ;;
  ;; Each entry contains the NETWORK name, and a list of cons cells that
  ;; map (USER . PASS) pairs to the currently active nickname.  Be careful
  ;; when constructing the LIST, otherwise (USER . PASS) lookup will fail
  ;; and auto-identify will not work.
  ;;
  (setq erc-nickserv-passwords
        '((GRNET (("keramida" . "XXXXXXXX")))
          (freenode (("keramida" . "XXXXXXXX")))))
  ;;
  ;; The default `erc-nickserv-alist' does not have a proper pattern-set
  ;; for matching the IDENTIFY requests of NickServ on GRNET.  Add one
  ;; ourselves.  This has also been posted on the EmacsWiki, at:
  ;;
  ;;         http://www.emacswiki.org/cgi-bin/wiki/ErcNickserv
  ;;
  ;; where, hopefully, other users of GRNET and ERC can find it too.
  ;;
  (add-to-list 'erc-nickserv-alist
      '(GRNET                            ;Network name
        "address@hidden"        ;NickServ's address@hidden
        "This nickname is registered and protected" ; IDENTIFY request sent by 
NickServ
        "NickServ"                       ;Identify to
        "IDENTIFY"                       ;Identify keyword
        nil))                            ;Use current nick

  (require 'erc-spelling)                 ;Enable spell-checking of what I type

  (require 'erc-join)                   ;Automatically join `default' channels.
  (erc-autojoin-enable)
  (setq erc-autojoin-channels-alist nil)

  (require 'erc-notify)
  (erc-notify-enable)
  (setq erc-notify-list '("XXXX" "YYYY"))

  (require 'erc-track)                  ;Track channel buffers with activity.
  (erc-track-enable)

  (require 'erc-autoaway)
  (erc-autoaway-enable)

  ;;; Misc uncategorized options:

  (setq erc-server "localhost")           ;The default ERC server to use.
  (setq erc-auto-query t)                 ;Automatically /query users who MSG

  (setq erc-user-full-name "Giorgos Keramidas"
        erc-email-userid "keramida")

  (setq erc-user-mode "+i")               ;Initial IRC-user mode flags
  (setq erc-paranoid t)                   ;Show all incoming CTCP requests
  (setq erc-disable-ctcp-replies nil)     ;Reply to CTCP requests

  ;; Some defaults for /part and buffer killing.
  (setq erc-kill-queries-on-quit nil)
  (setq erc-kill-buffer-on-part nil)
  (setq erc-kill-server-buffer-on-quit nil)

  ;; Populate the server history on startup with some of the servers
  ;; I commonly use.
  (setq erc-server-history-list
        '("darkness.irc.gr" "efnet.xs4all.nl" ""irc.freenode.net"))

  ;; Send notices to the minibuffer, when the server window is invisible.
  (setq erc-minibuffer-notice t)

  ;;; Commands:
  ;;
  ;; Custom ERC command aliases.

  (defun erc-cmd-WII (nick &rest ignore)
    "`whois' command with extra info."
    (erc-send-command (mapconcat #'identity
                                 (list "WHOIS" nick nick) " ")))

  (defun erc-cmd-AMSG (&rest args)
    "Send a message to all the channels of the current server."
    (when args
      (let ((message (substring (mapconcat #'identity args " ") 1))
            (channel-list (and erc-server-process
                               (erc-channel-list erc-server-process))))
        (when channel-list
          (dolist (channel channel-list)
            (with-current-buffer channel
              (erc-send-message message)))))))

  ;; Override the default quit reason of ERC.
  (defun erc-quit-reason-normal (&optional message)
    "Normal quit message.

  If MESSAGE is non-nil, it will be used as the quit reason."
    (or message "Leaving"))

  (provide 'keramida-erc)

  ;;; keramida-erc.el ends here

---8<--- cut here ---8<--- cut here ---8<--- cut here ---8<---




reply via email to

[Prev in Thread] Current Thread [Next in Thread]