Subject: 24.3; sieve-manage-default-port not used in sieve-manage/sieve-setup-buffer [PATCH]

From: Reiner Steib <[email-masked]>
Date: Tue, 12 May 2015 18:47:35 +0200

Hi,

sieve-manage has a customizable variable `sieve-manage-default-port':

| (defcustom sieve-manage-default-port 2000
|   "Default port number or service name for managesieve protocol."

But even after  (setq sieve-manage-default-port 4190), sieve-upload
(C-c C-l) tries to connect to port 2000.

Buffer *sieve* ...

| Server  : imap.example.com:2000

Probably sieve-setup-buffer should use `sieve-manage-default-port'?

--- sieve.el.~1~	2015-05-12 18:10:52.157412555 +0200
+++ sieve.el	2015-05-12 18:11:11.017411698 +0200
@@ -256,10 +256,10 @@
   (setq buffer-read-only nil)
   (erase-buffer)
   (buffer-disable-undo)
-  (insert "\
-Server  : " server ":" (or port "2000") "
-
-")
+  (insert
+   (format
+    "Server  : %s:%d\n\n" server
+    (or port sieve-manage-default-port)))
   (set (make-local-variable 'sieve-buffer-header-end)
        (point-max)))

Bye
Reiner

In GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-07 on toyol, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description:	Ubuntu 14.04.2 LTS

Configured using:
 `configure '--build' 'i686-linux-gnu' '--build' 'i686-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/i386-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=i686-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t