enlightenment bug 1

enlightenment is a X/UNIX window manager. It turns out that if you use double-quotes in your keyboard shortcut action, then you'll hose your enlightenment setup. You need to delete/edit the file: ".enlightenment/...e_session-XXXXXX" or else you'll see "Enlightenment has encountered parsing errors in your autosaved configuration" when you restart enlightenment, and you won't be able to run enlightenment at all.


Here's a patch for enlightenment-0.16.5:

config.c (line 3981) from:

                            if (aa->action->params)
                               fprintf(autosavefile, "104 %i %s\n",
                                       aa->action->Type,
                                       (char *)aa->action->params);
                            else

to:

                            if (aa->action->params) {
                               /* If we save actions with double-quotes,
                                * the parser will complain and keep us
                                * from running enlightenment again.
                                * We'll convert to single-quotes which will
                                * cover 90% of the cases, and for the remaining
                                * (anything that uses both types of quotes)
                                * at least we'll be able to run enlightenment.
                                */
                               /* Instead of editing the action directly, make
                                * a copy of the string to edit:  s/"/'/g;
                                */
                               tmp2 = (char *) aa->action->params;
                               tmp1 = (char *) Emalloc(sizeof(char *)*strlen(tmp
                               tmp1 = (char *) strdup(tmp2);
                               tmp2 = tmp1;
                               while (*tmp2++) { if (*tmp2=='"') *tmp2 = '\''; }
                               fprintf(autosavefile, "104 %i %s\n",
                                       aa->action->Type,tmp2);
                            } else