branch: externals/ellama commit 4b6e3e34df444630017c3ead822a9405becb2b3e Merge: a5bea6db68 3ea615b952 Author: Sergey Kostyaev <s-kosty...@users.noreply.github.com> Commit: GitHub <nore...@github.com>
Merge pull request #302 from s-kostyaev/add-info-manual Add manual generation functionality for Ellama --- .gitignore | 1 + NEWS.org | 11 + README.org | 908 +++++++++++++++++++++++++----------- doclicense.texi | 505 ++++++++++++++++++++ ellama-manual.el | 118 +++++ ellama.el | 10 +- ellama.info | 1348 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 2619 insertions(+), 282 deletions(-) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..f825bf3c9a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +ellama.texi diff --git a/NEWS.org b/NEWS.org index 7974f28d1c..5bb5eec10a 100644 --- a/NEWS.org +++ b/NEWS.org @@ -1,3 +1,14 @@ +* Version 1.7.0 +- Added manual generation functionality for Ellama, including a new .gitignore + entry to exclude ellama.texi, created ellama-manual.el for exporting an info + manual from the README, and added the file ellama.info. +- Added the GNU Free Documentation License (FDL) text to README.org and updated + ellama-manual.el to include FDL information ensuring compliance with FDL + requirements. Added GNU Free Documentation License document to the project, + ensuring that manuals remain free in terms of freedom to copy, distribute, and + modify. +- Refactored the marker creation logic in ellama.el to use copy-marker for both + beg-marker and end-marker, reducing redundancy and improving readability. * Version 1.6.2 - Fix marker handling in block processing to correctly handle block boundaries during text processing and updated tests to include inline code translation diff --git a/README.org b/README.org index ba82ee2bec..eb46b331f6 100644 --- a/README.org +++ b/README.org @@ -1,5 +1,3 @@ -* Ellama - [[http://www.gnu.org/licenses/gpl-3.0.txt][file:https://img.shields.io/badge/license-GPL_3-green.svg]] [[https://melpa.org/#/ellama][file:https://melpa.org/packages/ellama-badge.svg]] [[https://stable.melpa.org/#/ellama][file:https://stable.melpa.org/packages/ellama-badge.svg]] @@ -16,7 +14,7 @@ The name "ellama" is derived from "Emacs Large LAnguage Model Assistant". Previous sentence was written by Ellama itself. [[file:imgs/reasoning-models.gif]] -** Installation +* Installation Just ~M-x~ ~package-install~ @@html:<kbd>@@Enter@@html:</kbd>@@ ~ellama~ @@html:<kbd>@@Enter@@html:</kbd>@@. By default it uses [[https://github.com/jmorganca/ollama][ollama]] @@ -34,7 +32,7 @@ You can customize ellama configuration like this: #+BEGIN_SRC emacs-lisp (use-package ellama :ensure t - :bind ("C-c e" . ellama-transient-main-menu) + :bind ("C-c e" . ellama) ;; send last message in chat buffer with C-c C-c :hook (org-ctrl-c-ctrl-c-final . ellama-chat-send-last-message) :init (setopt ellama-auto-scroll t) @@ -50,7 +48,7 @@ More sofisticated configuration example: #+BEGIN_SRC emacs-lisp (use-package ellama :ensure t - :bind ("C-c e" . ellama-transient-main-menu) + :bind ("C-c e" . ellama) ;; send last message in chat buffer with C-c C-c :hook (org-ctrl-c-ctrl-c-final . ellama-chat-send-last-message) :init @@ -123,239 +121,108 @@ More sofisticated configuration example: (advice-add 'end-of-buffer :after #'ellama-enable-scroll)) #+END_SRC -** Commands - -*** ellama-chat - -Ask Ellama about something by entering a prompt in an interactive -buffer and continue conversation. If called with universal argument -(~C-u~) will start new session with llm model interactive selection. -[[imgs/ellama-ask.gif]] - -*** ellama-write - -This command allows you to generate text using an LLM. When called -interactively, it prompts for an instruction that is then used to -generate text based on the context. If a region is active, the -selected text is added to the context before generating the response. - -*** ellama-chat-send-last-message - -Send last user message extracted from current ellama chat buffer. - -*** ellama-ask-about - -Ask Ellama about a selected region or the current buffer. -[[imgs/ellama-ask-about.gif]] - -*** ellama-ask-selection - -Send selected region or current buffer to ellama chat. - -*** ellama-ask-line - -Send current line to ellama chat. - -*** ellama-complete - -Complete text in current buffer with ellama. - -*** ellama-translate - -Ask Ellama to translate a selected region or word at the point. -[[imgs/ellama-translate.gif]] - -*** ellama-translate-buffer - -Translate current buffer. - -*** ellama-define-word - -Find the definition of the current word using Ellama. -[[imgs/ellama-define-word.gif]] - -*** ellama-summarize - -Summarize a selected region or the current buffer using Ellama. -[[imgs/ellama-summarize.gif]] - -*** ellama-summarize-killring - -Summarize text from the kill ring. - -*** ellama-code-review - -Review code in a selected region or the current buffer using Ellama. -[[imgs/ellama-code-review.gif]] - -*** ellama-change - -Change text in a selected region or the current buffer according to a -provided change. - -*** ellama-make-list - -Create a markdown list from the active region or the current buffer using Ellama. - -*** ellama-make-table - -Create a markdown table from the active region or the current buffer using Ellama. - -*** ellama-summarize-webpage - -Summarize a webpage fetched from a URL using Ellama. - -*** ellama-provider-select - -Select ellama provider. - -*** ellama-code-complete - -Complete selected code or code in the current buffer according to a -provided change using Ellama. - -*** ellama-code-add - -Generate and insert new code based on description. This function -prompts the user to describe the code they want to generate. If a -region is active, it includes the selected text as context for code -generation. -[[file:imgs/writing-code.gif]] - -*** ellama-code-edit - -Change selected code or code in the current buffer according to a -provided change using Ellama. - -*** ellama-code-improve - -Change selected code or code in the current buffer according to a -provided change using Ellama. - -*** ellama-generate-commit-message - -Generate commit message based on diff. - -*** ellama-proofread - -Proofread selected text. - -*** ellama-improve-wording - -Enhance the wording in the currently selected region or buffer using Ellama. - -*** ellama-improve-grammar -Enhance the grammar and spelling in the currently selected region or -buffer using Ellama. -[[imgs/ellama-enhance-grammar-spelling.gif]] - -*** ellama-improve-conciseness - -Make the text of the currently selected region or buffer concise and -simple using Ellama. - -*** ellama-make-format - -Render the currently selected text or the text in the current buffer -as a specified format using Ellama. - -*** ellama-load-session - -Load ellama session from file. - -*** ellama-session-delete - -Delete ellama session. - -*** ellama-session-switch - -Change current active session. - -*** ellama-session-kill - -Select and kill one of active sessions. - -*** ellama-session-rename - -Rename current ellama session. - -*** ellama-context-add-file - -Add file to context. - -*** ellama-context-add-directory - -Add all files in directory to the context. - -*** ellama-context-add-buffer - -Add buffer to context. - -*** ellama-context-add-selection - -Add selected region to context. - -*** ellama-context-add-info-node - -Add info node to context. - -*** ellama-context-reset - -Clear global context. - -*** ellama-manage-context - -Manage the global context. Inside context management buffer you can -see ellama context elements. Availible actions with key bindings: -- *~n~*: Move to the next line. -- *~p~*: Move to the previous line. -- *~q~*: Quit the window. -- *~g~*: Update context management buffer. -- *~a~*: Open the transient context menu for adding new elements. -- *~d~*: Remove the context element at the current point. -- *~RET~*: Preview the context element at the current point. - -*** ellama-preview-context-element-at-point - -Preview ellama context element at point. Works inside ellama context -management buffer. - -*** ellama-remove-context-element-at-point - -Remove ellama context element at point from global context. Works -inside ellama context management buffer. - -*** ellama-chat-translation-enable - -Chat translation enable. - -*** ellama-chat-translation-disable - -Chat translation disable. - -*** ellama-solve-reasoning-problem - -Solve reasoning problem with [[https://arxiv.org/pdf/2406.12442][Abstraction of Thought]] technique. It -uses a chain of multiple messages to LLM and help it to provide much -better answers on reasoning problems. Even small LLMs like [[https://ollama.com/library/phi3][phi3-mini]] -provides much better results on reasoning tasks using AoT. - -*** ellama-solve-domain-specific-problem - -Solve domain specific problem with simple chain. It makes LLMs act -like a professional and adds a planning step. - -*** ellama-community-prompts-select-blueprint - -Select a prompt from the community prompt collection. -The user is prompted to choose a role, and then a -corresponding prompt is inserted into a blueprint buffer. - -*** ellama-community-prompts-update-variables - -Prompt user for values of variables found in current buffer and update them. - -** Keymap +* Commands + +- ~ellama~: This is the entry point for Ellama. It displays the main transient + menu, allowing you to access all other Ellama commands from here. +- ~ellama-chat~: Ask Ellama about something by entering a prompt in an + interactive buffer and continue conversation. If called with universal + argument (~C-u~) will start new session with llm model interactive + selection. +- ~ellama-write~: This command allows you to generate text using an LLM. When + called interactively, it prompts for an instruction that is then used to + generate text based on the context. If a region is active, the selected text + is added to the context before generating the response. +- ~ellama-chat-send-last-message~: Send last user message extracted from + current ellama chat buffer. +- ~ellama-ask-about~: Ask Ellama about a selected region or the current + buffer. +- ~ellama-ask-selection~: Send selected region or current buffer to ellama + chat. +- ~ellama-ask-line~: Send current line to ellama chat. +- ~ellama-complete~: Complete text in current buffer with ellama. +- ~ellama-translate~: Ask Ellama to translate a selected region or word at the + point. +- ~ellama-translate-buffer~: Translate current buffer. +- ~ellama-define-word~: Find the definition of the current word using Ellama. +- ~ellama-summarize~: Summarize a selected region or the current buffer using + Ellama. +- ~ellama-summarize-killring~: Summarize text from the kill ring. +- ~ellama-code-review~: Review code in a selected region or the current buffer + using Ellama. +- ~ellama-change~: Change text in a selected region or the current buffer + according to a provided change. +- ~ellama-make-list~: Create a markdown list from the active region or the + current buffer using Ellama. +- ~ellama-make-table~: Create a markdown table from the active region or the + current buffer using Ellama. +- ~ellama-summarize-webpage~: Summarize a webpage fetched from a URL using + Ellama. +- ~ellama-provider-select~: Select ellama provider. +- ~ellama-code-complete~: Complete selected code or code in the current buffer + according to a provided change using Ellama. +- ~ellama-code-add~: Generate and insert new code based on description. This + function prompts the user to describe the code they want to generate. If a + region is active, it includes the selected text as context for code + generation. +- ~ellama-code-edit~: Change selected code or code in the current buffer + according to a provided change using Ellama. +- ~ellama-code-improve~: Change selected code or code in the current buffer + according to a provided change using Ellama. +- ~ellama-generate-commit-message~: Generate commit message based on diff. +- ~ellama-proofread~: Proofread selected text. +- ~ellama-improve-wording~: Enhance the wording in the currently selected + region or buffer using Ellama. +- ~ellama-improve-grammar~: Enhance the grammar and spelling in the currently + selected region or buffer using Ellama. +- ~ellama-improve-conciseness~: Make the text of the currently selected region + or buffer concise and simple using Ellama. +- ~ellama-make-format~: Render the currently selected text or the text in the + current buffer as a specified format using Ellama. +- ~ellama-load-session~: Load ellama session from file. +- ~ellama-session-delete~: Delete ellama session. +- ~ellama-session-switch~: Change current active session. +- ~ellama-session-kill~: Select and kill one of active sessions. +- ~ellama-session-rename~: Rename current ellama session. +- ~ellama-context-add-file~: Add file to context. +- ~ellama-context-add-directory~: Add all files in directory to the context. +- ~ellama-context-add-buffer~: Add buffer to context. +- ~ellama-context-add-selection~: Add selected region to context. +- ~ellama-context-add-info-node~: Add info node to context. +- ~ellama-context-reset~: Clear global context. +- ~ellama-manage-context~: Manage the global context. Inside context + management buffer you can see ellama context elements. Available actions + with key bindings: + - ~n~: Move to the next line. + - ~p~: Move to the previous line. + - ~q~: Quit the window. + - ~g~: Update context management buffer. + - ~a~: Open the transient context menu for adding new elements. + - ~d~: Remove the context element at the current point. + - ~RET~: Preview the context element at the current point. +- ~ellama-preview-context-element-at-point~: Preview ellama context element at + point. Works inside ellama context management buffer. +- ~ellama-remove-context-element-at-point~: Remove ellama context element at + point from global context. Works inside ellama context management buffer. +- ~ellama-chat-translation-enable~: Chat translation enable. +- ~ellama-chat-translation-disable~: Chat translation disable. +- ~ellama-solve-reasoning-problem~: Solve reasoning problem with Abstraction + of Thought technique. It uses a chain of multiple messages to LLM and help + it to provide much better answers on reasoning problems. Even small LLMs + like phi3-mini provides much better results on reasoning tasks using AoT. +- ~ellama-solve-domain-specific-problem~: Solve domain specific problem with + simple chain. It makes LLMs act like a professional and adds a planning + step. +- ~ellama-community-prompts-select-blueprint~: Select a prompt from the + community prompt collection. The user is prompted to choose a role, and then + a corresponding prompt is inserted into a blueprint buffer. +- ~ellama-community-prompts-update-variables~: Prompt user for values of + variables found in current buffer and update them. + +* Keymap + +It's better to use a transient menu (~M-x ellama~) instead of a keymap. It +offers a better user experience. In any buffer where there is active ellama streaming, you can press ~C-g~ and it will cancel current stream. @@ -404,7 +271,7 @@ Ellama, using the ~ellama-keymap-prefix~ prefix (not set by default): | "x r" | ellama-context-reset | Context reset | | "p s" | ellama-provider-select | Provider select | -** Configuration +* Configuration The following variables can be customized for the Ellama client: @@ -488,15 +355,43 @@ argument generated text string. - ~ellama-reasoning-display-action-function~: Display action function for reasoning. - ~ellama-session-line-template~: Template for formatting the current session line. -** Minor modes - -*** ellama-context-header-line-mode - -*Description:* +* Minor modes + +The Ellama package for Emacs offers a suite of minor modes designed to enhance +the user experience by providing context-specific information directly within +the editor's interface. These minor modes focus on updating both the header line +and mode line with relevant details, making it easier to manage and navigate +multiple sessions and buffers. + +Key features include: + +- Context Header Line Modes: ~ellama-context-header-line-mode~ and its global + counterpart, ~ellama-context-header-line-global-mode~, update the header line + to display what elements are added to the global Ellama context. This is + particularly useful for keeping track of what information is currently in + context. +- Context Mode Line Modes: Similarly, ~ellama-context-mode-line-mode~ and + ~ellama-context-mode-line-global-mode~ provide information about the + current global context directly within the mode line, ensuring that users + always have relevant information at a glance. +- Session Header Line Mode: ~ellama-session-header-line-mode~ and its global + version display the current Ellama session ID in the header line, helping + users manage multiple sessions efficiently. +- Session Mode Line Mode: ~ellama-session-mode-line-mode~ and its global + counterpart offer an additional way to track session IDs by displaying them + in the mode line. + +These minor modes are easily toggled on or off using specific commands, +providing flexibility for users who may want to enable these features globally +across all buffers or selectively within individual buffers. + +** ellama-context-header-line-mode + +Description: Toggle the Ellama Context header line mode. This minor mode updates the header line to display context-specific information. -*Usage:* +Usage: To enable or disable ~ellama-context-header-line-mode~, use the command: M-x ellama-context-header-line-mode @@ -508,13 +403,13 @@ line with context-specific information. When disabled, it removes the evaluation of ~(:eval (ellama-context-line))~ from ~header-line-format~. -*** ellama-context-header-line-global-mode +** ellama-context-header-line-global-mode -*Description:* +Description: Globalized version of ~ellama-context-header-line-mode~. This mode ensures that ~ellama-context-header-line-mode~ is enabled in all buffers. -*Usage:* +Usage: To enable or disable ~ellama-context-header-line-global-mode~, use the command: M-x ellama-context-header-line-global-mode @@ -522,13 +417,13 @@ To enable or disable ~ellama-context-header-line-global-mode~, use the command: This globalized minor mode provides a convenient way to ensure that context-specific header line information is always available, regardless of the buffer being edited. -*** ellama-context-mode-line-mode +** ellama-context-mode-line-mode -*Description:* +Description: Toggle the Ellama Context mode line mode. This minor mode updates the mode line to display context-specific information. -*Usage:* +Usage: To enable or disable ~ellama-context-mode-line-mode~, use the command: M-x ellama-context-mode-line-mode @@ -541,13 +436,13 @@ context-specific information. When disabled, it removes the evaluation of ~(:eval (ellama-context-line))~ from ~mode-line-format~. -*** ellama-context-mode-line-global-mode +** ellama-context-mode-line-global-mode -*Description:* +Description: Globalized version of ~ellama-context-mode-line-mode~. This mode ensures that ~ellama-context-mode-line-mode~ is enabled in all buffers. -*Usage:* +Usage: To enable or disable ~ellama-context-mode-line-global-mode~, use the command: M-x ellama-context-mode-line-global-mode @@ -556,14 +451,14 @@ This globalized minor mode provides a convenient way to ensure that context-specific mode line information is always available, regardless of the buffer being edited. -*** Ellama Session Header Line Mode +** Ellama Session Header Line Mode The ~ellama-session-header-line-mode~ is a minor mode that allows you to display the current Ellama session ID in the header line of your Emacs buffers. This feature helps keep track of which session you are working with, especially useful when managing multiple sessions. -**** Enabling and Disabling +*** Enabling and Disabling To enable this mode, use the following command: #+BEGIN_SRC emacs-lisp @@ -576,19 +471,19 @@ enable or disable it globally across all buffers using: M-x ellama-session-header-line-global-mode #+END_SRC -**** Customization +*** Customization The session ID is displayed with a customizable face called ~ellama-face~. You can customize this face to change its appearance. -*** Ellama Session Mode Line Mode +** Ellama Session Mode Line Mode The ~ellama-session-mode-line-mode~ is a minor mode that allows you to display the current Ellama session ID in the mode line of your Emacs buffers. This feature provides an additional way to keep track of which session you are working with, especially useful when managing multiple sessions. -**** Enabling and Disabling +*** Enabling and Disabling To enable this mode, use the following command: #+BEGIN_SRC emacs-lisp @@ -601,53 +496,53 @@ enable or disable it globally across all buffers using: M-x ellama-session-mode-line-global-mode #+END_SRC -**** Customization +*** Customization The session ID is displayed with a customizable face called ~ellama-face~. You can customize this face to change its appearance. -** Using Blueprints +* Using Blueprints Blueprints in Ellama refer to predefined templates or structures that facilitate the creation and management of chat sessions. These blueprints are designed to streamline the process of generating consistent and high-quality outputs by providing a structured framework for interactions. -*** Key Components of Ellama Blueprints +** Key Components of Ellama Blueprints -1. *Act*: This is the primary identifier for a blueprint, representing the +1. Act: This is the primary identifier for a blueprint, representing the action or purpose of the blueprint. -2. *Prompt*: The content that will be used to initiate the chat session. This +2. Prompt: The content that will be used to initiate the chat session. This can include instructions, context, or any other relevant information needed to guide the conversation. -3. *For Developers*: A flag indicating whether the blueprint is intended for +3. For Developers: A flag indicating whether the blueprint is intended for developers. -*** Creating and Managing Blueprints +** Creating and Managing Blueprints Ellama provides several functions to create, select, and manage blueprints: -- *~ellama-blueprint-create~*: This function allows users to create a new +- ~ellama-blueprint-create~: This function allows users to create a new blueprint from the current buffer. It prompts for a name and whether the blueprint is for developers, then saves the content of the current buffer as the prompt. -- *~ellama-blueprint-new~*: This function creates a new buffer for a blueprint, +- ~ellama-blueprint-new~: This function creates a new buffer for a blueprint, optionally inserting the content of the current region if active. -- *~ellama-blueprint-select~*: This function allows users to select a prompt +- ~ellama-blueprint-select~: This function allows users to select a prompt from the collection of blueprints. It filters prompts based on whether they are for developers and their source (user-defined, community, or all). -*** Variable Management +** Variable Management Blueprints can include variables that need to be filled before running the chat session. Ellama provides command to fill these variables: -- *~ellama-blueprint-fill-variables~*: Prompts the user to enter values for +- ~ellama-blueprint-fill-variables~: Prompts the user to enter values for variables found in the current buffer and fills them. -*** Keymap and Mode +** Keymap and Mode Ellama provides a local keymap ~ellama-blueprint-mode-map~ for managing blueprints within buffers. The mode includes key bindings for sending the buffer @@ -665,7 +560,7 @@ When in ~ellama-blueprint-mode~, the following keybindings are available: - ~C-c c~: Create a blueprint from the current buffer. - ~C-c v~: Fill variables in the current blueprint. -*** Transient Menus +** Transient Menus Ellama includes transient menus for easy access to blueprint commands. The ~ellama-transient-blueprint-menu~ provides options for chatting with a selected @@ -674,7 +569,7 @@ blueprint, creating a new blueprint, and quitting the menu. The ~ellama-transient-main-menu~ integrates the blueprint menu into the main menu, providing a comprehensive interface for all Ellama commands. -*** Running Blueprints programmatically +** Running Blueprints programmatically The ~ellama-blueprint-run~ function initiates a chat session using a specified blueprint. It pre-fills variables based on the provided arguments. @@ -688,7 +583,7 @@ blueprint. It pre-fills variables based on the provided arguments. (global-set-key (kbd "C-c e M") #'my-chat-with-morpheus) #+END_SRC -** Acknowledgments +* Acknowledgments Thanks [[https://github.com/jmorganca][Jeffrey Morgan]] for excellent project [[https://github.com/jmorganca/ollama][ollama]]. This project cannot exist without it. @@ -707,3 +602,466 @@ To contribute, submit a pull request or report a bug. This library is part of GNU ELPA; major contributions must be from someone with FSF papers. Alternatively, you can write a module and share it on a different archive like MELPA. + +* GNU Free Documentation License +:PROPERTIES: +:APPENDIX: t +:END: + +#+texinfo: @include doclicense.texi + +#+begin_export html +<pre> + + GNU Free Documentation License + Version 1.3, 3 November 2008 + + + Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + <https://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of +the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no +other conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to +give them a chance to provide you with an updated version of the +Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other +documents released under this License, and replace the individual +copies of this License in the various documents with a single copy +that is included in the collection, provided that you follow the rules +of this License for verbatim copying of each of the documents in all +other respects. + +You may extract a single document from such a collection, and +distribute it individually under this License, provided you insert a +copy of this License into the extracted document, and follow this +License in all other respects regarding verbatim copying of that +document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the +GNU Free Documentation License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in +detail to address new problems or concerns. See +https://www.gnu.org/licenses/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +"Massive Multiauthor Collaboration" (or "MMC") contained in the site +means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in +part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole or +in part into the MMC, (1) had no cover texts or invariant sections, and +(2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. +</pre> +#+end_export diff --git a/doclicense.texi b/doclicense.texi new file mode 100644 index 0000000000..eaf3da0e92 --- /dev/null +++ b/doclicense.texi @@ -0,0 +1,505 @@ +@c The GNU Free Documentation License. +@center Version 1.3, 3 November 2008 + +@c This file is intended to be included within another document, +@c hence no sectioning command or @node. + +@display +Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. +@uref{https://fsf.org/} + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +@end display + +@enumerate 0 +@item +PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document @dfn{free} in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of ``copyleft'', which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + +@item +APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A ``Modified Version'' of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A ``Secondary Section'' is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The ``Invariant Sections'' are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The ``Cover Texts'' are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A ``Transparent'' copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, La@TeX{} input +format, SGML or XML using a publicly available +DTD, and standard-conforming simple HTML, +PostScript or PDF designed for human modification. Examples +of transparent image formats include PNG, XCF and +JPG@. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, SGML or +XML for which the DTD and/or processing tools are +not generally available, and the machine-generated HTML, +PostScript or PDF produced by some word processors for +output purposes only. + +The ``Title Page'' means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, ``Title Page'' means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +The ``publisher'' means any person or entity that distributes copies +of the Document to the public. + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + +@item +VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + +@item +COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + +@item +MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +@enumerate A +@item +Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +@item +List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. + +@item +State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +@item +Preserve all the copyright notices of the Document. + +@item +Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +@item +Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +@item +Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document's license notice. + +@item +Include an unaltered copy of this License. + +@item +Preserve the section Entitled ``History'', Preserve its Title, and add +to it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section Entitled ``History'' in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +@item +Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the ``History'' section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +@item +For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. + +@item +Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +@item +Delete any section Entitled ``Endorsements''. Such a section +may not be included in the Modified Version. + +@item +Do not retitle any existing section to be Entitled ``Endorsements'' or +to conflict in title with any Invariant Section. + +@item +Preserve any Warranty Disclaimers. +@end enumerate + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled ``Endorsements'', provided it contains +nothing but endorsements of your Modified Version by various +parties---for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + +@item +COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all +sections Entitled ``Endorsements.'' + +@item +COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + +@item +AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + +@item +TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + +@item +TERMINATION + +You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. + +@item +FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +@uref{https://www.gnu.org/licenses/}. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy's public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. + +@item +RELICENSING + +``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the +site means any set of copyrightable works thus published on the MMC +site. + +``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. + +``Incorporate'' means to publish or republish a Document, in whole or +in part, as part of another Document. + +An MMC is ``eligible for relicensing'' if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. + +@end enumerate + +@page +@heading ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +@smallexample +@group + Copyright (C) @var{year} @var{your name}. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +@end group +@end smallexample + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with@dots{}Texts.''@: line with this: + +@smallexample +@group + with the Invariant Sections being @var{list their titles}, with + the Front-Cover Texts being @var{list}, and with the Back-Cover Texts + being @var{list}. +@end group +@end smallexample + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +@c Local Variables: +@c ispell-local-pdict: "ispell-dict" +@c End: diff --git a/ellama-manual.el b/ellama-manual.el new file mode 100644 index 0000000000..c4a843ea3c --- /dev/null +++ b/ellama-manual.el @@ -0,0 +1,118 @@ +;;; ellama-manual.el --- Working with ellama info manual -*- lexical-binding: t; package-lint-main-file: "ellama.el"; -*- + +;; Copyright (C) 2023-2025 Free Software Foundation, Inc. + +;; Author: Sergey Kostyaev <sskosty...@gmail.com> +;; SPDX-License-Identifier: GPL-3.0-or-later + +;; This file is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: +;; +;; Ellama is a tool for interacting with large language models from Emacs. +;; It allows you to ask questions and receive responses from the +;; LLMs. Ellama can perform various tasks such as translation, code +;; review, summarization, enhancing grammar/spelling or wording and +;; more through the Emacs interface. Ellama natively supports streaming +;; output, making it effortless to use with your preferred text editor. +;; + +;;; Code: + +(defvar org-export-with-broken-links) + +;;;###autoload +(defun ellama-manual-export () + "Create info manual from readme." + (interactive) + (declare-function org-export-to-file "ox") + (declare-function org-texinfo-compile "ox-texinfo") + (declare-function project-root "project") + (declare-function project-current "project") + (require 'ox-texinfo) + (let* ((org-export-with-broken-links t) + (version (with-current-buffer (find-file-noselect + (file-name-concat + (project-root (project-current)) + "ellama.el")) + (save-excursion + (goto-char (point-min)) + (re-search-forward ";; Version: \\([0-9\\.]+\\)") + (match-string 1)))) + (buf (find-file-noselect + (file-name-concat + (project-root (project-current)) + "README.org"))) + (content (with-current-buffer buf + (buffer-string)))) + (with-temp-buffer + (org-mode) + (insert + (format "#+TITLE: Ellama manual +#+SUBTITLE: for version {{{version}}} +#+AUTHOR: Sergey Kostyaev + +#+OPTIONS: ':t toc:t author:t compact-itemx:t nodetailmenu:t +#+LANGUAGE: en + +#+MACRO: version %s + +#+TEXINFO_FILENAME: ellama.info +#+TEXINFO_HEADER: @paragraphindent none + +#+TEXINFO_DIR_CATEGORY: Emacs misc features +#+TEXINFO_DIR_TITLE: Ellama: (ellama) +#+TEXINFO_DIR_NAME: Ellama +#+TEXINFO_DIR_DESC: Tool for interaction with large language models. +#+TEXINFO_PRINTED_TITLE: Ellama manual + +#+texinfo: @insertcopying + +* COPYING +:PROPERTIES: +:COPYING: t +:END: + +Copyright (C) 2023-2025 Free Software Foundation, Inc. + +#+begin_quote +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover Texts being “A GNU Manual,” and +with the Back-Cover Texts as in (a) below. A copy of the license is +included in the section entitled “GNU Free Documentation License.” + +(a) The FSF’s Back-Cover Text is: “You have the freedom to copy and +modify this GNU manual.” +#+end_quote + +" + version)) + (insert content) + ;; remove badges + (goto-char (point-min)) + (while (re-search-forward "\\[\\[.+?\\]\\[.+?\\.svg\\]\\]\\n?" nil t) + (replace-match "")) + ;; remove images + (goto-char (point-min)) + (while (re-search-forward "\\[\\[.+?\\.gif\\]\\]\\n?" nil t) + (replace-match "")) + (org-export-to-file + 'texinfo "ellama.texi" + nil nil nil nil nil + #'org-texinfo-compile)))) + +(provide 'ellama-manual) +;;; ellama-manual.el ends here. diff --git a/ellama.el b/ellama.el index dff74191a3..8832ec6d14 100644 --- a/ellama.el +++ b/ellama.el @@ -6,7 +6,7 @@ ;; URL: http://github.com/s-kostyaev/ellama ;; Keywords: help local tools ;; Package-Requires: ((emacs "28.1") (llm "0.24.0") (plz "0.8") (transient "0.7") (compat "29.1")) -;; Version: 1.6.2 +;; Version: 1.7.0 ;; SPDX-License-Identifier: GPL-3.0-or-later ;; Created: 8th Oct 2023 @@ -1206,14 +1206,10 @@ FILTER is a function for text transformation." (declare-function org-fill-paragraph "org") (with-current-buffer buffer - (let* ((beg-marker (make-marker)) - (end-marker (make-marker)) + (let* ((end-marker (copy-marker (or point (point)) t)) + (beg-marker (copy-marker end-marker nil)) (previous-filtered-text "") (safe-common-prefix "")) - (set-marker end-marker (or point (point))) - (set-marker beg-marker end-marker) - (set-marker-insertion-type end-marker t) - (set-marker-insertion-type beg-marker nil) (lambda (text) (with-current-buffer buffer diff --git a/ellama.info b/ellama.info new file mode 100644 index 0000000000..be632e4302 --- /dev/null +++ b/ellama.info @@ -0,0 +1,1348 @@ +This is ellama.info, produced by makeinfo version 7.1 from ellama.texi. + +Copyright (C) 2023-2025 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, with the Front-Cover Texts + being “A GNU Manual,” and with the Back-Cover Texts as in (a) + below. A copy of the license is included in the section entitled + “GNU Free Documentation License.” + + (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and + modify this GNU manual.” + +Ellama is a tool for interacting with large language models from Emacs. +It allows you to ask questions and receive responses from the LLMs. +Ellama can perform various tasks such as translation, code review, +summarization, enhancing grammar/spelling or wording and more through +the Emacs interface. Ellama natively supports streaming output, making +it effortless to use with your preferred text editor. + +The name "ellama" is derived from "Emacs Large LAnguage Model +Assistant". Previous sentence was written by Ellama itself. +INFO-DIR-SECTION Emacs misc features +START-INFO-DIR-ENTRY +* Ellama: (ellama). Tool for interaction with large language models. +END-INFO-DIR-ENTRY + + +File: ellama.info, Node: Top, Next: Installation, Up: (dir) + +Ellama manual +************* + +Copyright (C) 2023-2025 Free Software Foundation, Inc. + + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.3 or any later version published by the Free Software + Foundation; with no Invariant Sections, with the Front-Cover Texts + being “A GNU Manual,” and with the Back-Cover Texts as in (a) + below. A copy of the license is included in the section entitled + “GNU Free Documentation License.” + + (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and + modify this GNU manual.” + +Ellama is a tool for interacting with large language models from Emacs. +It allows you to ask questions and receive responses from the LLMs. +Ellama can perform various tasks such as translation, code review, +summarization, enhancing grammar/spelling or wording and more through +the Emacs interface. Ellama natively supports streaming output, making +it effortless to use with your preferred text editor. + +The name "ellama" is derived from "Emacs Large LAnguage Model +Assistant". Previous sentence was written by Ellama itself. + +* Menu: + +* Installation:: +* Commands:: +* Keymap:: +* Configuration:: +* Minor modes:: +* Using Blueprints:: +* Acknowledgments:: +* Contributions:: +* GNU Free Documentation License:: + +-- The Detailed Node Listing -- + +Minor modes + +* ellama-context-header-line-mode:: +* ellama-context-header-line-global-mode:: +* ellama-context-mode-line-mode:: +* ellama-context-mode-line-global-mode:: +* Ellama Session Header Line Mode:: +* Ellama Session Mode Line Mode:: + +Ellama Session Header Line Mode + +* Enabling and Disabling:: +* Customization:: + +Ellama Session Mode Line Mode + +* Enabling and Disabling: Enabling and Disabling (1). +* Customization: Customization (1). + +Using Blueprints + +* Key Components of Ellama Blueprints:: +* Creating and Managing Blueprints:: +* Variable Management:: +* Keymap and Mode:: +* Transient Menus:: +* Running Blueprints programmatically:: + + + +File: ellama.info, Node: Installation, Next: Commands, Prev: Top, Up: Top + +1 Installation +************** + +Just ‘M-x’ ‘package-install’ Enter ‘ellama’ Enter. By default it uses +ollama (https://github.com/jmorganca/ollama) provider. If you ok with +it, you need to install ollama (https://github.com/jmorganca/ollama) and +pull any ollama model (https://ollama.com/models) like this: + + ollama pull qwen2.5:3b + +You can use ‘ellama’ with other model or other llm provider. Without +any configuration, the first available ollama model will be used. You +can customize ellama configuration like this: + + (use-package ellama + :ensure t + :bind ("C-c e" . ellama) + ;; send last message in chat buffer with C-c C-c + :hook (org-ctrl-c-ctrl-c-final . ellama-chat-send-last-message) + :init (setopt ellama-auto-scroll t) + :config + ;; show ellama context in header line in all buffers + (ellama-context-header-line-global-mode +1) + ;; show ellama session id in header line in all buffers + (ellama-session-header-line-global-mode +1)) + +More sofisticated configuration example: + + (use-package ellama + :ensure t + :bind ("C-c e" . ellama) + ;; send last message in chat buffer with C-c C-c + :hook (org-ctrl-c-ctrl-c-final . ellama-chat-send-last-message) + :init + ;; setup key bindings + ;; (setopt ellama-keymap-prefix "C-c e") + ;; language you want ellama to translate to + (setopt ellama-language "German") + ;; could be llm-openai for example + (require 'llm-ollama) + (setopt ellama-provider + (make-llm-ollama + ;; this model should be pulled to use it + ;; value should be the same as you print in terminal during pull + :chat-model "llama3:8b-instruct-q8_0" + :embedding-model "nomic-embed-text" + :default-chat-non-standard-params '(("num_ctx" . 8192)))) + (setopt ellama-summarization-provider + (make-llm-ollama + :chat-model "qwen2.5:3b" + :embedding-model "nomic-embed-text" + :default-chat-non-standard-params '(("num_ctx" . 32768)))) + (setopt ellama-coding-provider + (make-llm-ollama + :chat-model "qwen2.5-coder:3b" + :embedding-model "nomic-embed-text" + :default-chat-non-standard-params '(("num_ctx" . 32768)))) + ;; Predefined llm providers for interactive switching. + ;; You shouldn't add ollama providers here - it can be selected interactively + ;; without it. It is just example. + (setopt ellama-providers + '(("zephyr" . (make-llm-ollama + :chat-model "zephyr:7b-beta-q6_K" + :embedding-model "zephyr:7b-beta-q6_K")) + ("mistral" . (make-llm-ollama + :chat-model "mistral:7b-instruct-v0.2-q6_K" + :embedding-model "mistral:7b-instruct-v0.2-q6_K")) + ("mixtral" . (make-llm-ollama + :chat-model "mixtral:8x7b-instruct-v0.1-q3_K_M-4k" + :embedding-model "mixtral:8x7b-instruct-v0.1-q3_K_M-4k")))) + ;; Naming new sessions with llm + (setopt ellama-naming-provider + (make-llm-ollama + :chat-model "llama3:8b-instruct-q8_0" + :embedding-model "nomic-embed-text" + :default-chat-non-standard-params '(("stop" . ("\n"))))) + (setopt ellama-naming-scheme 'ellama-generate-name-by-llm) + ;; Translation llm provider + (setopt ellama-translation-provider + (make-llm-ollama + :chat-model "qwen2.5:3b" + :embedding-model "nomic-embed-text" + :default-chat-non-standard-params + '(("num_ctx" . 32768)))) + (setopt ellama-extraction-provider (make-llm-ollama + :chat-model "qwen2.5-coder:7b-instruct-q8_0" + :embedding-model "nomic-embed-text" + :default-chat-non-standard-params + '(("num_ctx" . 32768)))) + ;; customize display buffer behaviour + ;; see ~(info "(elisp) Buffer Display Action Functions")~ + (setopt ellama-chat-display-action-function #'display-buffer-full-frame) + (setopt ellama-instant-display-action-function #'display-buffer-at-bottom) + :config + ;; show ellama context in header line in all buffers + (ellama-context-header-line-global-mode +1) + ;; show ellama session id in header line in all buffers + (ellama-session-header-line-global-mode +1) + ;; handle scrolling events + (advice-add 'pixel-scroll-precision :before #'ellama-disable-scroll) + (advice-add 'end-of-buffer :after #'ellama-enable-scroll)) + + +File: ellama.info, Node: Commands, Next: Keymap, Prev: Installation, Up: Top + +2 Commands +********** + + • ‘ellama’: This is the entry point for Ellama. It displays the main + transient menu, allowing you to access all other Ellama commands + from here. + • ‘ellama-chat’: Ask Ellama about something by entering a prompt in + an interactive buffer and continue conversation. If called with + universal argument (‘C-u’) will start new session with llm model + interactive selection. + • ‘ellama-write’: This command allows you to generate text using an + LLM. When called interactively, it prompts for an instruction that + is then used to generate text based on the context. If a region is + active, the selected text is added to the context before generating + the response. + • ‘ellama-chat-send-last-message’: Send last user message extracted + from current ellama chat buffer. + • ‘ellama-ask-about’: Ask Ellama about a selected region or the + current buffer. + • ‘ellama-ask-selection’: Send selected region or current buffer to + ellama chat. + • ‘ellama-ask-line’: Send current line to ellama chat. + • ‘ellama-complete’: Complete text in current buffer with ellama. + • ‘ellama-translate’: Ask Ellama to translate a selected region or + word at the point. + • ‘ellama-translate-buffer’: Translate current buffer. + • ‘ellama-define-word’: Find the definition of the current word using + Ellama. + • ‘ellama-summarize’: Summarize a selected region or the current + buffer using Ellama. + • ‘ellama-summarize-killring’: Summarize text from the kill ring. + • ‘ellama-code-review’: Review code in a selected region or the + current buffer using Ellama. + • ‘ellama-change’: Change text in a selected region or the current + buffer according to a provided change. + • ‘ellama-make-list’: Create a markdown list from the active region + or the current buffer using Ellama. + • ‘ellama-make-table’: Create a markdown table from the active region + or the current buffer using Ellama. + • ‘ellama-summarize-webpage’: Summarize a webpage fetched from a URL + using Ellama. + • ‘ellama-provider-select’: Select ellama provider. + • ‘ellama-code-complete’: Complete selected code or code in the + current buffer according to a provided change using Ellama. + • ‘ellama-code-add’: Generate and insert new code based on + description. This function prompts the user to describe the code + they want to generate. If a region is active, it includes the + selected text as context for code generation. + • ‘ellama-code-edit’: Change selected code or code in the current + buffer according to a provided change using Ellama. + • ‘ellama-code-improve’: Change selected code or code in the current + buffer according to a provided change using Ellama. + • ‘ellama-generate-commit-message’: Generate commit message based on + diff. + • ‘ellama-proofread’: Proofread selected text. + • ‘ellama-improve-wording’: Enhance the wording in the currently + selected region or buffer using Ellama. + • ‘ellama-improve-grammar’: Enhance the grammar and spelling in the + currently selected region or buffer using Ellama. + • ‘ellama-improve-conciseness’: Make the text of the currently + selected region or buffer concise and simple using Ellama. + • ‘ellama-make-format’: Render the currently selected text or the + text in the current buffer as a specified format using Ellama. + • ‘ellama-load-session’: Load ellama session from file. + • ‘ellama-session-delete’: Delete ellama session. + • ‘ellama-session-switch’: Change current active session. + • ‘ellama-session-kill’: Select and kill one of active sessions. + • ‘ellama-session-rename’: Rename current ellama session. + • ‘ellama-context-add-file’: Add file to context. + • ‘ellama-context-add-directory’: Add all files in directory to the + context. + • ‘ellama-context-add-buffer’: Add buffer to context. + • ‘ellama-context-add-selection’: Add selected region to context. + • ‘ellama-context-add-info-node’: Add info node to context. + • ‘ellama-context-reset’: Clear global context. + • ‘ellama-manage-context’: Manage the global context. Inside context + management buffer you can see ellama context elements. Available + actions with key bindings: + • ‘n’: Move to the next line. + • ‘p’: Move to the previous line. + • ‘q’: Quit the window. + • ‘g’: Update context management buffer. + • ‘a’: Open the transient context menu for adding new elements. + • ‘d’: Remove the context element at the current point. + • ‘RET’: Preview the context element at the current point. + • ‘ellama-preview-context-element-at-point’: Preview ellama context + element at point. Works inside ellama context management buffer. + • ‘ellama-remove-context-element-at-point’: Remove ellama context + element at point from global context. Works inside ellama context + management buffer. + • ‘ellama-chat-translation-enable’: Chat translation enable. + • ‘ellama-chat-translation-disable’: Chat translation disable. + • ‘ellama-solve-reasoning-problem’: Solve reasoning problem with + Abstraction of Thought technique. It uses a chain of multiple + messages to LLM and help it to provide much better answers on + reasoning problems. Even small LLMs like phi3-mini provides much + better results on reasoning tasks using AoT. + • ‘ellama-solve-domain-specific-problem’: Solve domain specific + problem with simple chain. It makes LLMs act like a professional + and adds a planning step. + • ‘ellama-community-prompts-select-blueprint’: Select a prompt from + the community prompt collection. The user is prompted to choose a + role, and then a corresponding prompt is inserted into a blueprint + buffer. + • ‘ellama-community-prompts-update-variables’: Prompt user for values + of variables found in current buffer and update them. + + +File: ellama.info, Node: Keymap, Next: Configuration, Prev: Commands, Up: Top + +3 Keymap +******** + +It's better to use a transient menu (‘M-x ellama’) instead of a keymap. +It offers a better user experience. + +In any buffer where there is active ellama streaming, you can press +‘C-g’ and it will cancel current stream. + +Here is a table of keybindings and their associated functions in Ellama, +using the ‘ellama-keymap-prefix’ prefix (not set by default): + +Keymap Function Description +-------------------------------------------------------------------------- +"w" ellama-write Write +"c c" ellama-code-complete Code complete +"c a" ellama-code-add Code add +"c e" ellama-code-edit Code edit +"c i" ellama-code-improve Code improve +"c r" ellama-code-review Code review +"c m" ellama-generate-commit-message Generate commit message +"s s" ellama-summarize Summarize +"s w" ellama-summarize-webpage Summarize webpage +"s c" ellama-summarize-killring Summarize killring +"s l" ellama-load-session Session Load +"s r" ellama-session-rename Session rename +"s d" ellama-session-delete Delete delete +"s a" ellama-session-switch Session activate +"P" ellama-proofread Proofread +"i w" ellama-improve-wording Improve wording +"i g" ellama-improve-grammar Improve grammar and spelling +"i c" ellama-improve-conciseness Improve conciseness +"m l" ellama-make-list Make list +"m t" ellama-make-table Make table +"m f" ellama-make-format Make format +"a a" ellama-ask-about Ask about +"a i" ellama-chat Chat (ask interactively) +"a l" ellama-ask-line Ask current line +"a s" ellama-ask-selection Ask selection +"t t" ellama-translate Text translate +"t b" ellama-translate-buffer Translate buffer +"t e" ellama-chat-translation-enable Translation enable +"t d" ellama-chat-translation-disable Translation disable +"t c" ellama-complete Text complete +"d w" ellama-define-word Define word +"x b" ellama-context-add-buffer Context add buffer +"x f" ellama-context-add-file Context add file +"x d" ellama-context-add-directory Context add directory +"x s" ellama-context-add-selection Context add selection +"x i" ellama-context-add-info-node Context add info node +"x r" ellama-context-reset Context reset +"p s" ellama-provider-select Provider select + + +File: ellama.info, Node: Configuration, Next: Minor modes, Prev: Keymap, Up: Top + +4 Configuration +*************** + +The following variables can be customized for the Ellama client: + + • ‘ellama-enable-keymap’: Enable the Ellama keymap. + • ‘ellama-keymap-prefix’: The keymap prefix for Ellama. + • ‘ellama-user-nick’: The user nick in logs. + • ‘ellama-assistant-nick’: The assistant nick in logs. + • ‘ellama-language’: The language for Ollama translation. Default +language is english. + • ‘ellama-provider’: llm provider for ellama. +There are many supported providers: ‘ollama’, ‘open ai’, ‘vertex’, +‘GPT4All’. For more information see llm documentation +(https://elpa.gnu.org/packages/llm.html). + • ‘ellama-providers’: association list of model llm providers with + name as key. + • ‘ellama-spinner-enabled’: Enable spinner during text generation. + • ‘ellama-spinner-type’: Spinner type for ellama. Default type is +‘progress-bar’. + • ‘ellama-ollama-binary’: Path to ollama binary. + • ‘ellama-auto-scroll’: If enabled ellama buffer will scroll + automatically during generation. Disabled by default. + • ‘ellama-fill-paragraphs’: Option to customize ellama paragraphs + filling behaviour. + • ‘ellama-name-prompt-words-count’: Count of words in prompt to + generate name. + • Prompt templates for every command. + • ‘ellama-chat-done-callback’: Callback that will be called on ellama +chat response generation done. It should be a function with single +argument generated text string. + • ‘ellama-nick-prefix-depth’: User and assistant nick prefix depth. + Default value is 2. + • ‘ellama-sessions-directory’: Directory for saved ellama sessions. + • ‘ellama-major-mode’: Major mode for ellama commands. Org mode by + default. + • ‘ellama-session-auto-save’: Automatically save ellama sessions if + set. Enabled by default. + • ‘ellama-naming-scheme’: How to name new sessions. + • ‘ellama-naming-provider’: LLM provider for generating session names + by LLM. If not set ‘ellama-provider’ will be used. + • ‘ellama-chat-translation-enabled’: Enable chat translations if set. + • ‘ellama-translation-provider’: LLM translation provider. + ‘ellama-provider’ will be used if not set. + • ‘ellama-coding-provider’: LLM coding tasks provider. + ‘ellama-provider’ will be used if not set. + • ‘ellama-summarization-provider’ LLM summarization provider. + ‘ellama-provider’ will be used if not set. + • ‘ellama-show-quotes’: Show quotes content in chat buffer. Disabled + by default. + • ‘ellama-chat-display-action-function’: Display action function for + ‘ellama-chat’. + • ‘ellama-instant-display-action-function’: Display action function + for ‘ellama-instant’. + • ‘ellama-translate-italic’: Translate italic during markdown to org + transformations. Enabled by default. + • ‘ellama-extraction-provider’: LLM provider for data extraction. + • ‘ellama-text-display-limit’: Limit for text display in context + elements. + • ‘ellama-context-poshandler’: Position handler for displaying + context buffer. ‘posframe-poshandler-frame-top-center’ will be + used if not set. + • ‘ellama-context-border-width’: Border width for the context buffer. + • ‘ellama-session-remove-reasoning’: Remove internal reasoning from + the session after ellama provide an answer. This can improve + long-term communication with reasoning models. Enabled by default. + • ‘ellama-session-hide-org-quotes’: Hide org quotes in the Ellama + session buffer. From now on, think tags will be replaced with + quote blocks. If this flag is enabled, reasoning steps will be + collapsed after generation and upon session loading. Enabled by + default. + • ‘ellama-output-remove-reasoning’: Eliminate internal reasoning from + ellama output to enhance the versatility of reasoning models across + diverse applications. + • ‘ellama-context-posframe-enabled’: Enable showing posframe with + ellama context. + • ‘ellama-manage-context-display-action-function’: Display action + function for ‘ellama-render-context’. Default value + ‘display-buffer-same-window’. + • ‘ellama-preview-context-element-display-action-function’: Display + action function for ‘ellama-preview-context-element’. + • ‘ellama-context-line-always-visible’: Make context header or mode + line always visible, even with empty context. + • ‘ellama-community-prompts-url’: The URL of the community prompts + collection. + • ‘ellama-community-prompts-file’: Path to the CSV file containing + community prompts. This file is expected to be located inside an + ‘ellama’ subdirectory within your ‘user-emacs-directory’. + • ‘ellama-show-reasoning’: Show reasoning in separate buffer if + enabled. Enabled by default. + • ‘ellama-reasoning-display-action-function’: Display action function + for reasoning. + • ‘ellama-session-line-template’: Template for formatting the current + session line. + + +File: ellama.info, Node: Minor modes, Next: Using Blueprints, Prev: Configuration, Up: Top + +5 Minor modes +************* + +The Ellama package for Emacs offers a suite of minor modes designed to +enhance the user experience by providing context-specific information +directly within the editor's interface. These minor modes focus on +updating both the header line and mode line with relevant details, +making it easier to manage and navigate multiple sessions and buffers. + +Key features include: + + • Context Header Line Modes: ‘ellama-context-header-line-mode’ and + its global counterpart, ‘ellama-context-header-line-global-mode’, + update the header line to display what elements are added to the + global Ellama context. This is particularly useful for keeping + track of what information is currently in context. + • Context Mode Line Modes: Similarly, ‘ellama-context-mode-line-mode’ + and ‘ellama-context-mode-line-global-mode’ provide information + about the current global context directly within the mode line, + ensuring that users always have relevant information at a glance. + • Session Header Line Mode: ‘ellama-session-header-line-mode’ and its + global version display the current Ellama session ID in the header + line, helping users manage multiple sessions efficiently. + • Session Mode Line Mode: ‘ellama-session-mode-line-mode’ and its + global counterpart offer an additional way to track session IDs by + displaying them in the mode line. + +These minor modes are easily toggled on or off using specific commands, +providing flexibility for users who may want to enable these features +globally across all buffers or selectively within individual buffers. + +* Menu: + +* ellama-context-header-line-mode:: +* ellama-context-header-line-global-mode:: +* ellama-context-mode-line-mode:: +* ellama-context-mode-line-global-mode:: +* Ellama Session Header Line Mode:: +* Ellama Session Mode Line Mode:: + + +File: ellama.info, Node: ellama-context-header-line-mode, Next: ellama-context-header-line-global-mode, Up: Minor modes + +5.1 ellama-context-header-line-mode +=================================== + +Description: Toggle the Ellama Context header line mode. This minor +mode updates the header line to display context-specific information. + +Usage: To enable or disable ‘ellama-context-header-line-mode’, use the +command: + +M-x ellama-context-header-line-mode + +When enabled, this mode adds a hook to ‘window-state-change-hook’ to +update the header line whenever the window state changes. It also calls +‘ellama-context-update-header-line’ to initialize the header line with +context-specific information. + +When disabled, it removes the evaluation of ‘(:eval +(ellama-context-line))’ from ‘header-line-format’. + + +File: ellama.info, Node: ellama-context-header-line-global-mode, Next: ellama-context-mode-line-mode, Prev: ellama-context-header-line-mode, Up: Minor modes + +5.2 ellama-context-header-line-global-mode +========================================== + +Description: Globalized version of ‘ellama-context-header-line-mode’. +This mode ensures that ‘ellama-context-header-line-mode’ is enabled in +all buffers. + +Usage: To enable or disable ‘ellama-context-header-line-global-mode’, +use the command: + +M-x ellama-context-header-line-global-mode + +This globalized minor mode provides a convenient way to ensure that +context-specific header line information is always available, regardless +of the buffer being edited. + + +File: ellama.info, Node: ellama-context-mode-line-mode, Next: ellama-context-mode-line-global-mode, Prev: ellama-context-header-line-global-mode, Up: Minor modes + +5.3 ellama-context-mode-line-mode +================================= + +Description: Toggle the Ellama Context mode line mode. This minor mode +updates the mode line to display context-specific information. + +Usage: To enable or disable ‘ellama-context-mode-line-mode’, use the +command: + +M-x ellama-context-mode-line-mode + +When enabled, this mode adds a hook to ‘window-state-change-hook’ to +update the mode line whenever the window state changes. It also calls +‘ellama-context-update-mode-line’ to initialize the mode line with +context-specific information. + +When disabled, it removes the evaluation of ‘(:eval +(ellama-context-line))’ from ‘mode-line-format’. + + +File: ellama.info, Node: ellama-context-mode-line-global-mode, Next: Ellama Session Header Line Mode, Prev: ellama-context-mode-line-mode, Up: Minor modes + +5.4 ellama-context-mode-line-global-mode +======================================== + +Description: Globalized version of ‘ellama-context-mode-line-mode’. +This mode ensures that ‘ellama-context-mode-line-mode’ is enabled in all +buffers. + +Usage: To enable or disable ‘ellama-context-mode-line-global-mode’, use +the command: + +M-x ellama-context-mode-line-global-mode + +This globalized minor mode provides a convenient way to ensure that +context-specific mode line information is always available, regardless +of the buffer being edited. + + +File: ellama.info, Node: Ellama Session Header Line Mode, Next: Ellama Session Mode Line Mode, Prev: ellama-context-mode-line-global-mode, Up: Minor modes + +5.5 Ellama Session Header Line Mode +=================================== + +The ‘ellama-session-header-line-mode’ is a minor mode that allows you to +display the current Ellama session ID in the header line of your Emacs +buffers. This feature helps keep track of which session you are working +with, especially useful when managing multiple sessions. + +* Menu: + +* Enabling and Disabling:: +* Customization:: + + +File: ellama.info, Node: Enabling and Disabling, Next: Customization, Up: Ellama Session Header Line Mode + +5.5.1 Enabling and Disabling +---------------------------- + +To enable this mode, use the following command: + M-x ellama-session-header-line-mode + +This will toggle the display of the session ID in the header line. You +can also enable or disable it globally across all buffers using: + M-x ellama-session-header-line-global-mode + + +File: ellama.info, Node: Customization, Prev: Enabling and Disabling, Up: Ellama Session Header Line Mode + +5.5.2 Customization +------------------- + +The session ID is displayed with a customizable face called +‘ellama-face’. You can customize this face to change its appearance. + + +File: ellama.info, Node: Ellama Session Mode Line Mode, Prev: Ellama Session Header Line Mode, Up: Minor modes + +5.6 Ellama Session Mode Line Mode +================================= + +The ‘ellama-session-mode-line-mode’ is a minor mode that allows you to +display the current Ellama session ID in the mode line of your Emacs +buffers. This feature provides an additional way to keep track of which +session you are working with, especially useful when managing multiple +sessions. + +* Menu: + +* Enabling and Disabling: Enabling and Disabling (1). +* Customization: Customization (1). + + +File: ellama.info, Node: Enabling and Disabling (1), Next: Customization (1), Up: Ellama Session Mode Line Mode + +5.6.1 Enabling and Disabling +---------------------------- + +To enable this mode, use the following command: + M-x ellama-session-mode-line-mode + +This will toggle the display of the session ID in the mode line. You +can also enable or disable it globally across all buffers using: + M-x ellama-session-mode-line-global-mode + + +File: ellama.info, Node: Customization (1), Prev: Enabling and Disabling (1), Up: Ellama Session Mode Line Mode + +5.6.2 Customization +------------------- + +The session ID is displayed with a customizable face called +‘ellama-face’. You can customize this face to change its appearance. + + +File: ellama.info, Node: Using Blueprints, Next: Acknowledgments, Prev: Minor modes, Up: Top + +6 Using Blueprints +****************** + +Blueprints in Ellama refer to predefined templates or structures that +facilitate the creation and management of chat sessions. These +blueprints are designed to streamline the process of generating +consistent and high-quality outputs by providing a structured framework +for interactions. + +* Menu: + +* Key Components of Ellama Blueprints:: +* Creating and Managing Blueprints:: +* Variable Management:: +* Keymap and Mode:: +* Transient Menus:: +* Running Blueprints programmatically:: + + +File: ellama.info, Node: Key Components of Ellama Blueprints, Next: Creating and Managing Blueprints, Up: Using Blueprints + +6.1 Key Components of Ellama Blueprints +======================================= + + 1. Act: This is the primary identifier for a blueprint, representing + the +action or purpose of the blueprint. + 1. Prompt: The content that will be used to initiate the chat session. + This +can include instructions, context, or any other relevant information +needed to guide the conversation. + 1. For Developers: A flag indicating whether the blueprint is intended + for +developers. + + +File: ellama.info, Node: Creating and Managing Blueprints, Next: Variable Management, Prev: Key Components of Ellama Blueprints, Up: Using Blueprints + +6.2 Creating and Managing Blueprints +==================================== + +Ellama provides several functions to create, select, and manage +blueprints: + + • ‘ellama-blueprint-create’: This function allows users to create a + new blueprint from the current buffer. It prompts for a name and + whether the blueprint is for developers, then saves the content of + the current buffer as the prompt. + + • ‘ellama-blueprint-new’: This function creates a new buffer for a + blueprint, optionally inserting the content of the current region + if active. + + • ‘ellama-blueprint-select’: This function allows users to select a + prompt from the collection of blueprints. It filters prompts based + on whether they are for developers and their source (user-defined, + community, or all). + + +File: ellama.info, Node: Variable Management, Next: Keymap and Mode, Prev: Creating and Managing Blueprints, Up: Using Blueprints + +6.3 Variable Management +======================= + +Blueprints can include variables that need to be filled before running +the chat session. Ellama provides command to fill these variables: + + • ‘ellama-blueprint-fill-variables’: Prompts the user to enter values + for variables found in the current buffer and fills them. + + +File: ellama.info, Node: Keymap and Mode, Next: Transient Menus, Prev: Variable Management, Up: Using Blueprints + +6.4 Keymap and Mode +=================== + +Ellama provides a local keymap ‘ellama-blueprint-mode-map’ for managing +blueprints within buffers. The mode includes key bindings for sending +the buffer to a new chat session, killing the current buffer, creating a +new blueprint, and filling variables. + +The ‘ellama-blueprint-mode’ is a derived mode from ‘text-mode’, +providing syntax highlighting for variables in curly braces and setting +up the local keymap. + +When in ‘ellama-blueprint-mode’, the following keybindings are +available: + + • ‘C-c C-c’: Send current buffer to a new chat session and kill the + current buffer. + • ‘C-c C-k’: Kill the current buffer. + • ‘C-c c’: Create a blueprint from the current buffer. + • ‘C-c v’: Fill variables in the current blueprint. + + +File: ellama.info, Node: Transient Menus, Next: Running Blueprints programmatically, Prev: Keymap and Mode, Up: Using Blueprints + +6.5 Transient Menus +=================== + +Ellama includes transient menus for easy access to blueprint commands. +The ‘ellama-transient-blueprint-menu’ provides options for chatting with +a selected blueprint, creating a new blueprint, and quitting the menu. + +The ‘ellama-transient-main-menu’ integrates the blueprint menu into the +main menu, providing a comprehensive interface for all Ellama commands. + + +File: ellama.info, Node: Running Blueprints programmatically, Prev: Transient Menus, Up: Using Blueprints + +6.6 Running Blueprints programmatically +======================================= + +The ‘ellama-blueprint-run’ function initiates a chat session using a +specified blueprint. It pre-fills variables based on the provided +arguments. + + (defun my-chat-with-morpheus () + "Start chat with Morpheus." + (interactive) + (ellama-blueprint-run "Character" '(:character "Morpheus" :series "Matrix"))) + + (global-set-key (kbd "C-c e M") #'my-chat-with-morpheus) + + +File: ellama.info, Node: Acknowledgments, Next: Contributions, Prev: Using Blueprints, Up: Top + +7 Acknowledgments +***************** + +Thanks Jeffrey Morgan (https://github.com/jmorganca) for excellent +project ollama (https://github.com/jmorganca/ollama). This project +cannot exist without it. + +Thanks zweifisch (https://github.com/zweifisch) - I got some ideas from +ollama.el (https://github.com/zweifisch/ollama) what ollama client in +Emacs can do. + +Thanks Dr. David A. Kunz (https://github.com/David-Kunz) - I got more +ideas from gen.nvim (https://github.com/David-Kunz/gen.nvim). + +Thanks Andrew Hyatt (https://github.com/ahyatt) for ‘llm’ library. +Without it only ‘ollama’ would be supported. + + +File: ellama.info, Node: Contributions, Next: GNU Free Documentation License, Prev: Acknowledgments, Up: Top + +8 Contributions +*************** + +To contribute, submit a pull request or report a bug. This library is +part of GNU ELPA; major contributions must be from someone with FSF +papers. Alternatively, you can write a module and share it on a +different archive like MELPA. + + +File: ellama.info, Node: GNU Free Documentation License, Prev: Contributions, Up: Top + +Appendix A GNU Free Documentation License +***************************************** + + Version 1.3, 3 November 2008 + + Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + <https://fsf.org/> + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + 0. PREAMBLE + + The purpose of this License is to make a manual, textbook, or other + functional and useful document “free” in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by others. + + This License is a kind of "copyleft", which means that derivative + works of the document must themselves be free in the same sense. + It complements the GNU General Public License, which is a copyleft + license designed for free software. + + We have designed this License in order to use it for manuals for + free software, because free software needs free documentation: a + free program should come with manuals providing the same freedoms + that the software does. But this License is not limited to + software manuals; it can be used for any textual work, regardless + of subject matter or whether it is published as a printed book. We + recommend this License principally for works whose purpose is + instruction or reference. + + 1. APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work, in any medium, + that contains a notice placed by the copyright holder saying it can + be distributed under the terms of this License. Such a notice + grants a world-wide, royalty-free license, unlimited in duration, + to use that work under the conditions stated herein. The + "Document", below, refers to any such manual or work. Any member + of the public is a licensee, and is addressed as "you". You accept + the license if you copy, modify or distribute the work in a way + requiring permission under copyright law. + + A "Modified Version" of the Document means any work containing the + Document or a portion of it, either copied verbatim, or with + modifications and/or translated into another language. + + A "Secondary Section" is a named appendix or a front-matter section + of the Document that deals exclusively with the relationship of the + publishers or authors of the Document to the Document's overall + subject (or to related matters) and contains nothing that could + fall directly within that overall subject. (Thus, if the Document + is in part a textbook of mathematics, a Secondary Section may not + explain any mathematics.) The relationship could be a matter of + historical connection with the subject or with related matters, or + of legal, commercial, philosophical, ethical or political position + regarding them. + + The "Invariant Sections" are certain Secondary Sections whose + titles are designated, as being those of Invariant Sections, in the + notice that says that the Document is released under this License. + If a section does not fit the above definition of Secondary then it + is not allowed to be designated as Invariant. The Document may + contain zero Invariant Sections. If the Document does not identify + any Invariant Sections then there are none. + + The "Cover Texts" are certain short passages of text that are + listed, as Front-Cover Texts or Back-Cover Texts, in the notice + that says that the Document is released under this License. A + Front-Cover Text may be at most 5 words, and a Back-Cover Text may + be at most 25 words. + + A "Transparent" copy of the Document means a machine-readable copy, + represented in a format whose specification is available to the + general public, that is suitable for revising the document + straightforwardly with generic text editors or (for images composed + of pixels) generic paint programs or (for drawings) some widely + available drawing editor, and that is suitable for input to text + formatters or for automatic translation to a variety of formats + suitable for input to text formatters. A copy made in an otherwise + Transparent file format whose markup, or absence of markup, has + been arranged to thwart or discourage subsequent modification by + readers is not Transparent. An image format is not Transparent if + used for any substantial amount of text. A copy that is not + "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include plain + ASCII without markup, Texinfo input format, LaTeX input format, + SGML or XML using a publicly available DTD, and standard-conforming + simple HTML, PostScript or PDF designed for human modification. + Examples of transparent image formats include PNG, XCF and JPG. + Opaque formats include proprietary formats that can be read and + edited only by proprietary word processors, SGML or XML for which + the DTD and/or processing tools are not generally available, and + the machine-generated HTML, PostScript or PDF produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page itself, + plus such following pages as are needed to hold, legibly, the + material this License requires to appear in the title page. For + works in formats which do not have any title page as such, "Title + Page" means the text near the most prominent appearance of the + work's title, preceding the beginning of the body of the text. + + The "publisher" means any person or entity that distributes copies + of the Document to the public. + + A section "Entitled XYZ" means a named subunit of the Document + whose title either is precisely XYZ or contains XYZ in parentheses + following text that translates XYZ in another language. (Here XYZ + stands for a specific section name mentioned below, such as + "Acknowledgements", "Dedications", "Endorsements", or "History".) + To "Preserve the Title" of such a section when you modify the + Document means that it remains a section "Entitled XYZ" according + to this definition. + + The Document may include Warranty Disclaimers next to the notice + which states that this License applies to the Document. These + Warranty Disclaimers are considered to be included by reference in + this License, but only as regards disclaiming warranties: any other + implication that these Warranty Disclaimers may have is void and + has no effect on the meaning of this License. + + 2. VERBATIM COPYING + + You may copy and distribute the Document in any medium, either + commercially or noncommercially, provided that this License, the + copyright notices, and the license notice saying this License + applies to the Document are reproduced in all copies, and that you + add no other conditions whatsoever to those of this License. You + may not use technical measures to obstruct or control the reading + or further copying of the copies you make or distribute. However, + you may accept compensation in exchange for copies. If you + distribute a large enough number of copies you must also follow the + conditions in section 3. + + You may also lend copies, under the same conditions stated above, + and you may publicly display copies. + + 3. COPYING IN QUANTITY + + If you publish printed copies (or copies in media that commonly + have printed covers) of the Document, numbering more than 100, and + the Document's license notice requires Cover Texts, you must + enclose the copies in covers that carry, clearly and legibly, all + these Cover Texts: Front-Cover Texts on the front cover, and + Back-Cover Texts on the back cover. Both covers must also clearly + and legibly identify you as the publisher of these copies. The + front cover must present the full title with all words of the title + equally prominent and visible. You may add other material on the + covers in addition. Copying with changes limited to the covers, as + long as they preserve the title of the Document and satisfy these + conditions, can be treated as verbatim copying in other respects. + + If the required texts for either cover are too voluminous to fit + legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a machine-readable + Transparent copy along with each Opaque copy, or state in or with + each Opaque copy a computer-network location from which the general + network-using public has access to download using public-standard + network protocols a complete Transparent copy of the Document, free + of added material. If you use the latter option, you must take + reasonably prudent steps, when you begin distribution of Opaque + copies in quantity, to ensure that this Transparent copy will + remain thus accessible at the stated location until at least one + year after the last time you distribute an Opaque copy (directly or + through your agents or retailers) of that edition to the public. + + It is requested, but not required, that you contact the authors of + the Document well before redistributing any large number of copies, + to give them a chance to provide you with an updated version of the + Document. + + 4. MODIFICATIONS + + You may copy and distribute a Modified Version of the Document + under the conditions of sections 2 and 3 above, provided that you + release the Modified Version under precisely this License, with the + Modified Version filling the role of the Document, thus licensing + distribution and modification of the Modified Version to whoever + possesses a copy of it. In addition, you must do these things in + the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title + distinct from that of the Document, and from those of previous + versions (which should, if there were any, be listed in the + History section of the Document). You may use the same title + as a previous version if the original publisher of that + version gives permission. + + B. List on the Title Page, as authors, one or more persons or + entities responsible for authorship of the modifications in + the Modified Version, together with at least five of the + principal authors of the Document (all of its principal + authors, if it has fewer than five), unless they release you + from this requirement. + + C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. + + D. Preserve all the copyright notices of the Document. + + E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. + + F. Include, immediately after the copyright notices, a license + notice giving the public permission to use the Modified + Version under the terms of this License, in the form shown in + the Addendum below. + + G. Preserve in that license notice the full lists of Invariant + Sections and required Cover Texts given in the Document's + license notice. + + H. Include an unaltered copy of this License. + + I. Preserve the section Entitled "History", Preserve its Title, + and add to it an item stating at least the title, year, new + authors, and publisher of the Modified Version as given on the + Title Page. If there is no section Entitled "History" in the + Document, create one stating the title, year, authors, and + publisher of the Document as given on its Title Page, then add + an item describing the Modified Version as stated in the + previous sentence. + + J. Preserve the network location, if any, given in the Document + for public access to a Transparent copy of the Document, and + likewise the network locations given in the Document for + previous versions it was based on. These may be placed in the + "History" section. You may omit a network location for a work + that was published at least four years before the Document + itself, or if the original publisher of the version it refers + to gives permission. + + K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section + all the substance and tone of each of the contributor + acknowledgements and/or dedications given therein. + + L. Preserve all the Invariant Sections of the Document, unaltered + in their text and in their titles. Section numbers or the + equivalent are not considered part of the section titles. + + M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. + + N. Do not retitle any existing section to be Entitled + "Endorsements" or to conflict in title with any Invariant + Section. + + O. Preserve any Warranty Disclaimers. + + If the Modified Version includes new front-matter sections or + appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option designate + some or all of these sections as invariant. To do this, add their + titles to the list of Invariant Sections in the Modified Version's + license notice. These titles must be distinct from any other + section titles. + + You may add a section Entitled "Endorsements", provided it contains + nothing but endorsements of your Modified Version by various + parties--for example, statements of peer review or that the text + has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover Text, + and a passage of up to 25 words as a Back-Cover Text, to the end of + the list of Cover Texts in the Modified Version. Only one passage + of Front-Cover Text and one of Back-Cover Text may be added by (or + through arrangements made by) any one entity. If the Document + already includes a cover text for the same cover, previously added + by you or by arrangement made by the same entity you are acting on + behalf of, you may not add another; but you may replace the old + one, on explicit permission from the previous publisher that added + the old one. + + The author(s) and publisher(s) of the Document do not by this + License give permission to use their names for publicity for or to + assert or imply endorsement of any Modified Version. + + 5. COMBINING DOCUMENTS + + You may combine the Document with other documents released under + this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination all + of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice, and that you preserve all + their Warranty Disclaimers. + + The combined work need only contain one copy of this License, and + multiple identical Invariant Sections may be replaced with a single + copy. If there are multiple Invariant Sections with the same name + but different contents, make the title of each such section unique + by adding at the end of it, in parentheses, the name of the + original author or publisher of that section if known, or else a + unique number. Make the same adjustment to the section titles in + the list of Invariant Sections in the license notice of the + combined work. + + In the combination, you must combine any sections Entitled + "History" in the various original documents, forming one section + Entitled "History"; likewise combine any sections Entitled + "Acknowledgements", and any sections Entitled "Dedications". You + must delete all sections Entitled "Endorsements." + + 6. COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and other + documents released under this License, and replace the individual + copies of this License in the various documents with a single copy + that is included in the collection, provided that you follow the + rules of this License for verbatim copying of each of the documents + in all other respects. + + You may extract a single document from such a collection, and + distribute it individually under this License, provided you insert + a copy of this License into the extracted document, and follow this + License in all other respects regarding verbatim copying of that + document. + + 7. AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of a + storage or distribution medium, is called an "aggregate" if the + copyright resulting from the compilation is not used to limit the + legal rights of the compilation's users beyond what the individual + works permit. When the Document is included in an aggregate, this + License does not apply to the other works in the aggregate which + are not themselves derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to these + copies of the Document, then if the Document is less than one half + of the entire aggregate, the Document's Cover Texts may be placed + on covers that bracket the Document within the aggregate, or the + electronic equivalent of covers if the Document is in electronic + form. Otherwise they must appear on printed covers that bracket + the whole aggregate. + + 8. TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires special + permission from their copyright holders, but you may include + translations of some or all Invariant Sections in addition to the + original versions of these Invariant Sections. You may include a + translation of this License, and all the license notices in the + Document, and any Warranty Disclaimers, provided that you also + include the original English version of this License and the + original versions of those notices and disclaimers. In case of a + disagreement between the translation and the original version of + this License or a notice or disclaimer, the original version will + prevail. + + If a section in the Document is Entitled "Acknowledgements", + "Dedications", or "History", the requirement (section 4) to + Preserve its Title (section 1) will typically require changing the + actual title. + + 9. TERMINATION + + You may not copy, modify, sublicense, or distribute the Document + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense, or distribute it is void, + and will automatically terminate your rights under this License. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from + that copyright holder, and you cure the violation prior to 30 days + after your receipt of the notice. + + Termination of your rights under this section does not terminate + the licenses of parties who have received copies or rights from you + under this License. If your rights have been terminated and not + permanently reinstated, receipt of a copy of some or all of the + same material does not give you any rights to use it. + + 10. FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised versions of + the GNU Free Documentation License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. See + <https://www.gnu.org/licenses/>. + + Each version of the License is given a distinguishing version + number. If the Document specifies that a particular numbered + version of this License "or any later version" applies to it, you + have the option of following the terms and conditions either of + that specified version or of any later version that has been + published (not as a draft) by the Free Software Foundation. If the + Document does not specify a version number of this License, you may + choose any version ever published (not as a draft) by the Free + Software Foundation. If the Document specifies that a proxy can + decide which future versions of this License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Document. + + 11. RELICENSING + + "Massive Multiauthor Collaboration Site" (or "MMC Site") means any + World Wide Web server that publishes copyrightable works and also + provides prominent facilities for anybody to edit those works. A + public wiki that anybody can edit is an example of such a server. + A "Massive Multiauthor Collaboration" (or "MMC") contained in the + site means any set of copyrightable works thus published on the MMC + site. + + "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 + license published by Creative Commons Corporation, a not-for-profit + corporation with a principal place of business in San Francisco, + California, as well as future copyleft versions of that license + published by that same organization. + + "Incorporate" means to publish or republish a Document, in whole or + in part, as part of another Document. + + An MMC is "eligible for relicensing" if it is licensed under this + License, and if all works that were first published under this + License somewhere other than this MMC, and subsequently + incorporated in whole or in part into the MMC, (1) had no cover + texts or invariant sections, and (2) were thus incorporated prior + to November 1, 2008. + + The operator of an MMC Site may republish an MMC contained in the + site under CC-BY-SA on the same site at any time before August 1, + 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents +==================================================== + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and license +notices just after the title page: + + Copyright (C) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.3 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with + the Front-Cover Texts being LIST, and with the Back-Cover Texts + being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of free +software license, such as the GNU General Public License, to permit +their use in free software. + + + +Tag Table: +Node: Top1379 +Node: Installation3482 +Node: Commands8490 +Node: Keymap14834 +Node: Configuration17667 +Node: Minor modes23001 +Node: ellama-context-header-line-mode24984 +Node: ellama-context-header-line-global-mode25809 +Node: ellama-context-mode-line-mode26529 +Node: ellama-context-mode-line-global-mode27377 +Node: Ellama Session Header Line Mode28081 +Node: Enabling and Disabling28650 +Node: Customization29097 +Node: Ellama Session Mode Line Mode29385 +Node: Enabling and Disabling (1)29970 +Node: Customization (1)30417 +Node: Using Blueprints30711 +Node: Key Components of Ellama Blueprints31330 +Node: Creating and Managing Blueprints31937 +Node: Variable Management32918 +Node: Keymap and Mode33387 +Node: Transient Menus34323 +Node: Running Blueprints programmatically34869 +Node: Acknowledgments35456 +Node: Contributions36169 +Node: GNU Free Documentation License36553 + +End Tag Table + + +Local Variables: +coding: utf-8 +End: