pazz / alot

Terminal-based Mail User Agent
GNU General Public License v3.0
700 stars 163 forks source link

editor spawn : my mail isn't writed #1514

Closed Ornanovitch closed 3 years ago

Ornanovitch commented 4 years ago

Software Versions

Hi ! First of all, thanks for this brilliant mail client :) I'm trying to use it as my everyday mail tool, I think I'm close to reach this goal.

I just have a small issue with this config :

editor_spawn = True
editor_cmd = nvim -f -c 'set filetype=mail'
terminal_cmd = lxterminal -e

Steps to reproduce the behaviour:

  1. press r on a message, nvim appears in a new windows (great)
  2. compose my message, save and close with :x
  3. no error, but my envelope remains unchanged...

Did I miss something ? When I remove editor_spawn=True, the behavior is perfect : my envelope is modified with my newly written message.

Error Log

DEBUG:ui:Got key (['r'], [114])
DEBUG:ui:cmdline: 'reply'
DEBUG:ui:thread command string: "reply"
DEBUG:__init__:mode:thread got commandline "reply"
DEBUG:__init__:ARGS: ['reply']
DEBUG:__init__:cmd parms {'all': False, 'listreply': None, 'spawn': None}
DEBUG:utils:Content-Transfer-Encoding: "quoted-printable"
DEBUG:utils:assuming Content-Transfer-Encoding: quoted-printable
DEBUG:utils:command: w3m -I iso-8859-1 -T text/html
DEBUG:utils:parms: ('text/html=', 'charset=iso-8859-1')
DEBUG:helper:Calling ['w3m', '-I', 'iso-8859-1', '-T', 'text/html']
DEBUG:envelope:TEMPLATE: None
DEBUG:utils:unquoted header: |RE: xxxxxxxxxxxx xxxx|
DEBUG:thread:candidate addresses: [('xxxxxxxx', 'xxxxxxxxx@xxxxxxxxxxx')]
DEBUG:thread:candidate addresses: [('xxxxxxxx', 'xxxxxxx@xxxxxxxxxx')]
DEBUG:thread:candidate addresses: []
DEBUG:thread:candidate addresses: []
DEBUG:thread:candidate addresses: []
DEBUG:thread:candidate addresses: [('', 'xxxxxxxxxxx@xxxxxxxx')]
DEBUG:thread:using realname: "xxxxxxx xxxxxx"
DEBUG:thread:using address: xxxxxxxxxxxx@xxxxxxxx
DEBUG:utils:{'xxxxxxxx@xxxxxxx': 'xxxxxxxxx'}
DEBUG:thread:reply to: xxxxxxx <xxxxxxxxx@xxxxxxxxx>
DEBUG:utils:unquoted header: |xxxxxxxxxx <xxxxxxxx@xxxxxxxxxxx>|
DEBUG:globals:No encryption by default, encrypt_by_default=none
DEBUG:envelope:edit_part: None 
INFO:envelope:editable headers: ['Subject', 'From', 'To']
DEBUG:envelope:edit_part: None 
DEBUG:envelope:editing plaintext
DEBUG:globals:using editor_cmd: nvim -f -c 'set filetype=mail'
DEBUG:globals:{'spawn: ': True, 'in_thread': False}
DEBUG:globals:{'spawn': True}
INFO:globals:spawn in terminal: lxterminal -e
DEBUG:globals:cmdlist: ['lxterminal', '-e', 'nvim', '-f', '-c', 'set filetype=mail', '/tmp/alot.c0j6o53l.eml']
INFO:globals:calling external command: ['lxterminal', '-e', 'nvim', '-f', '-c', 'set filetype=mail', '/tmp/alot.c0j6o53l.eml']
DEBUG:envelope:target bodypart: plaintext
DEBUG:envelope:GoT: """
pazz commented 4 years ago

Can you double check that the temp file contains what you've written in the editor just before going back to alot?

Ornanovitch commented 4 years ago

Hi pazz,

So I opened my /tmp next to alot, and here is what I see :

but when I come back to alot (my envelope remains unchanged), if I press enter to edit my message again, I noticed that the first temp file is removed and replaced by a new one...

I also tried to send myself an edited message to see what happen, and no luck, it's not just a display issue: the message I wrote wasn't there.

pazz commented 4 years ago

OK thanks for reporting this.

Ornanovitch commented 4 years ago

Thank you !

Ornanovitch commented 3 years ago

Hey @pazz !

I'd like to point out that this issue has been resolved by IDK what commit... but it works perfectly now. I'm on the last 0.9.1 directly from git.

Thanks alot!