[texworks] Unwanted side-effect of <tab> : how to avoid ?

Charlie Sharpsteen chuck at sharpsteen.net
Mon Jun 13 18:25:32 CEST 2011

On Mon, Jun 13, 2011 at 6:35 AM, Stefan Löffler <st.loeffler at gmail.com> wrote:
> Hi,
> On 2011-06-13 09:49, Charlie Sharpsteen wrote:
>> I added a preference option that enables/disables tab completion.
>> Patch is here:
>>     https://github.com/Sharpie/TeXworks/commit/0a09d61.patch
>> Seems to work on my machine. Definitely needs testing on Linux and Windows.
> Thanks for the patch. I share Jonathan's concerns about reading the
> settings on every key stroke.
> In addition, I'd rather not add a GUI option at this time. At the
> moment, we're in the TL'11 testing phase, and I expect a 0.4.2 bugfix
> release soon (essentially, as soon as the resolution of issue 469/505 is
> confirmed and the new python approach is reported working). If we were
> to change the interface now, this would entail a new translation round,
> which takes quite some time.
> That said, if you could split the patch in two (a code and a GUI part) I
> could commit the new code (so power-users can disable autocompletion
> from the configuration file/registry) and postpone the GUI part. In that
> case, please open a issue at GC (mails tend to get buried ;)).
> Thanks,
> Stefan

I split the commit into two parts.  The non-GUI part:



And the part that affects the preferences pane:



I also cleaned up the implementation so that the settings file is not
being read with every keystroke.

If only the first patch is applied, users will have to edit the
TeXworks preference file and set a value for `autocompleteEnabled` to
toggle autocompletion. On OS X, this file is a XML-based plist that
has been compiled to a binary (Seriously, XML *is* like violence---if
it doesn't work, compile it for concentrated application!).  The
following command-line incantations will edit the settings file when
entered into a console:

To disable:

    defaults write org.tug.TeXworks autocompleteEnabled -boolean NO

To enable:

    defaults write org.tug.TeXworks autocompleteEnabled -boolean YES

TeXworks will have to be restarted in order for changes to the
configuration file to have effect.

I will also open an issue on the GC tracker.


More information about the texworks mailing list