bugGNU source-highlight - Bugs: bug #44826, User settings file is not used

 
 

bug #44826: User settings file is not used

Submitted by:  avih <avih>
Submitted on:  Mon 13 Apr 2015 12:13:19 PM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 13 Apr 2015 12:22:53 PM UTC, comment #1:

To clarify, I believe these are the only two sources for the data dir which are effectively currently used:

1. if --data-dir is provided on invocation, then it's used correctly.

2. if --data-dir is not used on invocation, then it uses hardcoded RELATIVEDATADIR which defaults to <executable-dir>/../share/source/highlight

and that's it.

The patch which I linked to at the original bug report changes it to:

1. defaults to whatever Settings::retrieveDataDir() ends up with (including user settings file, SOURCE_HIGHLIGHT_DATADIR env var etc).

2. --data-dir overides #1

3. if the requested file is not found at 1/2, then it also searches for it at RELATIVEDATADIR.

avih <avih>
Mon 13 Apr 2015 12:13:19 PM UTC, original submission:

Same goes for the env var SOURCE_HIGHLIGHT_DATADIR and in general everything which is searched in Settings::retrieveDataDir().

It is used correctly with source-highlight-settings (read/written), but I believe it's not used with source-highlight itself.

It's a bit hard for me to believe that with all the settings related code it ends up not using what it should, but I reproduced it with Ubuntu 14.04 LTS and also when cross-building for Windows. I'd appreciate if someone else could reproduce this issue.

I did try to fix it and submitted a patch at https://savannah.gnu.org/patch/index.php?8646

Not sure if I should post elsewhere, this is my first interaction with savannah.

avih <avih>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by avih (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.3