unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36266: 26.1; Problems with sieve-manage
@ 2019-06-17 17:05 hartzell
  2019-07-10 19:34 ` Noam Postavsky
  2019-07-25 18:28 ` Eric Abrahamsen
  0 siblings, 2 replies; 5+ messages in thread
From: hartzell @ 2019-06-17 17:05 UTC (permalink / raw)
  To: 36266


I asked for help with these on the `help-gnu-emacs` mailing list and
Eric suggested that I also report them as bugs so that they don't get
lost.  Here is the email thread:

https://lists.gnu.org/archive/html/help-gnu-emacs/2019-06/msg00185.html

g.

---

I've been trying to use sieve-manage in GNU Emacs 26.1 on a Mac with
dovecot-pigeonhole-0.5.6 on a FreeBSD 12 system.

I've run into a few problems:

1. I can start sieve-manage, use the `f` key with the `<new script>`
   line highlighted, edit a script, and use `C-c C-l` to upload it to
   the server.

   The problem is that the script, on the server, is named `<new
   script>.sieve`, which is awkward.

   But worse, if/when I restart sieve-manage it offers me two choices,
   one labeled `<new script>` (which is the button to create a new
   script) and one which is the existing script which was saved under
   that same name.

   I've tried renaming the buffer, but the code has a preference for
   `sieve-buffer-script-name`.

   Is there some way to rename the buffer?

2. If I create a script directly on the server (e.g. `ape.sieve`) then
   start sieve-manage, I'm offered the chance to edit it.  If I move
   the highlighting to `ape.sieve` then use `f` to edit it, emacs
   becomes unresponsive.  I can break out of it with C-g.

   But, I've had it work once or twice.  I haven't figure out how to
   repeat it.

   If I look in `*sieve-manage-log*`, I can see that emacs has sent
   `GETSCRIPT "ape"` and I can see the text of the script in the
   response.

   I'm not sure what it's waiting for.

3. If I mess up my authentication info, I'm never given a chance to
   re-enter it.  When I enter the server name, it goes ahead and
   re-uses the bad info and fails.  The only way I've been able to
   figure out to be reprompted is to restart emacs.


Here's the info that the bug reporter generated;

In GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17 Version 10.10.5 (Build 14F2511))
 of 2018-05-28 built on builder10-10.porkrind.org
Windowing system distributor 'Apple', version 10.3.1561
Recent messages:
inbox: Retrieving message attributes and labels... 
inbox: Retrieving message atrributes and labels... done
inbox: Expunging messages in cache... done
inbox: No new mail
inbox: Expunging...
inbox: Generating summary... 0
inbox: Deleted messages expunged.
End of message 89 from Eric Abrahamsen...
Mark saved where search started [2 times]
End of message 76 from Eric Abrahamsen...

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: VM Summary

Minor modes in effect:
  recentf-mode: t
  shell-dirtrack-mode: t
  company-quickhelp-mode: t
  company-quickhelp-local-mode: t
  editorconfig-mode: t
  show-smartparens-global-mode: t
  smartparens-global-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  flx-ido-mode: t
  ido-ubiquitous-mode: t
  ido-vertical-mode: t
  ido-everywhere: t
  projectile-mode: t
  global-diff-hl-mode: t
  diff-auto-refine-mode: t
  global-anzu-mode: t
  delete-selection-mode: t
  override-global-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  straight-live-modifications-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/hartzell/.emacs.d/straight/build/cl-lib/cl-lib hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/cl-lib
/Users/hartzell/.emacs.d/straight/build/seq/seq hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/seq
/Users/hartzell/.emacs.d/straight/build/let-alist/let-alist hides /Applications/Emacs.app/Contents/Resources/lisp/emacs-lisp/let-alist

