Skip to content

Restore gptel-mode in chat buffers #491

Closed
@metachip

Description

@metachip

When chat buffer is saved to a file, gptel prepends a properties drawer to capture the metadata for the chat. When the chat buffer is reopened, the mode will be org mode or markdown or whatever, based on the file suffix (presuming one save it that way). However, when opening a saved chat buffer, I generally want it to automatically be opened in gptel-mode.

If a mode line does not yet exist in the buffer, why not add one just before the PROPERTIES drawer when saving the chat buffer as follows:

# -*- eval: (gptel-mode 1) -*-

This would ensure that the newly reopened chat buffer would be automatically opened in gptel-mode. This has another benefit as the content of the saved chat shows the purpose of the file which would otherwise only known by way of the file suffix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions