instruction
stringlengths
38
27.8k
completion
stringlengths
2
63.4k
conversations
listlengths
2
2
I struggle to pronounce many computer terms, and to this day still mispronounce latex in my head - it just sounds better rhyming with flex. How would I pronounce Emacs?
Emacs is typically pronounced as "EE-macs" (rhyming with "K-macs"). The "E" is pronounced like the letter "E," and "macs" sounds like the word "macs." So it has two syllables: "EE-macs."
[ { "from": "human", "value": "I struggle to pronounce many computer terms, and to this day still mispronounce latex in my head - it just sounds better rhyming with flex. \nHow would I pronounce Emacs?\n" }, { "from": "gpt", "value": "Emacs is typically pronounced as \"EE-macs\" (rhyming with \"K-...
I'd like to load the yaml-mode for any files named *.yml or *.yaml.
To enable `yaml-mode` for files with the extensions `.yml` or `.yaml` in Emacs, you can add the following lines to your Emacs configuration file, typically located at `~/.emacs` or `~/.emacs.d/init.el`: ```elisp ;; Load yaml-mode (require 'yaml-mode) ;; Associate .yml and .yaml files with yaml-mode (add-to-list 'auto...
[ { "from": "human", "value": "I'd like to load the yaml-mode for any files named *.yml or *.yaml.\n" }, { "from": "gpt", "value": "To enable `yaml-mode` for files with the extensions `.yml` or `.yaml` in Emacs, you can add the following lines to your Emacs configuration file, typically located at...
Paraphrasing a question I previously asked on SuperUser because, IMO, the answer found there does not resolve the issue. Question For the most part I prefer to disable Emacs' fringe. (I customize fringe-mode to 0 a/k/a no-fringes) But I like to have the left fringe active when debugging elisp code (for the little frin...
Here's a paraphrased version of your question: --- I usually prefer to have the fringe in Emacs disabled by setting fringe-mode to 0 (which means no fringes). However, when I'm debugging elisp code, I would like to enable the left fringe to display the small arrow pointing to the active line. Is there a way to conf...
[ { "from": "human", "value": "Paraphrasing a question I previously asked on SuperUser because, IMO, the answer found there does not resolve the issue.\nQuestion\nFor the most part I prefer to disable Emacs' fringe. (I customize fringe-mode to 0 a/k/a no-fringes) But I like to have the left fringe active whe...
Inside org-mode, RETURN is bound to (org-return &optional INDENT). This command apparently ignores C-u numeric prefixes and so if you want to enter 10 newlines, you can't just type C-u 1 0 RET and have it work. You can do C-u 1 0 M-x newline and get expected behavior, but I would like to know if there's a simpler set o...
In org-mode, the `RET` key indeed calls `org-return`, which does not respect numeric prefixes in the way you described. However, you can achieve the desired behavior of inserting multiple newlines with a simpler key combination. To insert multiple newlines while respecting numeric prefixes, you can use the following c...
[ { "from": "human", "value": "Inside org-mode, RETURN is bound to (org-return &optional INDENT). This command apparently ignores C-u numeric prefixes and so if you want to enter 10 newlines, you can't just type C-u 1 0 RET and have it work. You can do C-u 1 0 M-x newline and get expected behavior, but I woul...
key-chord-mode is useful, but I don't need it to work in the minibuffer. How do I disable it in the minibuffer?
To disable `key-chord-mode` in the minibuffer in Emacs, you can use a hook to ensure that it is turned off when you're in the minibuffer. Here's how you can do that: 1. Open your Emacs configuration file, usually located at `~/.emacs` or `~/.emacs.d/init.el`. 2. Add the following code to your configuration: ```elisp...
[ { "from": "human", "value": "key-chord-mode is useful, but I don't need it to work in the minibuffer. How do I disable it in the minibuffer?\n" }, { "from": "gpt", "value": "To disable `key-chord-mode` in the minibuffer in Emacs, you can use a hook to ensure that it is turned off when you're in ...
There command-line option -e behaves similar to the --eval option, but yet it is not the same. For example, of these two invocations, only the first one works: emacs --eval '(global-linum-mode)' emacs -e '(global-linum-mode)' And of these two invocations, only the second one works: emacs --eval 'global-linum-mode...
The behavior you're observing with the `-e` and `--eval` options in Emacs can indeed be confusing. The `-e` option is a shorthand for executing a command in the context of Emacs, but it is not functionally identical to `--eval`. In general, `--eval` evaluates the given expression as Lisp code, while `-e` is intended t...
[ { "from": "human", "value": "There command-line option -e behaves similar to the --eval option, but yet it is not the same. For example, of these two invocations, only the first one works:\nemacs --eval '(global-linum-mode)'\nemacs -e '(global-linum-mode)'\n\nAnd of these two invocations, only the seco...
In GitHub one can often find, for a given open-source project, the list of issues that have been reported and the estimated time-horizon that is considered for a given fix or enhancement. Is there an equivalent repository where feature requests and bugs for GNU Emacs are collected and prioritized? Do the developers gro...
Yes, for GNU Emacs, issues, feature requests, and bugs are tracked in the official GNU Emacs repository on the Savannah platform, which is a part of the GNU Project. The issues can be reported and discussed on the Emacs development mailing lists, particularly `emacs-devel`, and there is also a bug tracking system integ...
[ { "from": "human", "value": "In GitHub one can often find, for a given open-source project, the list of issues that have been reported and the estimated time-horizon that is considered for a given fix or enhancement.\nIs there an equivalent repository where feature requests and bugs for GNU Emacs are collec...
When using the shellcheck checker, Flycheck will warn me that the "$@" in the following will be expanded on the client rather than the ssh server. Which is a helpful warning, but yeah I know and I'm good. So is it possible to suppress this warning; better yet if it's for just this one line. function f(){ ssh foo "$@...
Yes, you can suppress specific warnings from ShellCheck while using Flycheck by adding a directive comment to the line of code that triggers the warning. In your case, if you want to suppress the warning about `"$@"` being expanded on the client side rather than the SSH server, you can use the `shellcheck disable=SC202...
[ { "from": "human", "value": "When using the shellcheck checker, Flycheck will warn me that the \"$@\" in the following will be expanded on the client rather than the ssh server. Which is a helpful warning, but yeah I know and I'm good. So is it possible to suppress this warning; better yet if it's for jus...
I don't like the default M-n and M-p keys for company-select-next and company-select-previous so I was wondering if it's possible to remap those to C-n and C-p without affecting the mappings when company's tooltip is not active.
Yes, you can remap the `company-select-next` and `company-select-previous` commands to `C-n` and `C-p` while ensuring that these keybindings only apply when the company tooltip is active. You can achieve this by using a hook to check if the company completion is active and then remapping the keys accordingly. Here's h...
[ { "from": "human", "value": "I don't like the default M-n and M-p keys for company-select-next and company-select-previous so I was wondering if it's possible to remap those to C-n and C-p without affecting the mappings when company's tooltip is not active.\n" }, { "from": "gpt", "value": "Yes, ...
As I use a different language from English often I would like to create some keymaps to avoid changing languages all the time. I don't know the name of the commands that I have to place in the section interactive-command-here of the keymap: (define-key KEYMAP (kbd "key-bind-here") 'interactive-command-here) For instan...
In Emacs, the command for saving a file is typically `save-buffer`. To bind a key combination (like `C-σ`) to the save command, you would define it in a keymap using `define-key`. Here's how you would do it: ```elisp (define-key KEYMAP (kbd "C-σ") 'save-buffer) ``` In this snippet, replace `KEYMAP` with the actual k...
[ { "from": "human", "value": "As I use a different language from English often I would like to create some keymaps to avoid changing languages all the time.\nI don't know the name of the commands that I have to place in the section interactive-command-here of the keymap: \n(define-key KEYMAP (kbd \"key-bind-...
I just upgraded to Emacs 24.4 (from 24.3). Now, whenever I run vc-next-action on a modified file, the *vc-log* buffer that comes up starts with the word "Summary:" in log-edit-header face, followed by a line of inverse video. This wasn't happening in 24.3, but I can't find anything about it in NEWS. What's going on? ...
The behavior you are encountering in Emacs 24.4 with the `vc-next-action` command and the appearance of the "Summary:" header in the `*vc-log*` buffer is related to changes in the version control mode's log-editing interface. In Emacs 24.4, there were updates that affected the appearance and behavior of the log editin...
[ { "from": "human", "value": "I just upgraded to Emacs 24.4 (from 24.3). Now, whenever I run vc-next-action on a modified file, the *vc-log* buffer that comes up starts with the word \"Summary:\" in log-edit-header face, followed by a line of inverse video.\nThis wasn't happening in 24.3, but I can't find a...
Of course when I am in Terminal and I press the up arrow key, it goes to the previous command. However, when I hit the M-x keys and type shell an integrated shell comes up in Emacs: However, if I type a command and press up, this happens: How do I get back to the last command I typed?
In Emacs, when you are using the integrated shell (which is typically invoked using `M-x shell`), the keybindings can differ from what you might expect in a standard terminal environment. If you want to navigate through your command history in the Emacs shell, you should use the following key combinations: - **Press ...
[ { "from": "human", "value": "Of course when I am in Terminal and I press the up arrow key, it goes to the previous command. However, when I hit the M-x keys and type shell an integrated shell comes up in Emacs:\n\nHowever, if I type a command and press up, this happens: \n\nHow do I get back to the last com...
According to fniessen's babel reference I should be able to set :eval yes on a babel header line to make a source block evaluate without confirmation. However, this doesn't seem to work for me on Emacs 24.4 and Org 8.2.10. Is this capability only available in org version 8.3 and beyond? If not, what do I need to do to...
The ability to use `:eval yes` in Org mode Babel header lines to evaluate source blocks without confirmation was introduced in Org mode 8.3. Since you are using Org version 8.2.10, this feature will not be available. To enable this functionality, you have two options: 1. **Upgrade Org Mode**: The best solution would ...
[ { "from": "human", "value": "According to fniessen's babel reference I should be able to set :eval yes on a babel header line to make a source block evaluate without confirmation. However, this doesn't seem to work for me on Emacs 24.4 and Org 8.2.10. Is this capability only available in org version 8.3 an...
This is cross-post from Stack Overflow I have a simple widget setup: (setq gobgen-widget-name (widget-create 'editable-field :size 25 :format "Name: %v" :notify (lambda (widget &rest ignore) (widget-value-set gobgen-w...
The behavior you’re encountering is a known quirk when using editable fields in Emacs widgets. When you update the value of one widget based on another, the focus can inadvertently shift to the other widget, causing the point to move to the end of the text. To resolve this and ensure that the focus remains on the "Nam...
[ { "from": "human", "value": "This is cross-post from Stack Overflow\nI have a simple widget setup:\n(setq gobgen-widget-name\n (widget-create 'editable-field\n :size 25\n :format \"Name: %v\"\n :notify (lambda (widget &rest ignore)\n ...
I found this list at the emacswiki: FFI (foreign function interface). Would be great to have this in GNU. Enhanced Numerics. We sorely need this too. Apparently much better multimedia support (Of particular interest to me.) Doubly-linked lists, skip lists, and some other possibly interesting data structures. Does Ema...
Yes, Emacs has a couple of places where you can submit feature requests or report issues. The main avenues are: 1. **Emacs Bug Tracker:** You can report bugs and request features through the Emacs issue tracker hosted on GNU Savannah. You can find it at [https://debbugs.gnu.org/](https://debbugs.gnu.org/). To submit a...
[ { "from": "human", "value": "I found this list at the emacswiki: \nFFI (foreign function interface). Would be great to have this in GNU.\nEnhanced Numerics. We sorely need this too.\nApparently much better multimedia support (Of particular interest to me.)\nDoubly-linked lists, skip lists, and some other po...
I am trying out a new major mode, how can I take advantage of Emacs' documentation system to get a listing of key bindings available in that specific buffer?
In Emacs, you can easily access documentation for key bindings in a specific major mode using the `describe-bindings` command. Here are the steps to view the key bindings available in the current buffer's major mode: 1. **Open the buffer** that is using the new major mode you're interested in. 2. **Run the `describe-...
[ { "from": "human", "value": "I am trying out a new major mode, how can I take advantage of Emacs' documentation system to get a listing of key bindings available in that specific buffer?\n" }, { "from": "gpt", "value": "In Emacs, you can easily access documentation for key bindings in a specific...
Emacs has the function fill-paragraph. Is there any function which will do the opposite of that? I have a paragraph which is already filled and instead I want it in a plain single line?
Yes, in Emacs, if you have a paragraph that is filled (i.e., it has been wrapped to a certain width), you can use the function `fill-paragraph` to unfill it. To achieve this, you can use the `unfill-paragraph` function, which is not built-in but can be easily defined. Here's how you can define `unfill-paragraph`: 1. ...
[ { "from": "human", "value": "Emacs has the function fill-paragraph. Is there any function which will do the opposite of that? \nI have a paragraph which is already filled and instead I want it in a plain single line?\n" }, { "from": "gpt", "value": "Yes, in Emacs, if you have a paragraph that is...
I know that I can look up help for a key sequence using C-h k <key sequence>, but I use Emacs in the terminal, and my terminal emulator doesn't pass all key sequences through to Emacs. Sometimes I'll see the notation for a given key sequence written somewhere without explanation, and I want to look up what it does, but...
Yes, there is an equivalent in Emacs that allows you to look up the documentation for key sequences without needing to type them. You can use the `describe-key` function directly with a key sequence written in a specific format. To look up a key sequence like `C-x`, you can use the command `M-x describe-key` followed ...
[ { "from": "human", "value": "I know that I can look up help for a key sequence using C-h k <key sequence>, but I use Emacs in the terminal, and my terminal emulator doesn't pass all key sequences through to Emacs. Sometimes I'll see the notation for a given key sequence written somewhere without explanation...
In a buffer in fundamental mode, I type Ctrl-x Ctrl-e at the end of the line (require 'eclimd) the minibuffer at the bottom says eclimd. Does it mean I run the command successfully? If yes, why does require output eclimd?
When you type `Ctrl-x Ctrl-e` at the end of a line in Emacs, it evaluates the expression before the cursor in the current buffer. In your case, you have the expression `(require 'eclimd)`. 1. **Successful Command**: If the minibuffer shows `eclimd`, it means that the `require` function was successful in loading the `e...
[ { "from": "human", "value": "In a buffer in fundamental mode, I type Ctrl-x Ctrl-e at the end of the line \n(require 'eclimd)\n\nthe minibuffer at the bottom says eclimd. Does it mean I run the command successfully?\nIf yes, why does require output eclimd?\n" }, { "from": "gpt", "value": "When y...
I have the code below: Hello There I am some code And want to add code in front of it, like: I said Hello I said There I said I am some code So how would I add a prefix to each line?
You can add a prefix to each line of text using various programming languages. Below are examples in Python, JavaScript, and Bash. ### Python Here's how you can do it in Python: ```python text = """Hello There I am some code""" # Split the text into lines and add the prefix prefixed_lines = ["I said " + line for lin...
[ { "from": "human", "value": "I have the code below:\nHello\nThere\nI am some code\n\nAnd want to add code in front of it, like:\nI said Hello\nI said There\nI said I am some code\n\nSo how would I add a prefix to each line? \n" }, { "from": "gpt", "value": "You can add a prefix to each line of t...
I have Ubuntu 12.04 running with Emacs 24.3. On computer startup, emacs --daemon is executed, and I have modified the emacs24.desktop to take emacsclient -c -a "" as exec parameter. However, whenever I try to open a file a new frame opens every time. Is there a way to make the file appear in a preexisting frame as a ne...
To achieve the behavior you're looking for—having `emacsclient` open files in an existing Emacs frame rather than creating a new frame each time—you can modify how `emacsclient` is invoked. It seems like your setup is almost correct, but the command `emacsclient -c -a ""` creates a new frame if no existing frame is fo...
[ { "from": "human", "value": "I have Ubuntu 12.04 running with Emacs 24.3.\nOn computer startup, emacs --daemon is executed, and I have modified the emacs24.desktop to take emacsclient -c -a \"\" as exec parameter. However, whenever I try to open a file a new frame opens every time.\nIs there a way to make t...
Is there a built-in command to delete the contents of a cell in a single keystroke within an org-mode table? Note, I don't want to delete the row, just the cell contents. | some text | ==> | | If not, how would you write this?
In Org-mode, there isn't a built-in command specifically for deleting the contents of a cell with a single keystroke. However, you can accomplish this with a combination of commands. One way to delete the contents of a cell in an Org-mode table is to use the following steps: 1. Navigate to the cell whose contents you...
[ { "from": "human", "value": "Is there a built-in command to delete the contents of a cell in a single keystroke within an org-mode table? Note, I don't want to delete the row, just the cell contents.\n | some text | ==> | |\n\nIf not, how would you write this?\n" }, { "from": "gpt", ...
I recently created the alias in eshell: alias hello 'echo "Hello World"' So now whenever I type hello: I am very used to creating temporary alias in the Terminal for more subtle use. And then putting my more permanent alias in the .bashrc file. So how do I remove the alias for hello? Do I have to set another alias ...
In `eshell`, which is the Emacs shell, the way to manage aliases is different from how you would do it in a traditional Bash shell. Here's how you can remove an alias in `eshell`: ### Removing an Alias in Eshell 1. **Using `unalias`**: In `eshell`, you can simply use the `unalias` command to remove an alias. To remov...
[ { "from": "human", "value": "I recently created the alias in eshell: \nalias hello 'echo \"Hello World\"'\n\nSo now whenever I type hello: \n\nI am very used to creating temporary alias in the Terminal for more subtle use. And then putting my more permanent alias in the .bashrc file. So how do I remove the ...
I have this line in my init.el file to set the size of the font in all frames: (push '(font . "DejaVu Sans Mono-10") default-frame-alist) It works but i'd like to have a bigger font in all buffers while keeping a smaller one for the mode line (so it could fit more information and be less distracting). The idea is to h...
You can achieve this by customizing the font size for different elements in Emacs. One approach is to set the default font size for buffers and then specify a smaller font size for the mode line. Here’s how you can do this in your `init.el` file: 1. Set the default font size for all frames (which will apply to buffers...
[ { "from": "human", "value": "I have this line in my init.el file to set the size of the font in all frames:\n(push '(font . \"DejaVu Sans Mono-10\") default-frame-alist)\n\nIt works but i'd like to have a bigger font in all buffers while keeping a smaller one for the mode line (so it could fit more informat...
Here is a screenshot showing the difference between sql-interactive-mode (top) and sql-mode (bottom). Why does the string not get highlighted properly in sql-interactive-mode? (Note - this also happens with no color theme enabled.
The difference in string highlighting between SQL interactive mode and SQL mode in editors or IDEs typically stems from how each mode parses and interprets the SQL syntax. Here are some possible reasons why string highlighting may not function properly in SQL interactive mode: 1. **Syntax Parsing**: SQL interactive mo...
[ { "from": "human", "value": "Here is a screenshot showing the difference between sql-interactive-mode (top) and sql-mode (bottom).\n\nWhy does the string not get highlighted properly in sql-interactive-mode? (Note - this also happens with no color theme enabled.\n" }, { "from": "gpt", "value": "...
After copying a "rectangle" using C-x r M-w, doing C-x r y yanks or pastes the rectangle. But that inserts the copied rectangle. How can I paste the copied rectangle so that it overwrites the text? Example: a b c d e f g h i j k▮l m n o p q r s t u▮ I copied the rectangle enclosed between the cursor positions shown...
To achieve the desired result of pasting a rectangle in Emacs such that it overwrites the existing text instead of inserting it, you can use a combination of rectangle commands to achieve that. Here's how to do it: 1. **Copy the Rectangle**: You already know how to do this. Use `C-x r M-w` or `M-x copy-rectangle-as-ki...
[ { "from": "human", "value": "After copying a \"rectangle\" using C-x r M-w, doing C-x r y yanks or pastes the rectangle. But that inserts the copied rectangle.\nHow can I paste the copied rectangle so that it overwrites the text?\nExample:\n a b c d e f g\n h i j k▮l m n\n o p q r s t u▮\n\nI copied the rec...
I recently had a Sublime Text user try out Emacs for a while, and he was interested in getting the same auto-save behavior in Emacs. Basically, he wanted all buffers to be saved whenever the frame lost focus (really saved, not just backed-up). This includes when switching windows to a completely different application....
To achieve the desired behavior of auto-saving all buffers in Emacs when the frame loses focus (such as when switching to a different application), you'll need to rely on Emacs' built-in hooks and possibly utilize the `focus-out` event. Here's a solution using `focus-out` and a small function that saves all buffers wh...
[ { "from": "human", "value": "I recently had a Sublime Text user try out Emacs for a while, and he was interested in getting the same auto-save behavior in Emacs. \nBasically, he wanted all buffers to be saved whenever the frame lost focus (really saved, not just backed-up). This includes when switching wind...
I would like to wrap kill-ring-save in order to only execute kill-ring-save if text has been highlighted - same as in most text editors. Sometimes I accidentally hit copy instead of paste and then my clipboard is over written, but I have not selected any text for copying. Personally it's a complete workflow killer. Som...
You can achieve this by wrapping the `kill-ring-save` function in your custom function and checking if there's any selected text in the active region before performing the copy operation. In Emacs Lisp, you can check if the mark is set and if the point is not equal to the mark to determine if text is highlighted. Here...
[ { "from": "human", "value": "I would like to wrap kill-ring-save in order to only execute kill-ring-save if text has been highlighted - same as in most text editors.\nSometimes I accidentally hit copy instead of paste and then my clipboard is over written, but I have not selected any text for copying. Perso...
After modifying multiple files, how can I save all their buffers?
In text editors like Vim, Emacs, or others, there are specific commands to save all modified buffers. Here’s how to do it in some popular text editors: ### Vim To save all modified buffers in Vim, you can use the following command: 1. Press `Esc` to ensure you are in Normal mode. 2. Type `:wa` and hit `Enter`. The `...
[ { "from": "human", "value": "After modifying multiple files, how can I save all their buffers?\n" }, { "from": "gpt", "value": "In text editors like Vim, Emacs, or others, there are specific commands to save all modified buffers. Here’s how to do it in some popular text editors:\n\n### Vim\nTo s...
From the Emacs Eclim github page: Install emacs-eclim. You have two options: Installation from the MELPA package archive. Just add the archive to package-archives if you haven't already, and then install emacs-eclim with the package-install command. Manual installation from GitHub. (git clone git://github.com/senny/...
The error message you received, "Install package: emacs-eclim [No Match]", indicates that Emacs was unable to find the `emacs-eclim` package in the package repositories you configured. There could be a few reasons for this issue: 1. **Package Archive URL**: The URL for the MELPA repository you provided may be outdated...
[ { "from": "human", "value": "From the Emacs Eclim github page:\n\nInstall emacs-eclim. You have two options:\n\nInstallation from the MELPA package archive.\nJust add the archive to package-archives if you\nhaven't already, and\nthen install emacs-eclim with the package-install\ncommand.\n\nManual installat...
When using ispell to check spelling and encountering an incorrect word, pressing r takes you to the minibuffer where you can enter a replacement for the misspelled word. By default the minibuffer already contains the incorrectly spelled word and so I need to clear the minibuffer first before being able to type in the r...
To add a hook in Emacs that automatically clears the minibuffer when you're in `ispell` and need to input a replacement for a misspelled word, you can customize the behavior using the `ispell` hooks provided by Emacs. You can achieve this by adding a function to the `ispell-replace-with-word` hook. Here's how to do it...
[ { "from": "human", "value": "When using ispell to check spelling and encountering an incorrect word, pressing r takes you to the minibuffer where you can enter a replacement for the misspelled word. By default the minibuffer already contains the incorrectly spelled word and so I need to clear the minibuffer...
When you set Emacs to recognize 4 spaces as 1 tab, then copy text from an Emacs buffer to another program, will the other program see 4 spaces or interpret it as 1 tab (which may correspond to a different number of spaces, depending on setup)?
In Emacs, when you set it to recognize 4 spaces as 1 tab (for example, by setting `tab-width` to 4), it affects how text is displayed and how indentation is handled within Emacs itself. However, this setting does not change the actual representation of tabs and spaces when you copy text from an Emacs buffer to another ...
[ { "from": "human", "value": "When you set Emacs to recognize 4 spaces as 1 tab, then copy text from an Emacs buffer to another program, will the other program see 4 spaces or interpret it as 1 tab (which may correspond to a different number of spaces, depending on setup)?\n" }, { "from": "gpt", ...
When I write a long line while composing a mail in mu4e, the lines are truncated for viewing (toggle-truncate-lines), but as soon as I hit Enter fixed line breaks (column width seems to be 70 or something) are introduced. How can I stop mu4e from introducing these line breaks?
In `mu4e`, the behavior of inserting fixed line breaks when composing emails is influenced by the `fill-column` variable. When you hit Enter, it automatically fills the current paragraph to the `fill-column`, which by default may be set to 70 characters. To prevent `mu4e` from automatically inserting line breaks when ...
[ { "from": "human", "value": "When I write a long line while composing a mail in mu4e, the lines are truncated for viewing (toggle-truncate-lines), but as soon as I hit Enter fixed line breaks (column width seems to be 70 or something) are introduced.\nHow can I stop mu4e from introducing these line breaks?\...
Is there a gdocs-mode or something I could use to edit Google Docs?
As of my last knowledge update in October 2023, there isn't a specific "gdocs-mode" for Google Docs that allows direct editing within terminal or command-line interfaces like Emacs or Vim. Google Docs is primarily a web-based application that relies on a graphical user interface. However, if you're looking for ways to...
[ { "from": "human", "value": "Is there a gdocs-mode or something I could use to edit Google Docs?\n" }, { "from": "gpt", "value": "As of my last knowledge update in October 2023, there isn't a specific \"gdocs-mode\" for Google Docs that allows direct editing within terminal or command-line inter...
I'm already used to press C-h f and type a function name to ask for help on that function. But if the function name is already under the cursor (e.g. while visiting the .emacs configuration file), is there a way to avoid typing the whole thing again?
Yes, in Emacs, you can easily obtain help for a function that is under the cursor without having to type the whole name again. You can use the `C-h f` (which is `describe-function`) command in combination with the built-in functionality to grab the function name at the point (the cursor). Here's how you can do it: 1...
[ { "from": "human", "value": "I'm already used to press C-h f and type a function name to ask for help on that function. But if the function name is already under the cursor (e.g. while visiting the .emacs configuration file), is there a way to avoid typing the whole thing again? \n" }, { "from": "g...
C-e C-j will insert a newline below and jump to it indented. C-a C-o TAB will insert a newline above and jump to it indented. Is there a single bind to these or where/how should I bind these commands?
To create a single binding that inserts a newline below and jumps to it indented (like `C-e C-j`) or inserts a newline above and jumps to it indented (like `C-a C-o TAB`), you can create a custom function in Emacs Lisp that allows you to choose which operation to perform. You can use the following Emacs Lisp code to d...
[ { "from": "human", "value": "C-e C-j will insert a newline below and jump to it indented.\nC-a C-o TAB will insert a newline above and jump to it indented.\nIs there a single bind to these or where/how should I bind these commands?\n" }, { "from": "gpt", "value": "To create a single binding that...
I'm trying to add some functionality to someone else's package, and so I'd like to respect their patterns. Unfortunately, one of these patterns is to not use kbd. I need to bind a function to C-S-b, but I can't figure out how. I know how to do this with a single modifier (e.g. "\S-b"), but I can't get it to work with m...
To bind a key combination like `C-S-b` in Emacs Lisp while avoiding the use of `kbd`, you can use the `vector` construct to specify the key sequence more clearly. Unfortunately, using `C-S-b` directly like that can lead to difficulties since the notation for modifiers can be a bit tricky. For `C-S-b`, you can define i...
[ { "from": "human", "value": "I'm trying to add some functionality to someone else's package, and so\nI'd like to respect their patterns. Unfortunately, one of these\npatterns is to not use kbd.\nI need to bind a function to C-S-b, but I can't figure out how. I\nknow how to do this with a single modifier (e....
I want to make it so that org-agenda-mode defaults to always having (org-agenda-follow-mode) toggled on.
To have `org-agenda-follow-mode` always toggled on by default in `org-agenda-mode`, you can add a custom function to your Emacs configuration (usually your `init.el` or `.emacs` file). This function will enable `org-agenda-follow-mode` whenever `org-agenda` is activated. Here's how you can do it: 1. Open your Emacs c...
[ { "from": "human", "value": "I want to make it so that org-agenda-mode defaults to always having (org-agenda-follow-mode) toggled on.\n" }, { "from": "gpt", "value": "To have `org-agenda-follow-mode` always toggled on by default in `org-agenda-mode`, you can add a custom function to your Emacs c...
I've added a custom key for the org agenda to show all unscheduled TODO items following Sacha Chua: (defun sacha/org-agenda-skip-scheduled () (org-agenda-skip-entry-if 'scheduled 'deadline 'regexp "\n]+>")) (setq org-agenda-custom-commands '(("u" "Unscheduled tasks" alltodo "" ((org-agenda-skip-function 'sa...
To bind your custom Org agenda command to a single key, you can create a function that runs the agenda command directly. You can achieve this by using the `org-agenda` function with the appropriate arguments for your custom command. Here's how you can do it: 1. First, create a new function that calls your custom agend...
[ { "from": "human", "value": "I've added a custom key for the org agenda to show all unscheduled TODO items following Sacha Chua:\n(defun sacha/org-agenda-skip-scheduled ()\n (org-agenda-skip-entry-if 'scheduled 'deadline 'regexp \"\\n]+>\"))\n\n(setq org-agenda-custom-commands\n '((\"u\" \"Unscheduled ta...
When searching using: C-s SPC SPC Also matches single spaces. I want to match exactly two space.
In many text editors or search utilities, the command you're using (`C-s SPC SPC`) is indeed likely searching for all spaces, including single spaces. If you want to specifically match exactly two spaces, you'll need to adjust your search string. Here’s how you can do it in various contexts: ### In Emacs If you are u...
[ { "from": "human", "value": "When searching using:\nC-s SPC SPC\n\nAlso matches single spaces. I want to match exactly two space.\n" }, { "from": "gpt", "value": "In many text editors or search utilities, the command you're using (`C-s SPC SPC`) is indeed likely searching for all spaces, includi...
At times while working on a code, it's useful to quickly open a *scratch* buffer to paste a snippet from that code file. If I am working on a Perl script, I would like to quickly open a *scratch* buffer with in cperl-mode. It would also be nice to quickly jump back to the code buffer I was originally working in.
You can achieve this in Emacs by creating a custom function that opens a scratch buffer in `cperl-mode` and allows you to jump back to the original buffer easily. Here’s how you can set this up: 1. **Create the function**: You can define a new function in your Emacs configuration file (usually `~/.emacs` or `~/.emacs....
[ { "from": "human", "value": "At times while working on a code, it's useful to quickly open a *scratch* buffer to paste a snippet from that code file. \nIf I am working on a Perl script, I would like to quickly open a *scratch* buffer with in cperl-mode. It would also be nice to quickly jump back to the code...
I tried it with the following settings: (add-hook 'minibuffer-setup-hook (lambda () (make-local-variable 'face-remapping-alist) (add-to-list 'face-remapping-alist '(default (:background "green"))))) (set-face-background 'minibuffer-prompt "blue") but they only affected the active minibuffer:
To make the settings apply to all minibuffer sessions, including those that are not currently active, you need to ensure that the face-remapping takes effect for each new minibuffer session. In Emacs, you can do this by using the `minibuffer-setup-hook`, which runs each time the minibuffer is opened. Your current code...
[ { "from": "human", "value": "\nI tried it with the following settings:\n(add-hook 'minibuffer-setup-hook\n (lambda ()\n (make-local-variable 'face-remapping-alist)\n (add-to-list 'face-remapping-alist '(default (:background \"green\")))))\n\n(set-face-background 'minibuffer-prompt \"blue\...
I'm trying to understand how syntax tables work, but my minimal major mode doesn't highlight anything. I've written the following elisp, which is just supposed to highlight comments: (defconst my-yaml-mode-syntax-table (let ((table (make-syntax-table))) (modify-syntax-entry ?# "<" table) (modify-syntax-entry ...
It looks like you've set up a basic syntax table for comments in your minimal major mode, which is a good start. However, to enable highlighting for comments, you also need to define some font lock keywords so that Emacs knows to apply specific faces to the text. Here's how you can extend your `my-yaml-mode` to includ...
[ { "from": "human", "value": "I'm trying to understand how syntax tables work, but my minimal major mode doesn't highlight anything.\nI've written the following elisp, which is just supposed to highlight comments:\n(defconst my-yaml-mode-syntax-table\n (let ((table (make-syntax-table)))\n (modify-syntax-...
I heard that we can view pdf files in emacs. Is it done by converting pdf files to plain texts first? Can we view pdf files at its fullness in emacs? can we edit pdf files in emacs? Thanks.
Yes, you can view PDF files in Emacs, but it doesn't involve converting them to plain text. Instead, Emacs uses specialized packages to handle PDF files. Here's a breakdown of what you can do with PDFs in Emacs: 1. **Viewing PDF Files**: - You can view PDF files directly in Emacs using a package called `pdf-tools`...
[ { "from": "human", "value": "I heard that we can view pdf files in emacs. Is it done by converting pdf files to plain texts first?\nCan we view pdf files at its fullness in emacs?\ncan we edit pdf files in emacs?\nThanks.\n" }, { "from": "gpt", "value": "Yes, you can view PDF files in Emacs, but...
From time to time I observe unexpected behavior when editing text. My first recourse is usually to use C-h k to find out what functions are being called by a given key sequence. However, sometimes the documentation is at odds with the observed behavior. In these cases, I usually assume that some other package has ho...
Yes, there are indeed more efficient ways to track down which functions or packages are modifying the behavior of key sequences in Emacs. Here are some strategies you can use to identify hooks and overrides without needing to disable packages one at a time: 1. **Check Active Minor Modes**: Some behavior might be cause...
[ { "from": "human", "value": "From time to time I observe unexpected behavior when editing text. My first recourse is usually to use C-h k to find out what functions are being called by a given key sequence. However, sometimes the documentation is at odds with the observed behavior. In these cases, I usua...
Sometimes describe- or apropos- are not enough. How can I search the Emacs Lisp Reference Manual (C-h i m elisp) from within emacs?
In Emacs, you can search the Emacs Lisp Reference Manual using the built-in Info system. Here are a few methods to help you search the manual effectively: 1. **Using the Info Search Function**: - Once you are in the Info buffer for the Emacs Lisp manual (`C-h i m elisp`), you can search for a specific term by press...
[ { "from": "human", "value": "Sometimes describe- or apropos- are not enough. How can I search the Emacs Lisp Reference Manual (C-h i m elisp) from within emacs?\n" }, { "from": "gpt", "value": "In Emacs, you can search the Emacs Lisp Reference Manual using the built-in Info system. Here are a fe...
I want to get onto the #Emacs channel on Freenode. How do I do it?
To join the #Emacs channel on Freenode, you can use an IRC client. Here's a general guide on how to do it: 1. **Choose an IRC Client**: If you don't have an IRC client installed, you can use a desktop client like HexChat, Irssi, or mIRC. Alternatively, you can use a web-based client like Kiwi IRC or Mibbit. 2. **Conn...
[ { "from": "human", "value": "I want to get onto the #Emacs channel on Freenode. How do I do it?\n" }, { "from": "gpt", "value": "To join the #Emacs channel on Freenode, you can use an IRC client. Here's a general guide on how to do it:\n\n1. **Choose an IRC Client**: If you don't have an IRC cli...
So irony-mode scans include directories through a file called .clang_complete, which looks like something like: -I./include/ However, it does not automatically load this file. Rather, I have to go into the source file and call irony-cdb and then load it manually by hitting l. I tried: (add-hook 'c++-mode-hook 'irony-c...
To automate the process of loading the `.clang_complete` file in `irony-mode` when you enter C++ mode, you can follow these steps: 1. **Make sure you have installed and set up Irony Mode correctly**: Ensure that you have Irony Mode installed and configured properly in your Emacs. Check that `irony-mode` is enabled for...
[ { "from": "human", "value": "So irony-mode scans include directories through a file called .clang_complete, which looks like something like: -I./include/\nHowever, it does not automatically load this file. Rather, I have to go into the source file and call irony-cdb and then load it manually by hitting l. ...
Is there a way to maximize my window on start-up? Currently, I hit Control++Up on my keyboard but it is very bothersome to do that every time. I am using Emacs 24.4 on Ubuntu 12.04.
To make Emacs maximize its window on startup in Ubuntu, you can modify your Emacs configuration file. Here's how you can do it: 1. **Open your Emacs configuration file**: This is usually located at `~/.emacs` or `~/.emacs.d/init.el`. You can open it in Emacs by using `C-x C-f` and typing `~/.emacs.d/init.el` (or `~/.e...
[ { "from": "human", "value": "Is there a way to maximize my window on start-up?\nCurrently, I hit Control++Up on my keyboard but it is very bothersome to do that every time.\nI am using Emacs 24.4 on Ubuntu 12.04.\n" }, { "from": "gpt", "value": "To make Emacs maximize its window on startup in Ub...
After a recent update eldoc is turned on by default, even for emacs -Q. I don't appreciate the noise it generates when I'm using eval-expression. How do I turn it off?
If `eldoc` is enabled by default and you want to disable it, even when starting Emacs with `-Q`, you can do so by adding a few lines to your Emacs configuration file (`init.el` or `.emacs`). Here’s how you can disable `eldoc`: 1. Open your Emacs configuration file (e.g., `~/.emacs` or `~/.emacs.d/init.el`). 2. Add th...
[ { "from": "human", "value": "After a recent update eldoc is turned on by default, even for emacs -Q.\nI don't appreciate the noise it generates when I'm using eval-expression.\nHow do I turn it off?\n" }, { "from": "gpt", "value": "If `eldoc` is enabled by default and you want to disable it, eve...
I manage packages in Emacs using Cask and Pallet. Yesterday I upgraded to Emacs 24.4; it went well enough, but all of a sudden all my packages were missing. Cask installs packages in separate directories by Emacs version, so everything was in .cask/24.3.1; there was nothing in .cask/24.4.1, and in fact the directory ...
When upgrading Emacs versions and using Cask to manage packages, it's common to encounter the situation where your packages from the previous version are not immediately available due to them being stored in a version-specific directory. While Cask doesn't automatically migrate packages between versions, you can create...
[ { "from": "human", "value": "I manage packages in Emacs using Cask and Pallet. Yesterday I upgraded to Emacs 24.4; it went well enough, but all of a sudden all my packages were missing. Cask installs packages in separate directories by Emacs version, so everything was in .cask/24.3.1; there was nothing in...
I am trying to make the Evil function evil-jump-to-tag, C-] behave like the Emacs binding M-.. The normal behaviour is fine for browsing Tags files, but I want it to work also for Slime's slime-edit-definition, Elisps' elisp-slime-nav-find-elisp-thing-at-point, Clojures cider-jump-to-var, etc... These major modes and m...
To achieve the desired functionality in Evil mode where the `C-]` keybinding mimics the behavior of `M-.` in various modes (like Slime, Elisp, CIDER, etc.), you can define a custom command that dynamically invokes the corresponding function bound to `M-.` in the major mode you are currently using. Here’s a way to imp...
[ { "from": "human", "value": "I am trying to make the Evil function evil-jump-to-tag, C-] behave like the Emacs binding M-..\nThe normal behaviour is fine for browsing Tags files, but I want it to work also for Slime's slime-edit-definition, Elisps' elisp-slime-nav-find-elisp-thing-at-point, Clojures cider-j...
I have the following function, adapted slightly from here: ;; Insert text around a region. In this case, it's ;; the LaTeX code environment from the listings package (defun wrap-code (start end) "Insert a \begin{code} and \end{code} around a region." (interactive "r") (save-excursion (goto-char start) (inser...
The issue you're encountering arises because the position of `end` shifts after you insert the `\begin{code}`. When you insert text before the end of a region, the end position moves further along, and when you then insert `\end{code}`, it goes in the wrong place. To fix this, you can adjust the end position by addin...
[ { "from": "human", "value": "I have the following function, adapted slightly from here:\n;; Insert text around a region. In this case, it's\n;; the LaTeX code environment from the listings package \n(defun wrap-code (start end)\n \"Insert a \\begin{code} and \\end{code} around a region.\"\n (interactive \...
I was reading through the Changelog for emacs 24.4 (C-hn) and was trying to see what the File Notification feature is. I tried doing C-hv of a related variable auto-revert-use-notify but nothing showed up. I then grepped for that variable name in the emacs source code and found that it was used in lisp/autorevert.el. A...
In Emacs, many features and libraries are organized into separate files, and they may not be loaded automatically unless they are explicitly required or used. If you want to discover built-in features, functions, and variables that are not active by default, here are some strategies you can use: 1. **Documentation and...
[ { "from": "human", "value": "I was reading through the Changelog for emacs 24.4 (C-hn) and was trying to see what the File Notification feature is. I tried doing C-hv of a related variable auto-revert-use-notify but nothing showed up.\nI then grepped for that variable name in the emacs source code and found...
This is a really nice feature, but it only displays when inserting a paren, not when changing to a cursor position. Is there an interactive command that I can call to display this? Can I configure it to show up on cursor move?
It sounds like you're discussing a feature in a code editor or an integrated development environment (IDE) that provides some sort of auto-completion or snippet insertion when typing certain characters, such as parentheses. To provide a more precise answer, it would be helpful to know which code editor or IDE you are...
[ { "from": "human", "value": "This is a really nice feature, but it only displays when inserting a paren, not when changing to a cursor position. Is there an interactive command that I can call to display this? Can I configure it to show up on cursor move?\n\n" }, { "from": "gpt", "value": "It so...
Is there any way to have time constant in an Org spreadsheet formula? For example, i would like to have something like this: @>$3=@>$5-'08:00:00'*vcount(@2..@-1) to calculate how much longer I've been at work than I have to be :) The @>$5 is the total sum of hours I've been at work and @2..@-1 are the rows with days I...
In Org mode, you can indeed use time constants in spreadsheet formulas, but you need to be careful with the format and the way you represent time. Since you want to subtract a time constant from the sum of hours worked, you'll have to convert your time constant to a format that Org mode understands for calculations. H...
[ { "from": "human", "value": "Is there any way to have time constant in an Org spreadsheet formula? For example, i would like to have something like this:\n@>$3=@>$5-'08:00:00'*vcount(@2..@-1)\n\nto calculate how much longer I've been at work than I have to be :) The @>$5 is the total sum of hours I've been ...
By default when org-mode documents are exported to HTML, the section and sub-section links look like file:///path/to/export/location/doc.html#sec-1-1 The problem is that the above link won't point to the correct section if I rearrange the sections. How can we have permalinks for each section auto-generated that look l...
To create permalinks for sections in an Org-mode document that do not change when you rearrange the sections, you can use the `:CUSTOM_ID` property for each header. This allows you to specify a custom ID for the section, which Org-mode will use in the exported HTML file. Here’s how to do it: 1. **Set the Custom ID fo...
[ { "from": "human", "value": "By default when org-mode documents are exported to HTML, the section and sub-section links look like\nfile:///path/to/export/location/doc.html#sec-1-1\n\nThe problem is that the above link won't point to the correct section if I rearrange the sections.\nHow can we have permalink...
It is well known that when you type M-x doctor, a kind of AI program prompt you to write about your problems, as a psychotherapist does. Some said it's an easter egg, but it seems it goes beyond the fun. The manual says (33.2.8 in a 2007 paper edition): If using Emacs (or something else) becomes terribly frustrating ...
The `M-x doctor` feature in Emacs is often seen as a humorous nod to the therapeutic process, and while it may not be a substitute for real therapy, some users have reported using it as a form of lighthearted reflection or stress relief during moments of frustration with the software or programming in general. Here ar...
[ { "from": "human", "value": "It is well known that when you type M-x doctor, a kind of AI program prompt you to write about your problems, as a psychotherapist does. Some said it's an easter egg, but it seems it goes beyond the fun.\nThe manual says (33.2.8 in a 2007 paper edition): \n\nIf using Emacs (or s...
Q: how can I get "proper" indentation of LaTeX itemize environments in auctex? Here's where I'd like to be with an item in an itemize environment: \item line is indented two spaces relative to the beginning of the environment continuation lines in the item are indented an additional two spaces relative to the \item li...
To achieve the desired indentation behavior for the `itemize` environment in AUCTeX, you will need to customize two key variables related to indentation in LaTeX: 1. **`LaTeX-item-indent`**: This controls the indentation for the initial `\item`. 2. **`LaTeX-continued-item-offset`**: This determines the additional offs...
[ { "from": "human", "value": "Q: how can I get \"proper\" indentation of LaTeX itemize environments in auctex?\nHere's where I'd like to be with an item in an itemize environment:\n\n\\item line is indented two spaces relative to the beginning of the environment\ncontinuation lines in the item are indented a...
Is it possible to teach customize to save its variables using single quote ' instead of quote? Example: … '(package-archives '(("gnu" . "http://elpa.gnu.org/packages/") ("melpa" . "http://melpa.org/packages/"))) … instead of: … '(package-archives (quote (("gnu" . "http://elpa.gnu.org/packages...
In Emacs Lisp, the use of single quotes (') is a shorthand for the `quote` special form. When you write something like `'(a b c)`, it is equivalent to `(quote (a b c))`. However, the single quote itself cannot be replaced with a different character or quote style (like using a backquote or something else) as that wou...
[ { "from": "human", "value": "Is it possible to teach customize to save its variables using single quote ' instead of quote?\nExample:\n\n…\n'(package-archives '((\"gnu\" . \"http://elpa.gnu.org/packages/\")\n (\"melpa\" . \"http://melpa.org/packages/\")))\n…\n\ninstead of:\n…\n'(packag...
I have both eldoc and flycheck enabled in a .el buffer. I have a line, eg: (setq load-dirs (concat emacs-repos-dir "internal")) Here, load-dirs is underlined by flycheck as an error, but if point is over load-dirs then eldoc will display the definition of 'setq' for about half a second before the flycheck message is ...
To reduce the timeout for how long Eldoc displays its messages before Flycheck shows its error messages, you can customize the `eldoc-idle-delay` variable. By default, this is set to 0.5 seconds (or 500 milliseconds), but you can reduce this to a smaller value to make the Eldoc display the help message for a shorter pe...
[ { "from": "human", "value": "I have both eldoc and flycheck enabled in a .el buffer. I have a line, eg:\n(setq load-dirs (concat emacs-repos-dir \"internal\"))\n\nHere, load-dirs is underlined by flycheck as an error, but if point is over load-dirs then eldoc will display the definition of 'setq' for about...
If I make a table (with M-x table-insert), the background color is a dark blue, and the text color is a light grey. I'd like to make the face different, but I'm not sure what face I need to change. The emacs documentation for tables doesn't say what the face is. I'd like to find the face used without having to look thr...
To find out the face used for tables in Emacs, you can use the `M-x` command `describe-face`. Here are the steps to identify and change the face used in tables: 1. **Insert a Table**: First, create a table using `M-x table-insert`. 2. **Identify the Face**: Move your cursor over the table's text (any cell) and then r...
[ { "from": "human", "value": "If I make a table (with M-x table-insert), the background color is a dark blue, and the text color is a light grey. I'd like to make the face different, but I'm not sure what face I need to change.\nThe emacs documentation for tables doesn't say what the face is. I'd like to fin...
I'm trying to create a "calendar only" view of my org-mode agenda -- only headlines that have a "cal" category. The org-agenda-custom-commands below (the first block) works brilliantly for viewing within emacs, but the filter doesn't work when I C-a a e to export. That is, calendar.txt ends up with headlines from all c...
In Emacs Org mode, custom agenda views defined using `org-agenda-custom-commands` can be a bit confusing when it comes to filtering and exporting. The issue you're experiencing—where the category filter works when viewing the agenda in Emacs but not when exporting—stems from how the export functionality interacts with ...
[ { "from": "human", "value": "I'm trying to create a \"calendar only\" view of my org-mode agenda -- only headlines that have a \"cal\" category. The org-agenda-custom-commands below (the first block) works brilliantly for viewing within emacs, but the filter doesn't work when I C-a a e to export. That is, c...
For example in a org file (cursor represented as |): * heading this is body |of the heading 1. some 2. list After 'org-beginning-of-line' : * heading |this is body of the heading 1. some 2. list Is there a good way to do this without losing org-mode syntax awareness org-beginning-of-line provi...
To achieve the goal of moving the cursor to the beginning of the line while preserving Org-mode syntax awareness, you can use the `org-beginning-of-line` function in a specific way. However, it seems that you want to preserve the indentation of the text under the heading when moving the cursor to the start of the line....
[ { "from": "human", "value": "For example in a org file (cursor represented as |):\n* heading\n this is body |of the heading\n 1. some\n 2. list\n\nAfter 'org-beginning-of-line' :\n* heading\n |this is body of the heading\n 1. some\n 2. list\n\nIs there a good way to do this without losing ...
When I enable line numbers in Emacs the cursor starts in a line with no number in it. If you press enter then the numbers increment but always there is a line with no number. Why is that happening?
The behavior you're observing in Emacs, where the cursor starts on a line without a line number when line numbers are enabled, is likely related to how Emacs displays line numbers in conjunction with certain modes or settings. By default, Emacs may show line numbers in the left margin. If you are in a mode that uses l...
[ { "from": "human", "value": "When I enable line numbers in Emacs the cursor starts in a line with no number in it. If you press enter then the numbers increment but always there is a line with no number. Why is that happening?\n\n\n" }, { "from": "gpt", "value": "The behavior you're observing in...
I just tried to install ascii-art-to-unicode from the gnu repository (http://elpa.gnu.org/) via list-packages. I get the following error: package--check-signature: Failed to verify signature ascii-art-to-unicode-1.9.el.sig: ("No public key for 474F05837FBDEF9B created at 2014-09-24T16:20:01+0200 using DSA")...
The error you're encountering indicates that Emacs is unable to verify the signature of the `ascii-art-to-unicode` package because it doesn't have the public key used to sign that package. Here's how you can resolve this issue: ### Steps to Resolve the Signature Verification Error 1. **Check if GPG is Installed:** ...
[ { "from": "human", "value": "I just tried to install ascii-art-to-unicode from the gnu repository (http://elpa.gnu.org/) via list-packages. I get the following error:\npackage--check-signature: Failed to verify signature \n ascii-art-to-unicode-1.9.el.sig: (\"No public key \n for 474F05837FBDEF9B create...
I have the below: (setq some-variable "less") I am confused why I have to use the single quote with boundp but not with bound-and-true-p. Example 1: (when (boundp 'some-variable) (message "some-variable is %s" some-variable)) Result: "some-variable is less" Example 2a: (when (bound-and-true-p some-variable) ;; ...
The difference in how `boundp` and `bound-and-true-p` work regarding quoting can be attributed to how each function interprets its arguments. ### `boundp` The `boundp` function is designed to check if a symbol has a value. It requires a symbol as its argument, which is why you need to quote the variable when checking...
[ { "from": "human", "value": "I have the below:\n(setq some-variable \"less\")\n\nI am confused why I have to use the single quote with boundp but not with bound-and-true-p.\nExample 1:\n(when (boundp 'some-variable) \n (message \"some-variable is %s\" some-variable))\n\nResult:\n\n\"some-variable is less\...
I am aware that org-mode derives from outline-mode, in the same way as outline-mode derives from text-mode, which derives from nil. I have always wonder if there exists something similar to a documented tree of major modes allowing to follow hooks, so that fundamental-mode might be at the base of them all. Is there a ...
In Emacs, there is not a single, official, comprehensive document that lays out the entire hierarchy of major modes like a tree structure. However, there are several ways you can explore the relationships and hierarchies of major modes. 1. **Documentation within Emacs**: You can look at the documentation for specific ...
[ { "from": "human", "value": "I am aware that org-mode derives from outline-mode, in the same way as outline-mode derives from text-mode, which derives from nil. \nI have always wonder if there exists something similar to a documented tree of major modes allowing to follow hooks, so that fundamental-mode mig...
CEDET prevents me from doing M-x load-file init.el with the error: progn: CEDET Version 2.0 already loaded. How do I modify my CEDET load line to load conditionally? The current line looks like: (load-file "~/.emacs.d/cedet/cedet-devel-load.el")
The error message you are encountering indicates that CEDET is already loaded, and you want to avoid attempting to load it again. To load CEDET conditionally, you can check if a specific CEDET feature or function is already defined before attempting to load it. One common way to achieve this is by using the `require` f...
[ { "from": "human", "value": "CEDET prevents me from doing M-x load-file init.el with the error:\nprogn: CEDET Version 2.0 already loaded.\n\nHow do I modify my CEDET load line to load conditionally? The current line looks like:\n(load-file \"~/.emacs.d/cedet/cedet-devel-load.el\")\n\n" }, { "from": ...
In C there is the magic variable __func__ that holds the current function name. In Bash, there is an array FUNCNAME holding the names of all functions in the calling stack !!! Is there a similar thing in Emacs Lisp? Or any simple way for a function to have access to its name? I have not found any answer in the Emacs Li...
In Emacs Lisp, there isn't a built-in variable like `__func__` in C or `FUNCNAME` in Bash that directly provides the current function name. However, you can use the `symbol-name` function along with the special variable `this` to get the name of the currently running function. Here’s a common idiom to achieve this in ...
[ { "from": "human", "value": "In C there is the magic variable __func__ that holds the current function name. In Bash, there is an array FUNCNAME holding the names of all functions in the calling stack !!!\nIs there a similar thing in Emacs Lisp? Or any simple way for a function to have access to its name?\n...
Is there a way (or package) to search and replace code like: class Account def list_accounts end end to class Company def list_companies end end Basically I want to replace account(s) with compan(y/ies) Vim does this with Subvert
Yes, you can achieve a search-and-replace operation similar to what you described using various tools and languages. Here are a few options you can consider: ### 1. **Using Vim with Subvert** Since you mentioned Vim, you can use the `:s` command for substitution. However, to achieve more complex substitutions (like c...
[ { "from": "human", "value": "Is there a way (or package) to search and replace code like:\nclass Account\n def list_accounts\n end\nend\n\nto\nclass Company\n def list_companies\n end\nend\n\nBasically I want to replace account(s) with compan(y/ies)\nVim does this with Subvert\n" }, { "from": "g...
I'm trying to make EIN work within Emacs, but right now (with IPython 2) it seems that it's not possible. This errors arise: REQUEST [error] Error from parser ein:json-read: (json-readtable-error) ein: [error] Error (parse-error) while opening notebook list at the server 8888. But while trying to solve this problem I ...
Using EIN (Emacs IPython Notebook) offers several advantages over just using an IPython shell within Emacs. Here are some key benefits of using EIN: 1. **Notebook Interface**: EIN provides a rich notebook interface that allows you to organize your code, text, and output in a more structured way. This is particularly u...
[ { "from": "human", "value": "I'm trying to make EIN work within Emacs, but right now (with IPython 2) it seems that it's not possible. This errors arise:\nREQUEST [error] Error from parser ein:json-read: (json-readtable-error)\nein: [error] Error (parse-error) while opening notebook list at the server 8888....
The emacsclient program allows a flag --no-wait (abbreviated as -n) which will cause the emacs server to visit the specified file, and return immediately. emacsclient -n ~/.bashrc If I provide an alternate editor, then this will still work in cases where there is no running Emacs server emacsclient -n -a "/usr/local/b...
Yes, you can achieve the desired behavior by using the `--daemon` option when starting Emacs, which runs Emacs as a background server process. This way, even if you invoke `emacsclient` in a situation where there is no active server, it will start a new Emacs server in daemon mode and return immediately. Here's how yo...
[ { "from": "human", "value": "The emacsclient program allows a flag --no-wait (abbreviated as -n) which will cause the emacs server to visit the specified file, and return immediately.\nemacsclient -n ~/.bashrc\n\nIf I provide an alternate editor, then this will still work in cases where there is no running ...
Generally in the LaTeX or beamer preamble, we add some packages and options for reference and enable them if required. %\usepackage{someusefulpackage} In Org mode export to LaTeX or beamer, when I specify options in the file header, how to comment them out #+BEAMER_COLOR_THEME: dove #+LATEX_HEADER: \usepackage{usefu...
In Org mode, you can comment out lines in the header by adding a `#` at the beginning of the line. This makes Org mode ignore those lines when exporting to LaTeX or Beamer. Here’s how you can comment out specific lines in your Org file: ```org #+BEAMER_COLOR_THEME: dove #+LATEX_HEADER: \usepackage{usefulPkg} # +LATEX_...
[ { "from": "human", "value": "Generally in the LaTeX or beamer preamble, we add some packages and options for reference and enable them if required. \n%\\usepackage{someusefulpackage}\n\nIn Org mode export to LaTeX or beamer, when I specify options in the file header, how to comment them out \n#+BEAMER_COLOR...
When opening a new file whose parent directory doesn't exist yet, I either open a shell window, or an Emacs shell buffer, and then mkdir the directory in it. I find this cumbersome. Is there an easier way?
Yes, there are more convenient ways to create a parent directory while opening a new file in Emacs. Here are a few approaches you can take: 1. **Using `find-file` with `create-directory`**: You can create a new file in a non-existing directory in one command by using the following approach: ```emacs-lisp (def...
[ { "from": "human", "value": "When opening a new file whose parent directory doesn't exist yet, I either open a shell window, or an Emacs shell buffer, and then mkdir the directory in it. I find this cumbersome. Is there an easier way?\n" }, { "from": "gpt", "value": "Yes, there are more conveni...
I have predictive, auctex installed. I want predictive mode to work with my .tex files but I keep getting a warning of: Warning (emacs): Predictive major-mode setup function predictive-setup-latex failed; latex-mode support disabled after trying to turn on predictive mode with M-x predictive-mode when a .tex file is ...
The issue you're encountering with the Predictive mode in Emacs for LaTeX files could be related to the `predictive` package not being able to find or work properly with `latex-mode`. Here are a few steps you can take to troubleshoot and potentially resolve the issue: 1. **Check Dependencies**: Make sure all necessary...
[ { "from": "human", "value": "I have predictive, auctex installed. I want predictive mode to work with my .tex files but I keep getting a warning of: \nWarning (emacs): Predictive major-mode setup function predictive-setup-latex failed; latex-mode support disabled \nafter trying to turn on predictive mode wi...
I'm trying to use org-mode to do almost everything. In my scientific writing activity, I would like to sketch a whole paper in an .org file and then export in LaTeX. I don't want to load the .bib bibtex file in the init.el as I could have multiple ones. For now, I've added this at the head of my .org file: #+BEGIN_SRC ...
To automatically set the bibliography file for each Org mode file without having to manually execute a code block every time, you can use Org mode's file-local variables feature. This allows you to specify variable settings that will apply when the specific Org file is opened. Here's how you can do that: 1. At the e...
[ { "from": "human", "value": "I'm trying to use org-mode to do almost everything. In my scientific writing activity, I would like to sketch a whole paper in an .org file and then export in LaTeX. I don't want to load the .bib bibtex file in the init.el as I could have multiple ones. For now, I've added this ...
When I switch buffers, emacs will switch to an existing frame if the buffer is already opened there. I found how to prevent that when switching with ido using : (setq ido-default-buffer-method 'selected-window) But it's not enough : for exemple if there's a lisp error emacs will automatically switch to the buffer *Bac...
Yes, you can configure Emacs to prevent it from switching to an existing frame when certain buffers are displayed, including when an error occurs and Emacs switches to the *Backtrace* buffer. To achieve this, you can use advice to override the behavior of certain functions that are responsible for displaying buffers. ...
[ { "from": "human", "value": "When I switch buffers, emacs will switch to an existing frame if the buffer is already opened there.\nI found how to prevent that when switching with ido using :\n(setq ido-default-buffer-method 'selected-window)\n\nBut it's not enough : for exemple if there's a lisp error emacs...
In pretty much every mode, whenever the word 'fix' occurs, whether its in a comment or not, it gets highlighted in a very visible way. I'm not sure what's causing this, and would like to turn it off. How do I do that?
The highlighting of the word "fix" in your environment is likely due to a specific feature or setting related to text highlighting or syntax highlighting. Here are a few common approaches to address this issue, depending on the context: 1. **Code Editor or IDE Settings**: - If you’re using an Integrated Developmen...
[ { "from": "human", "value": "In pretty much every mode, whenever the word 'fix' occurs, whether its in a comment or not, it gets highlighted in a very visible way. I'm not sure what's causing this, and would like to turn it off. How do I do that?\n" }, { "from": "gpt", "value": "The highlighting...
I'm trying to install php-mode, but I keep encountering this error when I run M-x php-mode: Symbol's function definition is void: cl-macroexpand-all The error persists whether I install php-mode via MELPA or manually. Environment: Emacs 24.3.94.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2014-10-04 on b...
The error you’re encountering, `Symbol's function definition is void: cl-macroexpand-all`, suggests that `php-mode` is trying to use a function from the Common Lisp (CL) library that is not defined in your version of Emacs. This function was introduced in later versions of Emacs than the one you're currently using (24....
[ { "from": "human", "value": "I'm trying to install php-mode, but I keep encountering this error when I run M-x php-mode:\nSymbol's function definition is void: cl-macroexpand-all\n\nThe error persists whether I install php-mode via MELPA or manually.\nEnvironment: Emacs 24.3.94.1 (x86_64-apple-darwin13.4.0,...
So emacs's java-mode handles indenting continued method invocations at the function body level out of the box, but it doesn't seem to handle them inside of an argument list. I'd like to override this behavior. I'm aware of C-c C-s, but in this particular example both the line that begins with Other and the line that be...
To achieve the desired indentation behavior in Emacs's `java-mode`, where chained method invocations within an argument list indent further than other arguments, you can customize the indentation rules by modifying the `c-offsets-alist` variable. Here's how you can do that: 1. Open your Emacs configuration file (usual...
[ { "from": "human", "value": "So emacs's java-mode handles indenting continued method invocations at the function body level out of the box, but it doesn't seem to handle them inside of an argument list. I'd like to override this behavior. I'm aware of C-c C-s, but in this particular example both the line th...
I got (setq-default fill-column 80) (setq-default truncate-lines nil) ;; which is default When using magit in Emacs, I know that I should avoid long commit messages, but sometimes they just cannot be avoid. The problem is: (setq-default truncate-lines nil) which is default setting does not work in magit: project buf...
To achieve the desired behavior in Magit while keeping the default settings for other buffers, you can customize the `magit` settings specifically for the project buffer and the commit message buffer. Here's how you can do it: 1. **Turn off line truncation in the Magit status buffer** (to see long lines without wrappi...
[ { "from": "human", "value": "I got \n(setq-default fill-column 80)\n(setq-default truncate-lines nil) ;; which is default\n\nWhen using magit in Emacs, I know that I should avoid long commit messages, but sometimes they just cannot be avoid. \nThe problem is: (setq-default truncate-lines nil) which is defau...
Is it possible to display a message in the echo area without logging it in buffer *Messages*?
Yes, in Emacs, you can display a message in the echo area without logging it in the `*Messages*` buffer by using the `message` function with a certain condition or using `minibuffer-message`. Here's how you can do it: 1. **Using `minibuffer-message`**: This function displays a message in the minibuffer (echo area) b...
[ { "from": "human", "value": "Is it possible to display a message in the echo area without logging it in buffer *Messages*?\n" }, { "from": "gpt", "value": "Yes, in Emacs, you can display a message in the echo area without logging it in the `*Messages*` buffer by using the `message` function wit...
I understand why eshell provides elisp interpretations of the kill and rm commands, however, I would like Emacs to use the operating-specific implementations if they are available in the $PATH (especially in the case of rm, because the elisp implementation of rm can take minutes to delete large directories of files). H...
To make Emacs Eshell use the system's `rm` command (or any other shell command) if it is available in your `$PATH`, you can modify the way Eshell handles command execution. This involves overriding the behavior of the `rm` command in Eshell to check for an external executable first. You can do this by adding some cust...
[ { "from": "human", "value": "I understand why eshell provides elisp interpretations of the kill and rm commands, however, I would like Emacs to use the operating-specific implementations if they are available in the $PATH (especially in the case of rm, because the elisp implementation of rm can take minutes...
I wanted an alternative to the awful C-^ shortcut for moving up one directory so I added the following to init file: (defun dc/dired-mode-keys () "User defined keys for dired mode." (interactive) (local-set-key (kbd "s-m" 'dired-up-directory))) (add-hook 'dired-mode-hook 'dc/dired-mode-keys) However, when I...
The issue you're encountering is related to the way you're using `local-set-key` in your `dc/dired-mode-keys` function. The function `dired-up-directory` does not take any arguments, but by providing it as an argument to `local-set-key` in the way you've defined it, you're effectively trying to bind `s-m` to the functi...
[ { "from": "human", "value": "I wanted an alternative to the awful C-^ shortcut for moving up one directory so I added the following to init file:\n (defun dc/dired-mode-keys ()\n \"User defined keys for dired mode.\"\n (interactive)\n (local-set-key (kbd \"s-m\" 'dired-up-directory)))\n (add-hook 'dir...
I'm using Flycheck with GCC as my checker for C. However, Flycheck gives warnings on OpenMP pragmas, regardless of whether they're correct or not! Is there any setting I can change to turn off these warnings?
If you are using Flycheck with GCC for C programming and you're receiving warnings related to OpenMP pragmas, you can adjust your GCC compiler flags to suppress these warnings. You can achieve this by modifying the Flycheck configuration in your Emacs setup. 1. **Set the Compiler Flags**: You can add `-fopenmp` to the...
[ { "from": "human", "value": "I'm using Flycheck with GCC as my checker for C. However, Flycheck gives warnings on OpenMP pragmas, regardless of whether they're correct or not! Is there any setting I can change to turn off these warnings?\n" }, { "from": "gpt", "value": "If you are using Flycheck...
Is it possible to simulate an arbitrary key event from elisp? I am aware of ways that I can find the binding for a given key, and then call that command interactively, but what if that key event is not bound to a command? As one example, what if I wanted to bind C-` to behave the same as the ESC key in all contexts?
In Emacs Lisp (elisp), you can simulate key events in a number of ways. However, if you're looking to make a specific key combination (like `C-` backtick) behave like another key (like `ESC`), you can do this using key bindings rather than simulating a key event. Here’s how you can bind `C-`` to behave like the `ESC` ...
[ { "from": "human", "value": "Is it possible to simulate an arbitrary key event from elisp? I am aware of ways that I can find the binding for a given key, and then call that command interactively, but what if that key event is not bound to a command?\nAs one example, what if I wanted to bind C-` to behave ...
There are a number of Emacs buffers where their names have "earmuffs", i.e. they have names like *scratch* *R* *ESS* *helm-mode-circe* What is the significance of the earmuffs, and is there a reason for users creating buffers to use them?
In Emacs, the "earmuffs" you refer to—specifically the asterisks (*) that surround buffer names—indicate special types of buffers. Buffers with names that start and end with asterisks are typically used for purposes beyond regular file editing and can signify several things: 1. **Special Buffers**: Buffers with names ...
[ { "from": "human", "value": "There are a number of Emacs buffers where their names have \"earmuffs\", i.e. they have names like\n\n*scratch*\n*R*\n*ESS*\n*helm-mode-circe*\n\nWhat is the significance of the earmuffs, and is there a reason for users creating buffers to use them?\n" }, { "from": "gpt"...
In the magit-status buffer, pressing TAB shows or hides a given section, which is handy when looking at unstaged content and see what hunks can be staged. However, when tabbing on a section, the buffer goes down, so the section I am trying to expand goes to the bottom of the buffer, thus hiding the expanded part of the...
In Magit, the behavior of the `TAB` key collapsing or expanding sections can sometimes make it tricky to see the expanded content if it moves down the buffer. Unfortunately, Magit does not have a built-in feature to automatically recenter or bring the expanded section to the top of the buffer upon expansion. However, ...
[ { "from": "human", "value": "In the magit-status buffer, pressing TAB shows or hides a given section, which is handy when looking at unstaged content and see what hunks can be staged.\nHowever, when tabbing on a section, the buffer goes down, so the section I am trying to expand goes to the bottom of the bu...
My version of ls supports a time-style format (with a space) as follows: --time-style=+%m-%d-%Y %H:%M:%S The entire dired-listing-switches looks like this: "-alh --group-directories-first --time-style=+%m-%d-%Y %H:%M:%S" The space between the date and the time breaks the functionality. Any ideas on how to use (setq ...
The issue you're experiencing with the `dired-listing-switches` in Emacs is due to the way command-line arguments are processed. The `--time-style` argument with a space in it can indeed break the functionality since Emacs expects the arguments to be formatted in a certain way. Since you mentioned that other formats l...
[ { "from": "human", "value": "My version of ls supports a time-style format (with a space) as follows:\n--time-style=+%m-%d-%Y %H:%M:%S\n\nThe entire dired-listing-switches looks like this:\n\"-alh --group-directories-first --time-style=+%m-%d-%Y %H:%M:%S\"\n\nThe space between the date and the time breaks t...
I am using the term of Emacs to compile some code, with linum-mode enabled to display the line numbers for the terminal, and the line numbers stop increasing as soon as they reach 2049. If I write source code and I reach 2049 lines will this happen too? Why is that happening? Shouldn't the numbers keep increasing?
The issue you are encountering with line numbers stopping at 2049 in Emacs while using `linum-mode` may be related to a limitation in the way line numbers are displayed or how the mode is configured. Here are some possible explanations and solutions: 1. **Emacs Version and Configuration**: Some older versions of Emacs...
[ { "from": "human", "value": "I am using the term of Emacs to compile some code, with linum-mode enabled to display the line numbers for the terminal, and the line numbers stop increasing as soon as they reach 2049.\nIf I write source code and I reach 2049 lines will this happen too? Why is that happening? ...
I'd like magit to default to a large buffer instead of one that is half the size of the available space. Even better would be a way to wrap the call to a major mode to make this happen when opening any major mode?
You can adjust the default size of the Magit buffer in Emacs by using the `magit-status-buffer` and setting a larger size for the window. One common approach to make the Magit buffer larger involves customizing the `display-buffer-alist` to specify a desired size when opening Magit buffers. Here is how you can set it ...
[ { "from": "human", "value": "I'd like magit to default to a large buffer instead of one that is half the size of the available space. Even better would be a way to wrap the call to a major mode to make this happen when opening any major mode?\n" }, { "from": "gpt", "value": "You can adjust the d...
Helm seem to support marking files in helm-find-files. Is it possible to open the marked files, each one inside of its own buffer from within the find file buffer? Update: I noticed that I was using helm-projectile-switch-project rather than the Helm enhanced find-file command.
Yes, in Helm, you can mark files in the `helm-find-files` interface and then open each marked file in its own buffer. This feature allows you to work with multiple files more efficiently. Here's how you can do it: 1. **Open Helm Find Files**: Start `helm-find-files` by invoking the command (typically bound to `C-x C-...
[ { "from": "human", "value": "Helm seem to support marking files in helm-find-files. Is it possible to open the marked files, each one inside of its own buffer from within the find file buffer?\nUpdate: I noticed that I was using helm-projectile-switch-project rather than the Helm enhanced find-file command....
Please maintain a community wiki answer which describes email lists, wikis, blogs, irc channels, forums, or other communities in which GNU Emacs is the primary topic. In order to be listed, a community must be 'open', meaning that anyone can participate. Exceptions to that rule can, should, and have been made. Emplo...
Here’s a community wiki answer detailing various open communities centered around GNU Emacs, including email lists, wikis, blogs, IRC channels, forums, and other relevant platforms. These are valuable resources for Emacs users, developers, and enthusiasts to share knowledge, ask questions, and collaborate. ### Email L...
[ { "from": "human", "value": "Please maintain a community wiki answer which describes email lists, wikis, blogs, irc channels, forums, or other communities in which GNU Emacs is the primary topic.\nIn order to be listed, a community must be 'open', meaning that anyone can participate. \nExceptions to that r...
I got the following snippet in my init.el: (define-minor-mode sticky-buffer-mode "Make the current window always display this buffer." nil " locked" nil (set-window-dedicated-p (selected-window) sticky-buffer-mode)) (global-set-key [f11] 'sticky-buffer-mode) So, I can use F11 to lock one window, but the minor mo...
Certainly! You can achieve what you want by converting the `define-minor-mode` into a regular function using `defun`. This will allow you to control the locking of the window without creating a minor mode. You can also change the color of the mode line to make the status more visible. Here is a modified version of yo...
[ { "from": "human", "value": "I got the following snippet in my init.el:\n(define-minor-mode sticky-buffer-mode\n \"Make the current window always display this buffer.\"\n nil \" locked\" nil\n (set-window-dedicated-p (selected-window) sticky-buffer-mode))\n(global-set-key [f11] 'sticky-buffer-mode)\n\nSo...
I've normally used ~/.emacs for my config file, but I've noticed others using ~/.emacs.d/init.el. Are there advantages to the init.el location? Any disadvantages?
Using `~/.emacs.d/init.el` versus `~/.emacs` for your Emacs configuration file primarily comes down to organizational preferences and convention. Here are some advantages and disadvantages of using `~/.emacs.d/init.el`: ### Advantages of `~/.emacs.d/init.el`: 1. **Standardization**: Using `~/.emacs.d/init.el` is a wi...
[ { "from": "human", "value": "I've normally used ~/.emacs for my config file, but I've noticed others using ~/.emacs.d/init.el. Are there advantages to the init.el location? Any disadvantages?\n" }, { "from": "gpt", "value": "Using `~/.emacs.d/init.el` versus `~/.emacs` for your Emacs configurati...
I am already in TeX-PDF-mode. When C-c C-c and type in pdflatex, it doesn't run. How can I run pdflatex in TeX-PDF-mode? Note: I don't change my emacs configuration file. Thanks.
If you're using Emacs with AUCTeX in TeX-PDF-mode and finding that the `C-c C-c` command followed by typing `pdflatex` doesn't work as expected, there are a few things you can check or try: 1. **Check the Buffer**: Make sure you are in a TeX buffer (i.e., a `.tex` file). The command `C-c C-c` will not run `pdflatex` i...
[ { "from": "human", "value": "I am already in TeX-PDF-mode. When C-c C-c and type in pdflatex, it doesn't run. How can I run pdflatex in TeX-PDF-mode? Note: I don't change my emacs configuration file. Thanks.\n" }, { "from": "gpt", "value": "If you're using Emacs with AUCTeX in TeX-PDF-mode and f...
I've been looking at a way of detecting whether point is on a comment by looking at how the current buffer is fontified. Smartparens defines sp-point-in-comment, which relies on syntax-ppss. However, it seems that syntax-ppss and parse-partial-sexp can be used for arbitrary languages, even if they don't use s-expressio...
Yes, `syntax-ppss` and `parse-partial-sexp` can indeed be used for detecting comments and other syntactical constructs in arbitrary programming modes in Emacs. Although both functions are particularly well-known for their utility in Lisp modes (which use s-expressions), they are designed to work with the syntax rules d...
[ { "from": "human", "value": "I've been looking at a way of detecting whether point is on a comment by looking at how the current buffer is fontified.\nSmartparens defines sp-point-in-comment, which relies on syntax-ppss. However, it seems that syntax-ppss and parse-partial-sexp can be used for arbitrary lan...
When writing lisp codes, sometimes I'm deep in a nested expression and all I want is to insert all the missing closing parenthesis. Right now I'm just inserting them until I get a mismatched paren, but it's not very efficient. Is there any command to insert all the missing parentheses? FYI, I'm using smartparens to aut...
If you're using Emacs with `smartparens` and you need to automatically insert all missing parentheses in a nested Lisp expression, you can take advantage of some built-in functionality. While there is no direct command specifically for inserting missing parentheses, you can use the following approach: 1. **Use `paredi...
[ { "from": "human", "value": "When writing lisp codes, sometimes I'm deep in a nested expression and all I want is to insert all the missing closing parenthesis. Right now I'm just inserting them until I get a mismatched paren, but it's not very efficient.\nIs there any command to insert all the missing pare...
I set the Alt Gr key on my keyboard as compose key in my system (Ubuntu 14.04) in order to type letters like éóèàùçü and so on. But when I am on Emacs and try to press the Alt Gr key, I have a message saying that: <Multi_key> is undefines Ho can I make it work? Thanks. P.S. as I don't have enough reputation, I cou...
To use the Alt Gr key as a compose key in Emacs on Ubuntu 14.04, you'll need to make sure that Emacs recognizes the key. The `<Multi_key>` message you are seeing indicates that Emacs is not recognizing your Alt Gr key as the compose key. Here's how you can configure it: 1. **Use a Different Compose Key**: Instead of ...
[ { "from": "human", "value": "I set the Alt Gr key on my keyboard as compose key in my system (Ubuntu 14.04) in order to type letters like éóèàùçü and so on. But when I am on Emacs and try to press the Alt Gr key, I have a message saying that: \n<Multi_key> is undefines\n\nHo can I make it work? Thanks. \n...