On 18/03/15 13:57, Ronny Chevalier wrote: > 2015-03-18 13:39 GMT+01:00 Daniele Nicolodi <dani...@grinta.net>: >> On 18/03/15 10:09, Zbigniew Jędrzejewski-Szmek wrote: >>> On Wed, Mar 18, 2015 at 12:13:39PM +0100, Ronny Chevalier wrote: >>>> Hi, >>>> >>>> About the TODO item of systemctl edit: >>>> "Upon editor exit, lines with one # are removed, lines with two # are >>>> left with one #, etc." >>>> >>>> I don't really agree, because if you have some comments in your >>>> drop-in file, you will have to remember every time you edit it to >>>> prepend one # to each one of your comments if you don't want them to >>>> be removed. >>> The idea was to prepend all existing comments with an extra hash. >>> Then lines with a single hash can be used without conflicting with >>> existing comments and the old comments can be restored exactly to their >>> previous form after editing is done. >> >> Wouldn't it be easy to prefix the lines to remove with something else >> than a hash or anything else that can be valid content for the file that >> is being edited, or that generally is much less likely to be present in >> the original file? >> >> For example mercurial uses the "HG: " prefix for lines that are removed >> from the commit message template file. > > Using # makes editors highlight the lines as comments without having > to deal with a new systemd specific format for comments. > > With your suggestion, when editing a file we will not see the specific > lines prefixed as comments. > > I think keeping the # as prefix is better here.
I didn't say that hashes are a bad idea, I was just suggesting to use something more unique than a certain number of hash prefix. For example, a prefix like "# SYSTEMD: " is fairly unlikely to be in the original content of the file, is easily recognizable, and parses as a comment. Cheers, Daniele _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel