Code Monkey home page Code Monkey logo

Comments (9)

orbitalquark avatar orbitalquark commented on July 23, 2024

I think this may be related to the inability to determining the filesystem encoding in #510. If you manually export CHARSET=UTF-8 and try again, does it work?

from textadept.

quesada avatar quesada commented on July 23, 2024

I'm using fish.
tried this on config.fish:

set CHARSET "UTF-8"
set LANG "en_US.UTF-8"

Segfault persists

EDIT: tried in bash. set the same vars, stayed in bash. doing 'zk new' does get the same segfault. Sorry to be the bearer of bad news

from textadept.

quesada avatar quesada commented on July 23, 2024

Update: the curses version also doesn't work when launched by a different tool, tpnote (https://blog.getreu.net/projects/tp-note/tpnote--manpage.html).

The error is this time:

The external application did not terminate gracefully: signal : 11 (SIGSEGV)

from textadept.

orbitalquark avatar orbitalquark commented on July 23, 2024

You may need to do something like xterm -e textadept-curses. Based on your screenshot, it appears to be invoking textadept-curses $file < /dev/tty, which (to me) appears to be doing odd things with stdin. It doesn't look like it's launching the terminal application with the shell's current stdin (which is required).

from textadept.

quesada avatar quesada commented on July 23, 2024

Yes, that replicates the problem.

xterm -e textadept-curses creates a popup window on X with a new terminal. This is not what we want, we want to reuse the existing terminal. It's not just better ergonomics: it won't work using the default linux/bsd console (ctrl alt F1-F6) which is a very important use case for a curses editor aiming to replace vim (ie, my use case).

The other way textadept-curses $file < /dev/tty does produce the same error message, but stays within the existing window (which is what we want).

I used 2 examples of 3rd party apps calling an editor this way, zk and tpnote. there are many more. Git for example. I think this second workflow is the most common in the TUI world. If textadept cannot adopt it, I would consider it a bug?

from textadept.

rgieseke avatar rgieseke commented on July 23, 2024

Git for example. I think this second workflow is the most common in the TUI world.

Do you mean using textadept-curses for writing a Git commit message after git commit?

I use this with fish without problems.

from textadept.

quesada avatar quesada commented on July 23, 2024

Yes this is what I mean. I haven't tried it yet. Could it be that I found the only two apps that do call textadept-courses wrong?

from textadept.

orbitalquark avatar orbitalquark commented on July 23, 2024

I can reproduce the crash by calling textadept-curses $file < /dev/tty. I'll look into that when I have a chance.

Applications should simply be invoking textadept-curses $file. There shouldn't be a need to provide a stdin resource like /dev/tty. It should already be the current stdin, and Textadept should take over the foreground. I have it set up so that when I do hg commit or git commit, textadept-curses opens up with the commit message, as Robert hints at. No crashes, and everything works as expected.

from textadept.

quesada avatar quesada commented on July 23, 2024

Yeah, it's strange these two apps do it that way. The config file seems to indicate they would do it like you describe, like git commit does it... but no. They are in rust and go each. Maybe 'modern' languages have libraries for TUI that do it this way? Not sure.

from textadept.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.