Saving library example sketch getting error "you cannot save a sketch into a folder inside itself.."
What I normally do is make the examples in their own folders (ie. inside the sketchbook folder). Then when they are tested I just use the file system to move the folders into the "examples" folder under the library.


  When I do that, and try to save my LightBrightMain.ino file into /devel/arduino/libraries/LightBrightLib/examples/LightBrightMain/,


The IDE makes the folder, so you would (if this works at all) save LightBrightMain into the examples folder. Don't make a folder of the same name as the sketch. The IDE does that.