Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External editor, not writing to temporary file #512

Closed
dantleech opened this issue Aug 11, 2018 · 6 comments
Closed

External editor, not writing to temporary file #512

dantleech opened this issue Aug 11, 2018 · 6 comments

Comments

@dantleech
Copy link

Version: 3.2.0

Steps to reproduce

Invoke the external editor on a text area

Expected behaviour

Writes contents of text area to temporary file, opens external editor.

Actual behaviour

Temporary file does not exist, external editor opened with a new file.


I debugged this and in gboolean util_create_tmp_file the correct number of bytes are being returned from write - no error is raised but the file does not exist at the path and the newly opened editor reports that it is editing a "new file".

@fanglingsu
Copy link
Owner

@dantleech Hm, do you use systemd - might be the tmp file is not created direct in /tmp but in private systemd tmp directory. Can you please provide some information about you system helping to near down the issue?

@dantleech
Copy link
Author

dantleech commented Aug 13, 2018

Hmm it seems to work with gvim but not through a terminal:

set editor-command=gvim -f %s

but:

set editor-command=gnome-terminal -- "vim %s"

or

set editor-command=xfce4-terminal -e "vim %s"

Causes the reported problem.

(I'm using neovim on another laptop, and couldn't get any of the GTK clients working, so wanted to use the console version, and that's why I encountered this issue).

@fanglingsu
Copy link
Owner

@dantleech set editor-command=st -t scratchpad -g 80x20+40+60 -e vim %s sorks for me. I do not have any other terminal. In the past following worked for me with urxvt too set editor-command=urxvt -title scratchpad -geometry 80x20+40+60 -e vim %s. I think you should remove the quotes around the vim %s.

@dantleech
Copy link
Author

dantleech commented Aug 15, 2018

Yeah, very odd. I tried with the suckless terminal (st?) and it worked fine, but neither gnome-terminal nor xfce4-terminal work:

set editor-command=xfce4-terminal --initial-title scratchpad --command=vim %s
xfce4-terminal: Unknown option "/tmp/daniel/vimb-6SISNZ"

Using quotes around vim %s causes the editor to be opened, but the file is empty as originally reported.

Will update if I find a solution

@fanglingsu
Copy link
Owner

@dantleech I assume that the issue is related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=434863. The xfce termina forks itselft at startup.

@dantleech
Copy link
Author

Sounds exactly like my issue - I'll close this ticket then, as guess theres nothing we should do about here/ Thanks for investigating :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants