cscope-indexer doesn't exactly "trash those options" --- it
rewrites the entire cscope.files from scratch. If someone
doesn't want the filename list built the way cscope-indexer
builds it, they shouldn't use it. That set aside,
cscope-indexer is primarily meant as a part of xcscope, not
as a general-purpose utility. Changing the way it works
risks breaking its collaboration with xcscope.
I'm rejecting this on the above grounds, and for security
considerations --- the patch, as-is, opens a new /tmp file
writing hole.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i marked the category specifically as "xcscope interface"
recognizing that cscope-indexer is a part of xcscope.
having used cscope for about 13 years and emacs for 20 i
was mighty glad to see xcscope come around and have only
used cscope through xcscope since. that said, you fall
into usage patterns and xcscope makes it too convenient to
just "Create list and index" after adding that new file.
unfortunately, the carefully placed options recognized by
cscope are now gone. so i made the options sticky for
cscope-indexer very similar to the way your brain would
treat them if editing cscope.files manually.
xcscope does not care about cscope.files except as a
filename. it never opens the file, much less reads it.
the filename is only passed as an argument to cscope and
cscope-indexer or used as the target for an emacs buffer.
you can easily verify this by examining instances of
"cscope-index-file" (but not "cscope-index-files") in
xcscope.el.
as far as the /tmp security concern: the attached patch
does away with that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is visible right in that command name: It's
"Create list and index", not "Update list and index".
cscope-indexer is for creating the list from scratch, not
for updating the list with new files after the fact.
Why should cscope-indexer keep only the options, but not,
say, all the other files already listed? cscope-indexer
could use an update mode, yes. But such a mode cannot be
the default mode of operation, and I think it would have to
do more than just preserve cscope options.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
patch cscope-indexer to preserve options
Logged In: YES
user_id=27517
cscope-indexer doesn't exactly "trash those options" --- it
rewrites the entire cscope.files from scratch. If someone
doesn't want the filename list built the way cscope-indexer
builds it, they shouldn't use it. That set aside,
cscope-indexer is primarily meant as a part of xcscope, not
as a general-purpose utility. Changing the way it works
risks breaking its collaboration with xcscope.
I'm rejecting this on the above grounds, and for security
considerations --- the patch, as-is, opens a new /tmp file
writing hole.
patch cscope-indexer to preserve options
Logged In: YES
user_id=83246
i marked the category specifically as "xcscope interface"
recognizing that cscope-indexer is a part of xcscope.
having used cscope for about 13 years and emacs for 20 i
was mighty glad to see xcscope come around and have only
used cscope through xcscope since. that said, you fall
into usage patterns and xcscope makes it too convenient to
just "Create list and index" after adding that new file.
unfortunately, the carefully placed options recognized by
cscope are now gone. so i made the options sticky for
cscope-indexer very similar to the way your brain would
treat them if editing cscope.files manually.
xcscope does not care about cscope.files except as a
filename. it never opens the file, much less reads it.
the filename is only passed as an argument to cscope and
cscope-indexer or used as the target for an emacs buffer.
you can easily verify this by examining instances of
"cscope-index-file" (but not "cscope-index-files") in
xcscope.el.
as far as the /tmp security concern: the attached patch
does away with that.
Logged In: YES
user_id=27517
The problem is visible right in that command name: It's
"Create list and index", not "Update list and index".
cscope-indexer is for creating the list from scratch, not
for updating the list with new files after the fact.
Why should cscope-indexer keep only the options, but not,
say, all the other files already listed? cscope-indexer
could use an update mode, yes. But such a mode cannot be
the default mode of operation, and I think it would have to
do more than just preserve cscope options.