[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemacs-devel] Config file questions

From: Charles Gordon
Subject: Re: [Qemacs-devel] Config file questions
Date: Mon, 20 Mar 2017 01:38:06 +0100

On 20 Mar 2017, at 01:09, Hadrien Lacour wrote:
> On Mon, Mar 20, 2017 at 12:43:04AM +0100, Charles Gordon wrote:
>> What do you mean by "have the config file simply be a command list exactly 
>> as the ones that can be used inside qe?”
>> * most functions can be used from the config file but using 
>> set_indent_tabs_mode(1); would not work any better as it has the same 
>> problem: it only affects the current window.
>> * do you mean that the config file should have a list of keystrokes to be 
>> run like a macro?  This would not be very readable, but is feasible via 
>> define_kbd_macro().
> I mean what you can issue using M-x. For example, my config file would have 
> been:
> set-variable("tab-width", "4");
> set-variable("indent-tabs-mode", "1");
> toggle-truncate-lines();
> set-system-font("fixed", "terminus,unifont");
> set-style("default", "color", "#aaaaaa");
> set-style("default", "font-size", "16");
> Advantages: the config is self documenting (just use the internal qe help), no
> confusion concerning differences between commands and config, probably more
> possibilities, massively simple program (just a getline-check-execute loop).

This approach is supported, dashes and underscores are interchangeable in the 
parser, but not yet in the syntax colorizer.
* set-variable produces a status message that should be ignored when parsing 
the config file, this is a bug.
* toggle-truncate-lines(); is ambiguous, set-variable(“truncate-lines”, “1”); 
would be more explicit, I shall make this a variable too.

Again, some variables are local and some are global, this is confusing and I 
shall try to find a sensible solution.

>> The good news is there is a simple solution for you in the mean time:
>> create a file named .qerc (DOT Q E R C) in your home directory with this 
>> contents:
>> indent_tabs_mode = 1;
> Ah thanks, it finally works.
>> When qemacs loads a file or creates a new file, it loads and evaluates all 
>> .qerc files it finds in all parent directories of the file, from the root 
>> directory all the way to the file directory.
>> You can use this facility to set personal defaults in your home directory 
>> and project specific settings in different project directories.
>> This should solve your problem.
> I have to say that this config file business is 1) Extremely confusing (what's
> the difference between .qe/config and .qerc?) and 2) Not documented at all.

I apologize for the broken design, it is indeed confusing and I want to change 
it to something more intuitive that will be documented properly.
~/.qe/config is the global configuration file, but the distinction between 
global and window local or even mode local variables is indeed confusing.
The .qerc files are a non intrusive alternative to the syntax hacks introduced 
by emacs and vim for local customisation.

I welcome any suggestions, simplicity is definitely a goal.

Do you use qemacs in a terminal emulator or in an X11 window ?
Are you based in Paris ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]