Features:
(shadow emacsbug mail-extr mc-edit-lines multiple-cursors-core rect
rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri
rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns
nxml-mode nxml-outln nxml-rap smartparens-html sgml-mode dom nxml-util
nxml-enc xmltok vm-edit switch-window switch-window-mvborder
switch-window-asciiart quail avy vm-mark editorconfig-core
editorconfig-core-handle editorconfig-fnmatch message dired
dired-loaddefs rfc822 mml mml-sec gnus-util rmail rmail-loaddefs
mm-decode mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader
smex recentf tree-widget crux tramp tramp-compat tramp-loaddefs
trampver shell pcomplete parse-time format-spec misearch multi-isearch
vc-git aggressive-indent company-oddmuse company-keywords
company-etags etags xref project company-gtags company-dabbrev-code
company-dabbrev company-files company-capf company-cmake company-xcode
company-semantic company-template company-yasnippet company-bbdb
company-quickhelp pos-tip company-quickhelp-autoloads
pos-tip-autoloads company pcase editorconfig highlight-numbers
parent-mode rainbow-delimiters flycheck json map find-func warnings
vm-save browse-url vm-sort vm-digest vm-reply avoid
exec-path-from-shell smartparens-config smartparens-markdown
smartparens-text smartparens dash yasnippet elec-pair vm-delete utf-7
network-stream puny nsm rmc starttls tls gnutls tapestry bbdb-vm
bbdb-mua bbdb-com crm mailabbrev bbdb bbdb-site timezone sendmail
rfc2047 rfc2045 ietf-drums mail-utils vm-rfaddons vm-undo vm-virtual
vm-summary-faces vm-pop utf7 mm-util mail-prsvr vm-imap vm-thread
vm-mime vm-toolbar vm-menu vm-window vm-folder vm-crypto vm-summary
vm-mouse vm-page vm-motion vm-minibuf vm-message vm-misc vm-macro
flx-ido flx ido-completing-read+ memoize cus-edit cus-start cus-load
wid-edit minibuf-eldef ido-vertical-mode ido vm-pine u-vm-color vm
whitespace-cleanup-mode whitespace flyspell ispell markdown-mode color
url-parse auth-source password-cache url-vars noutline outline
projectile grep compile comint ansi-color ring ibuf-ext ibuffer
ibuffer-loaddefs seq seq-25 sm-terraform terraform-mode-autoloads
sm-data yaml-mode-autoloads csv-mode-autoloads sm-mail cl vm-autoloads
vm-version vm-vars s bbdb-autoloads sm-dired dired-subtree-autoloads
dired-hacks-utils-autoloads sm-coding-hcl hcl-mode-autoloads
sm-coding-stats ess-autoloads julia-mode-autoloads sm-coding-sh
sm-coding-perl sm-coding-web web-mode-autoloads sass-mode-autoloads
haml-mode-autoloads slim-mode-autoloads php-mode-autoloads rx
sm-coding-ruby ruby-tools-autoloads inf-ruby-autoloads
sm-coding-python yapfify-autoloads sm-coding-js js2-mode-autoloads
sm-coding-java java-imports-autoloads ensime-autoloads popup-autoloads
sbt-mode-autoloads scala-mode-autoloads sm-coding-go go-guru-autoloads
go-mode-autoloads sm-coding-elixir alchemist-autoloads
elixir-mode-autoloads sm-coding-cc sm-coding-groovy
groovy-mode-autoloads sm-coding-general restclient-autoloads
flycheck-autoloads rainbow-delimiters-autoloads
highlight-numbers-autoloads parent-mode-autoloads
editorconfig-autoloads sm-source-control diff-hl vc-dir ewoc vc
vc-dispatcher diff-mode diff-hl-autoloads magit-gh-pulls-autoloads
magit-autoloads magit-popup-autoloads git-commit-autoloads
with-editor-autoloads ghub-autoloads treepy-autoloads
let-alist-autoloads graphql-autoloads async-autoloads gh-autoloads
gh-common marshal eieio-compat eieio eieio-core eieio-loaddefs
marshal-autoloads ht-autoloads logito-autoloads pcache-autoloads
sm-projects projectile-autoloads pkg-info-autoloads epl-autoloads
sm-writing markdownfmt-autoloads markdown-mode-autoloads
lorem-ipsum-autoloads sm-company company-autoloads sm-navigation
avy-autoloads switch-window-autoloads sm-searching engine-mode
engine-mode-autoloads anzu thingatpt anzu-autoloads ag-autoloads
sm-snippets yasnippet-autoloads sm-appearance rainbow-mode-autoloads
wombat-theme doom-themes-autoloads all-the-icons-autoloads
base16-theme-autoloads heroku-theme-autoloads sm-ui delight
smex-autoloads ido-vertical-mode-autoloads
ido-completing-read+-autoloads memoize-autoloads s-autoloads
flx-ido-autoloads flx-autoloads sm-editing swiper-autoloads
ivy-autoloads boxquote-autoloads writegood-mode-autoloads epa-file epa
derived epg epg-config crypt crypt++ crypt+pgp-pub
aggressive-indent-autoloads embrace-autoloads smart-comment-autoloads
undo-tree-autoloads whitespace-cleanup-mode-autoloads
browse-kill-ring-autoloads smartparens-autoloads dash-autoloads
expand-region-autoloads multiple-cursors-autoloads crux-autoloads
seq-autoloads edmacro kmacro finder-inf delsel sm-path
exec-path-from-shell-autoloads no-littering no-littering-autoloads
cl-lib-autoloads sm-keybindings sm-personal sm-modules
delight-autoloads use-package-chords bind-chord key-chord byte-opt
advice use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-chords-autoloads bind-chord-autoloads key-chord-autoloads
cl-seq use-package-core use-package-autoloads bind-key-autoloads
straight-autoloads info cl-extra help-mode easymenu straight subr-x
cl-macs gv bytecomp byte-compile cl-loaddefs cl-lib cconv sm-defaults
sm-defuns time-date tooltip eldoc electric uniquify ediff-hook
vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize
mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded
nadvice loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 740405 603704)
 (symbols 48 49630 1268)
 (miscs 40 14160 21585)
 (strings 32 196670 72162)
 (string-bytes 1 5994489)
 (vectors 16 137906)
 (vector-slots 8 3533947 555410)
 (floats 8 448 2627)
 (intervals 56 10635 2968)
 (buffers 992 62))





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

