Problem with file transclusion

enrico.scarpella's Avatar

enrico.scarpella

01 Jun, 2019 12:45 AM

Dear Fletcher,

I am having a problem with file transclusion, and I was wondering whether you could be so kind to help me.

I created a transclusion file (see attached "Transclusion File" screenshot, which shows part of it). I then used the "File > Transclude to New File" function, but the transclusion is incomplete (see attached "Transcluded File" screenshot, which shows part of it). As you can see, the first and fourth files were included in the transclusion, but the second and third were not. Actually, the first time I had tried this, the first file had not been included in the transclusion either, but I solved that problem by adding the ".md" suffix to the file name, which is in itself strange because all the files to be included in the transclusion and the transclusion file itself were created with Composer, and I never add an ".md" suffix to the file name because I had selected "md" as default file extension in the Preferences. Nevertheless, I then proceeded to add the ".md" suffix to the second and third files, but this time the stratagem failed to solve the problem. The names of the files are written properly in the transclusion file, as you can see from the "File Names" screenshot, which also shows that the fourth file to be included in the transclusion indeed lacks the ".md" suffix, and yet it was included in the transclusion.

I have performed the same transclusion using Marked 2 with the same files (but with a different transclusion file because Marked uses a different syntax to indicate transclusion), and it worked perfectly, which would suggest that the problem is with Composer, but I cannot think of anything; would you have any suggestion?

Thank you for your consideration.

