>> Hi Thomas, >> >> I believe the `org-babel-tangle-comment-format-beg' and >> `org-babel-tangle-comment-format-end' variable should provide the >> functionality you desire. > > Hi, Eric, > > Thank you, though I'm afraid I'm still having trouble getting > the right result. The closest I've come is with this setting: > > (setq org-babel-tangle-comment-format-beg > "\\sourcefilename \"%file\"\n\\sourcefileline %start-line") > > But this adds comment characters before the commands. > > It also adds a blank line after the comment, throwing line numbers > off by one. (Actually they are off by two; maybe LilyPond needs > \sourcefileline to be on the same line as the beginning of the code.) >
Yes, these will be inserted as comments, not directly into the file. I've just added a new customization variable which will allow you turn off the automated commenting and trailing newline insertion. Set `org-babel-tangle-uncomment-comments' to a non-nil value. Best, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D (see https://u.fsf.org/yw)