* bug#36266: 26.1; Problems with sieve-manage
  2019-06-17 17:05 bug#36266: 26.1; Problems with sieve-manage hartzell
@ 2019-07-10 19:34 ` Noam Postavsky
  2019-07-25 18:28 ` Eric Abrahamsen
  1 sibling, 0 replies; 5+ messages in thread
From: Noam Postavsky @ 2019-07-10 19:34 UTC (permalink / raw)
  To: hartzell; +Cc: 36266

hartzell@alerce.com writes:

> 3. If I mess up my authentication info, I'm never given a chance to
>    re-enter it.  When I enter the server name, it goes ahead and
>    re-uses the bad info and fails.  The only way I've been able to
>    figure out to be reprompted is to restart emacs.

Not sure about the rest, but it looks like sieve-sasl-auth is using
auth-source, so M-x auth-source-forget-all-cached RET should work.






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

* bug#36266: 26.1; Problems with sieve-manage
  2019-06-17 17:05 bug#36266: 26.1; Problems with sieve-manage hartzell
  2019-07-10 19:34 ` Noam Postavsky
@ 2019-07-25 18:28 ` Eric Abrahamsen
  2019-08-11 15:11   ` Eric Abrahamsen
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2019-07-25 18:28 UTC (permalink / raw)
  To: hartzell; +Cc: 36266

[-- Attachment #1: Type: text/plain, Size: 2838 bytes --]

hartzell@alerce.com writes:

> I asked for help with these on the `help-gnu-emacs` mailing list and
> Eric suggested that I also report them as bugs so that they don't get
> lost.  Here is the email thread:
>
> https://lists.gnu.org/archive/html/help-gnu-emacs/2019-06/msg00185.html
>
> g.
>
> ---
>
> I've been trying to use sieve-manage in GNU Emacs 26.1 on a Mac with
> dovecot-pigeonhole-0.5.6 on a FreeBSD 12 system.
>
> I've run into a few problems:
>
> 1. I can start sieve-manage, use the `f` key with the `<new script>`
>    line highlighted, edit a script, and use `C-c C-l` to upload it to
>    the server.
>
>    The problem is that the script, on the server, is named `<new
>    script>.sieve`, which is awkward.
>
>    But worse, if/when I restart sieve-manage it offers me two choices,
>    one labeled `<new script>` (which is the button to create a new
>    script) and one which is the existing script which was saved under
>    that same name.
>
>    I've tried renaming the buffer, but the code has a preference for
>    `sieve-buffer-script-name`.
>
>    Is there some way to rename the buffer?

I think it's a little weird that `sieve-new-script' (which defaults to
"<new script>" is a configurable option at all. IMO, there are two
separate concerns: some placeholder text for the button that's used to
create a new script (there's no reason to make this configurable), and
the default name for a newly-created script (the new name should be
prompted for on a script-by-script basis, and there's no reason to have
a default at all).

I've attached a simple diff which checks if your new script has the same
name as `sieve-new-script' and prompts you to rename it. But I think a
more sensible solution would be to remove the `sieve-new-script' option
altogether. Then hard-code the "new script" button text, and always
prompt for a name for a new script.

> 2. If I create a script directly on the server (e.g. `ape.sieve`) then
>    start sieve-manage, I'm offered the chance to edit it.  If I move
>    the highlighting to `ape.sieve` then use `f` to edit it, emacs
>    becomes unresponsive.  I can break out of it with C-g.
>
>    But, I've had it work once or twice.  I haven't figure out how to
>    repeat it.
>
>    If I look in `*sieve-manage-log*`, I can see that emacs has sent
>    `GETSCRIPT "ape"` and I can see the text of the script in the
>    response.
>
>    I'm not sure what it's waiting for.

I believe this is something to do with an infloop in
`accept-process-output' that was previously preventing me from logging
in to my sieve servers at all. This is just a guess, because it matches
pretty closely behavior that I saw discussed in another bug report here.
But this has since been cleared up for me in Emacs master, so maybe if
you build a new Emacs it will start working? We hope?

Eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix-sieve-script-name.diff --]
[-- Type: text/x-patch, Size: 688 bytes --]

diff --git a/lisp/net/sieve.el b/lisp/net/sieve.el
index 3337998bed..4485b8c730 100644
--- a/lisp/net/sieve.el
+++ b/lisp/net/sieve.el
@@ -210,7 +210,11 @@ sieve-edit-script
 	      (set-buffer-modified-p nil)
 	    (error "Sieve download failed: %s" err)))
       (switch-to-buffer (get-buffer-create "template.siv"))
-      (insert sieve-template))
+      (insert sieve-template)
+      (setq name (read-string "Name for new script: "))
+      (when (string-match "\\.sieve\\'" name)
+        ;; The server will append .sieve to the script name.
+        (setq name (replace-match "" t t name))))
     (sieve-mode)
     (setq sieve-buffer-script-name name)
     (goto-char (point-min))

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

* bug#36266: 26.1; Problems with sieve-manage
  2019-07-25 18:28 ` Eric Abrahamsen
@ 2019-08-11 15:11   ` Eric Abrahamsen
  2019-08-11 16:06     ` Eric Abrahamsen
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Abrahamsen @ 2019-08-11 15:11 UTC (permalink / raw)
  To: hartzell; +Cc: 36266


On 07/25/19 11:28 AM, Eric Abrahamsen wrote:
> hartzell@alerce.com writes:
>
>> I asked for help with these on the `help-gnu-emacs` mailing list and
>> Eric suggested that I also report them as bugs so that they don't get
>> lost.  Here is the email thread:
>>
>> https://lists.gnu.org/archive/html/help-gnu-emacs/2019-06/msg00185.html
>>
>> g.
>>
>> ---
>>
>> I've been trying to use sieve-manage in GNU Emacs 26.1 on a Mac with
>> dovecot-pigeonhole-0.5.6 on a FreeBSD 12 system.
>>
>> I've run into a few problems:
>>
>> 1. I can start sieve-manage, use the `f` key with the `<new script>`
>>    line highlighted, edit a script, and use `C-c C-l` to upload it to
>>    the server.
>>
>>    The problem is that the script, on the server, is named `<new
>>    script>.sieve`, which is awkward.
>>
>>    But worse, if/when I restart sieve-manage it offers me two choices,
>>    one labeled `<new script>` (which is the button to create a new
>>    script) and one which is the existing script which was saved under
>>    that same name.
>>
>>    I've tried renaming the buffer, but the code has a preference for
>>    `sieve-buffer-script-name`.
>>
>>    Is there some way to rename the buffer?
>
> I think it's a little weird that `sieve-new-script' (which defaults to
> "<new script>" is a configurable option at all. IMO, there are two
> separate concerns: some placeholder text for the button that's used to
> create a new script (there's no reason to make this configurable), and
> the default name for a newly-created script (the new name should be
> prompted for on a script-by-script basis, and there's no reason to have
> a default at all).
>
> I've attached a simple diff which checks if your new script has the same
> name as `sieve-new-script' and prompts you to rename it. But I think a
> more sensible solution would be to remove the `sieve-new-script' option
> altogether. Then hard-code the "new script" button text, and always
> prompt for a name for a new script.

I'll just do the simpler fix for now...





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

* bug#36266: 26.1; Problems with sieve-manage
  2019-08-11 15:11   ` Eric Abrahamsen
@ 2019-08-11 16:06     ` Eric Abrahamsen
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Abrahamsen @ 2019-08-11 16:06 UTC (permalink / raw)
  To: 36266-done

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> On 07/25/19 11:28 AM, Eric Abrahamsen wrote:
>> hartzell@alerce.com writes:
>>
>>> I asked for help with these on the `help-gnu-emacs` mailing list and
>>> Eric suggested that I also report them as bugs so that they don't get
>>> lost.  Here is the email thread:
>>>
>>> https://lists.gnu.org/archive/html/help-gnu-emacs/2019-06/msg00185.html
>>>
>>> g.
>>>
>>> ---
>>>
>>> I've been trying to use sieve-manage in GNU Emacs 26.1 on a Mac with
>>> dovecot-pigeonhole-0.5.6 on a FreeBSD 12 system.
>>>
>>> I've run into a few problems:
>>>
>>> 1. I can start sieve-manage, use the `f` key with the `<new script>`
>>>    line highlighted, edit a script, and use `C-c C-l` to upload it to
>>>    the server.
>>>
>>>    The problem is that the script, on the server, is named `<new
>>>    script>.sieve`, which is awkward.
>>>
>>>    But worse, if/when I restart sieve-manage it offers me two choices,
>>>    one labeled `<new script>` (which is the button to create a new
>>>    script) and one which is the existing script which was saved under
>>>    that same name.
>>>
>>>    I've tried renaming the buffer, but the code has a preference for
>>>    `sieve-buffer-script-name`.
>>>
>>>    Is there some way to rename the buffer?
>>
>> I think it's a little weird that `sieve-new-script' (which defaults to
>> "<new script>" is a configurable option at all. IMO, there are two
>> separate concerns: some placeholder text for the button that's used to
>> create a new script (there's no reason to make this configurable), and
>> the default name for a newly-created script (the new name should be
>> prompted for on a script-by-script basis, and there's no reason to have
>> a default at all).
>>
>> I've attached a simple diff which checks if your new script has the same
>> name as `sieve-new-script' and prompts you to rename it. But I think a
>> more sensible solution would be to remove the `sieve-new-script' option
>> altogether. Then hard-code the "new script" button text, and always
>> prompt for a name for a new script.
>
> I'll just do the simpler fix for now...





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

end of thread, other threads:[~2019-08-11 16:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 17:05 bug#36266: 26.1; Problems with sieve-manage hartzell
2019-07-10 19:34 ` Noam Postavsky
2019-07-25 18:28 ` Eric Abrahamsen
2019-08-11 15:11   ` Eric Abrahamsen
2019-08-11 16:06     ` Eric Abrahamsen

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