Best regards,
Enrico

  1. Support Staff 1 Posted by Fletcher on 01 Jun, 2019 01:26 AM

    Fletcher's Avatar

    Are you sure that the files do/don't have the file extensions you think they do? Did you do a "Get Info" in the finder to see the actual filenames, and not just the filenames as they are displayed?

  2. 2 Posted by enrico.scarpell... on 01 Jun, 2019 04:01 AM

    enrico.scarpella's Avatar

    Thank you for your prompt response, Fletcher.

    Yes, I am sure: for example, see the attached screenshot of the "Get Info" window for those files, which matches the "File Names" screenshot in my opening post (i.e. extension shown for the first three files and hidden for the fourth one).

    Moreover, as mentioned, the very same files transclude perfectly through Marked 2 by using, in a transclusion file with the Marked 2 transclusion syntax, the very same file names and extensions I had used in the transclusion file I created to transclude through Composer.

    Thank you for your consideration.

    Best regards,
    Enrico

  3. Support Staff 3 Posted by Fletcher on 01 Jun, 2019 10:18 AM

    Fletcher's Avatar

    Brett uses a different transfusion mechanism in Marked, so that doesn’t help figure out what is happening.

    If you can send me the relevant files, I can take a look and see what’s happening.

    Fletcher

    Sent from my iPhone

  4. 4 Posted by enrico.scarpell... on 01 Jun, 2019 01:15 PM

    enrico.scarpella's Avatar

    Thank you for your willingness to look into that, but I can't send you the files: they are of an unpublished manuscript I am working on with collaborators.

    I'll see whether I can recreate the problem with files of scrambled text; if so, I'll get in touch; if not, I'll keep on using Marked for now. Thank you again.

    Best regards,
    Enrico

  5. Support Staff 5 Posted by Fletcher on 01 Jun, 2019 04:42 PM

    Fletcher's Avatar

    I can't replicate it.

    Are you sure that Composer has permission to access all the files? Does the preview work properly? (assuming you have transclusion enabled in the MMD preferences)

  6. 6 Posted by enrico.scarpell... on 01 Jun, 2019 07:52 PM

    enrico.scarpella's Avatar

    Thank you for not giving up.

    For some unknown reason, I can not replicate the issue either: today, everything works just fine, even though I have not changed anything: I have not restarted Composer or the computer; since yesterday, I did quit a few applications, though (e.g., Marked 2, Tinderbox 8, DTPO/DT3 and SublimeText 3). I wondered whether any of those were somehow interfering, so I re-opened them all, but no: file transclusion through Composer still works perfectly... So I am not sure what to say, other than I am sorry for wasting your time. Thank you for bearing with me.

    Best regards,
    Enrico

  7. Support Staff 7 Posted by Fletcher on 01 Jun, 2019 08:01 PM

    Fletcher's Avatar

    No problem -- glad it's working!

    The only things that make any sense to me:

    1. Maybe two of the file extensions were missing early on in the process and got fixed during testing?

    2. A file permission issue related to sandboxing?

    If it happens again, let me know and we'll try again.

    Fletcher

    --
    Fletcher T. Penney
    Manager, Founder
    MultiMarkdown Software, LLC
    [email blocked]

  8. 8 Posted by enrico.scarpell... on 01 Jun, 2019 09:00 PM

    enrico.scarpella's Avatar

    Thank you very much again for your help and support and for your availability!

    Best regards,
    Enrico

  9. 9 Posted by enrico.scarpell... on 22 Jun, 2019 07:01 PM

    enrico.scarpella's Avatar

    Dear Fletcher,

    A quick note just to let you know that the problem with file transclusion I described above continues to happen, albeit intermittently. I don't know if it helps to diagnose the issue, but I find it is solved by opening in MMD Composer all the files that need to be transcluded before launching the command "New file from transclusion". It works, but it's inconvenient when I am working with >50 files that need to be transcluded, so I was wondering whether you had any suggestions. Thank you for your consideration.

    Best regards,
    Enrico

  10. Support Staff 10 Posted by Fletcher on 23 Jun, 2019 01:07 PM

    Fletcher's Avatar

    Enrico,

    Sorry it's still causing you trouble.

    It sounds like a sandboxing issue. Are the files being transcluded in the same folder as the master file (or in a subfolder?)

    Is the preview pane enabled? If not, make sure to toggle it on to see if that asks for permission.

    You can try moving the document and all transcluded files to the Downloads folder (Composer has permission to read files in that folder)

    If none of that works, you can try deleting the preferences to see if that resets the permissions settings -- Composer should ask again for access.

    Let me know if that works.

    Fletcher

    --
    Fletcher T. Penney
    Manager, Founder
    MultiMarkdown Software, LLC
    [email blocked]

  11. 11 Posted by enrico.scarpell... on 23 Jun, 2019 06:41 PM

    enrico.scarpella's Avatar

    Dear Fletcher,

    Thank you very much for your prompt and helpful reply.

    Sorry it's still causing you trouble.

    No need to apologize, please: this is a minor inconvenience, more than compensated by the joy of using MMD Composer, which is the only app I use to write.

    It sounds like a sandboxing issue. Are the files being transcluded in the same folder as the master file (or in a subfolder?)

    Yes, they are all in the same folder.

    Is the preview pane enabled? If not, make sure to toggle it on to see if that asks for permission.

    No, it isn't, so I've now tried the following with three different groups of files to be transcluded -- each group in their own folder. For each of the three groups, I've tried to "Transclude to a new file", but for all of them the resulting file was only partly correct -- same problem as in my opening post. However, when I enabled the preview, two of them showed me a perfect preview of the transcluded files and the third asked me for permission to do it; after granting the permission, it too showed me a perfect preview of the transcluded files. And now, for all the three groups of files to be transcluded, the function "Transclude to a new file" produced a perfect transclusion of all the files. I am not sure why permission was asked only in one of the three cases, but it seems that in all of them, enabling the preview did the trick.

    I would like to take advantage of this opportunity to thank you for the "Open Folder" option: I use it all the time when I write manuscripts: I write their different parts in separate .md files; all the files are in the same folder; and when I need to submit to co-authors or journals, I just create a file of the whole manuscript by means of transclusion.

    Finally, I have an unrelated feature request, if I may, that would enhance even more the usefulness of the app: the possibility to style keywords of choice -- for example, the word "Figure" or "Table": by styling them differently from the rest of the text, I would be able to readily notice whether I had refer to them in the correct order in the text. I suspect this is not as easy to do as it is to ask, and my needs may very well be niche ones, so I suspect such a feature will never be implemented, but I thought I could do no harm by asking... In any case, thank you very much for your consideration.

    Best regards,
    Enrico

  12. Support Staff 12 Posted by Fletcher on 26 Jun, 2019 10:51 PM

    Fletcher's Avatar

    Enrico,

    Glad it's working!!

    I'm not sure I understand the feature request. You mean unique styling for arbitrary words that the user chooses? I would have to think about that. Since it's not part of MMD, there's not a built-in way to do it, and I'm not sure it really fits the scope of what Composer is.

    Fletcher

  13. 13 Posted by enrico.scarpell... on 27 Jun, 2019 12:22 AM

    enrico.scarpella's Avatar

    Thank you very much for your prompt reply, Fletcher.

    I'm not sure I understand the feature request. You mean unique styling for arbitrary words that the user chooses?

    Yes, that's exactly what I meant.

    I would have to think about that. Since it's not part of MMD, there's not a built-in way to do it, and I'm not sure it really fits the scope of what Composer is.

    I totally understand that, and mine may be a niche need, which I currently take care of in BBEdit with a custom Codeless Language Module; I just thought it would be great if it could be integrated in Composer, so that I could do everything I need to do in a single app. But because I use Composer as a "writing app" to write manuscripts, I realize I perhaps use it in a non-orthodox way, and, again, I understand if my request cannot be taken into account because it deviates too much from the philosophy of the app.

    Best regards,
    Enrico

  14. Support Staff 14 Posted by Fletcher on 27 Jun, 2019 10:07 PM

    Fletcher's Avatar

    Composer is designed as a writing app, and people use it for writing
    everything from short notes to textbooks and novels.

    But it is centered on writing in Markdown/MultiMarkdown, so that drives
    most of my decision-making about what features to include or not include.

    F-

  15. 15 Posted by enrico.scarpell... on 27 Jun, 2019 10:28 PM

    enrico.scarpella's Avatar

    Thank you for the clarification, Fletcher. I completely understand and respect your motivations; I hope I did not insulted you by asking. Thank you for listening.

    Best regards,
    Enrico

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • Transclusion_FIle.png 297 KB
  • Transcluded_File.png 1.27 MB
  • File_Names.png 254 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac