can I use different text editor?

I’m thinking about adopting scrivener as an outline manager – the corkboard looks really useful, and repoduces something that I often do on paper. However, I’ve been using emacs for 20+ years now as my text editor, so even the thought of using anything else for editing text makes me hurt. So, would it be possible to use Scrivener to organise text snippets, move them around etc, but then use a different text editor to actually edit them?

(I’d also like these text snippets to be latex files, i.e. have the ending “.tex”, but that’s a small matter should the whole setup work in principle.)

Emacs exports plain text? You can import plain text snippets into Scrivener, or drag and drop them on to the Binder. You can’t drag them out again, but you can export as plain text, or compile as MultiMarkdown which in turn can make Latex files (not that I know much about the latter, but the Scrivener Manual under the Help menu has sections on all these procedures). So the answer to your question is yes, but you might find going in and out again repeatedly a bit of a chore.

However, I’m bound to say that if you don’t write and edit in Scrivener, you’ll be missing much of its point. It is above all a drafting tool with features that support that purpose, such as text chunking, dual-pane editing, full-screen working, in-line and marginal annotations, meta-data of various kinds, compiling to export. Try it; you might like it! :slight_smile:

Check the MultiMarkdown section of the forum for some tips on using Scrivener to compose LaTeX without the middle solution. It’s perfectly viable to write LaTeX right into Scrivener and compile using the plain-text exporter (you’ll just need to fix the extension to .tex afterward), and even set up the compiler to automate some of the more routine stuff like wrapping titles into section or chapter code.

For external editing, syncing to an external folder (/File/Sync/with External Folder) might do you well. This lets you export part or all of your outline as plain text files to your drive, which you can then edit in Emacs and sync back into Scrivener when you are done. The only thing you can’t do here is call the text files .tex or anything other than .txt, but Emacs’ file variables might do the trick.

But I’m with Hugh on this. I’ve been using text files to write for ages, too (though Vim was my weapon of choice), and for a while I tried to keep this going in Scrivener, but came to find its editor features too useful to lose every time I took the section out for an editing cycle. The annotations, links, revisions, all of that stuff can come in very handy. Now with folder sync things are a little better than when I was trying this out, because it syncs with a granularity at the paragraph level—only the paragraphs you change will lose any special attributes, but unless you have a really good memory, you could still end up inadvertently losing important notes. So I’d say, if you intend to work this way, you’ll want to stick with keeping notes in the Inspector notepad, and links in the References table, rather than inline.

One last thing: for spot editing in Scrivener, you’ll find a number of Emacs style shortcuts are available, such as Ctrl-A and Ctrl-K. It’s not a complete set though, however there are ways of adding commands to the OS X text system. So long as the system has a hook for it, there are many things you can rebind at the editor level. Do some Web searches for KeyBindings files and Emacs, it’s a popular combination, so you should be able to take your pick. The nice thing about this is that it will impact your entire OS—anything that uses the standard OS X system, such as the URL bar in a browser, or the review field in iTunes—but it won’t do anything for Java and the like.

Thank you for your quick and detailed replies!

Using the internal text editor of scrivener isn’t really an option for me, I am relying too much on the emacs infrastructure (syntax highlighting and 100s of packages). But I have worked out a possible workflow in the meantime. I’ll document it here in case anyone stumbles on this question:

  • create a folder for your project. Let’s say “my-project”.
  • in this folder, create scrivener project. So you now have for example “my-project/project.scriv”. The first chunk in that project should be a latex preemble and the last should be a proper ending for a latex file (possibly calling the bibliography and closing the document environment).
  • set scrivener to sync text files to folder in the same master folder. E.g., “my-project/synced”.
  • create third folder, for latex. E.g. “my-project/latex”.
    Now you can edit the chunks in the synced folder or in scrivener. (As far as I can see, you have to manually trigger sync in scrivener though to push changes in either direction.) Any reordering in scrivener will re-number the files in the synced directory as well (once the sync has been triggered).

When the time comes to compile the latex, go to the synced/Draft folder, and do

ls | sort -n | awk '{print "\\\input\{\'../synced/Draft/" $0 "\'\}"}' > ../../latex/master.tex

This creates a latex file that just imports the text files from the synced folder. But when you compile it, you don’t litter the synced folder, as all latex action is happening in its own folder.

Nice. Still more steps than I’d ideally like, but not too painful. (And I guess it’s something that could be automated via AppleScript, so that one script calls the sync, the creation of the master file, and triggers the compilation.)

The current default–in 2.0.4–is to check for changes in the external folder when opening the Scrivener project and then to automatically sync on close. You can check that on or off when you set up the sync.