All Questions

Filter by
Sorted by
Tagged with
1
vote
2answers
26 views

How to compare an item against others, that's compatible with string-equal?

When comparing the last-command against multiple possible strings, it doesn't seem possible to use the member function. Is there a way to simplify this using something like member? (when (or (...
0
votes
1answer
18 views

Org mode attachments: how to change the default directory for added attachment folders?

I am using org mode and its attachment functionality, letting me make a directory attached to a task (C-cC-as). The default folder is not the one I would like it to be. How can I change the default ...
1
vote
0answers
12 views

RefTeX won't find bibliography file

I asked this question already on TeX.SE, but I think, it is more related to Emacs.SE. I am using the latest Aquamacs on MacOS (and I am wondering why all these emacs-related questions are posted in ...
0
votes
0answers
10 views

c-electric-brace and smartparens pairs

Within c-mode it is possible to configure a style and with c-hanging-braces-alist it is possible to relocate braces like { and } to separate lines, inserting whitespace and so on. Th function which ...
1
vote
1answer
23 views

Can “advice-add … :filter-args” detect if the advised function was called interactively?

Using advice-add from nadvice.el, I am trying to add a :filter-args advice to an interactive function. Is it somehow possible for it to detect, whether the advised function has been called ...
0
votes
0answers
14 views

Force org-babel-load-file to execute every time emacs is loaded

I have this code in the init.el file: (org-babel-load-file (expand-file-name "myinit.org" user-emacs-directory)) Which used to generate a myinit.el file every time I start emacs. I would ...
0
votes
0answers
17 views

Org-mode source blocks are not fontified same as the corresponding language

i am using Zerodark theme and in my org files I noticed that source blocks (emacs-lisp) are not fontified same as when opening an actual lisp file. I already have this setting: (setq org-src-...
0
votes
0answers
14 views

Fringe value not taking effect until I switch buffers

I'm not quite sure how best to describe what's going on. I have the following lines on my init.el file. (setq-default left-fringe-width 40) (setq-default right-fringe-width 40) I expect this to ...
1
vote
1answer
16 views

Getting call stack during call of a specific function

An automatic save is triggered (from some hook in some of my extensions) directly after a buffer is modified and I can't find the reason for it. The mode auto-save-mode is not enabled in the buffer ...
1
vote
1answer
10 views

Auto fill of # style comments in Emacs python-mode not working

My expectation is that, like for comments in other language modes besides python, I could write a long comment, say 150 chars, and it would automatically fill, i.e., newline and indent with comment ...
1
vote
0answers
24 views

How can I stop Emacs from grabbing focus at startup?

I typically start GUI Emacs on macOS, https://bitbucket.org/mituharu/emacs-mac/overview, installed via Nix package manager, as part of a larger startup script on the terminal (iterm). While Emacs is ...
0
votes
1answer
12 views

M-x compile fortran

I set up M-x compile to automatically run appropriate commands depend on on the file types. For example, for C++ (add-hook 'c++-mode-hook (lambda () (set (make-local-variable '...
0
votes
0answers
9 views

Python indent closing parentheses for multi-line function

I've discovered some reformatting with Black or Yapf: def responses(self, foo=SuperLongClassnameBar.FOOBAR ) -> List['Foobar']: Using emacs and elpy, it won't indent the closing ...
0
votes
0answers
18 views

Can redo be made to stop once the most recent state has been reached?

Using emacs vanilla undo, I'd like to undo a series of operations, then hold a key to redo only the operations I just undid, and only those operations. This use case for example: Hold undo key, copy ...
0
votes
1answer
24 views

Using evil and org-mode, as my file size grows, there is increasing delay in any command that changes text

There is only delay when changing text: navigation all works instantly, as normal. The delay has gotten to about one full second now, it's getting pretty bad. The file is around 15,000 lines long, ...
0
votes
0answers
12 views

Default directory for flycheck in .dir-locals.el

I am using flycheck with some python linters (python-flake8 and python-mypy) and I would like to modify the directory from which these linters are run by flycheck. My directory structure is as ...
0
votes
0answers
8 views

Flycheck: Suspicious state from syntax checker go-vet

When I import native package into native test file. package tests import ( ... "github.com/myGithubProjectRootPath/internal/platform/web" ) ... It report a import package path not allowed ...
2
votes
1answer
286 views

How to make Emacs “forget” code evaluated in scratch buffer?

I have a function named my-func in my init.el. I copy this function to the scratch buffer, make some changes to it and evaluate it with C - j. I then delete the code in the scratch buffer and then ...
2
votes
2answers
49 views

How to extract text properties into a string?

Is it possible to separate text properties and convert them into a string? For example, with a string with properties: #("gfsd \"fsgfd\" sdfdsgfs \"fsdfs\"s sfg fdg fdffffffffffffff" 0 5 (fontified ...
0
votes
0answers
12 views

Unable to <TAB> or have any auto-indentation in php-mode

as per the title, I'm unable to or have any auto-indentation in php-mode. With a simple .php file, I get this: <?php phpinfo(); ?> Pressing TAB anywhere within the document does nothing at ...
0
votes
0answers
4 views

Is there a way to print hardcopy of a region with inline images from LaTeX previews?

The specific reason to ask this is the following situation: I use preview mode in latex. I often want to print a paragraph (with the inline images generated, but I don't care about the text font). I ...
0
votes
0answers
8 views

After fixing an error and save buffer, lsp-ui still displays the error message

I am enabling flycheck syntax checking only on save with : flycheck-check-syntax-automatically '(mode-enabled save) And disabling lsp ui live reporting: (setq lsp-ui-flycheck-live-reporting ...
0
votes
0answers
22 views

Suppress the message (LSP :: not indexed)

I couldn't find an option to suppress this message on unindexed files. In my repo I have C++ files that I dont want to index and this message keeps showing up when moving the cursor between code ...
0
votes
1answer
39 views

cursor color depending on insert or overwrite mode

how can I change the cursor color depending on insert or overwrite mode? I looked at this page https://www.emacswiki.org/emacs/ChangingCursorDynamically and put as recommended 3 lines in the Emacs ...
2
votes
2answers
125 views

How to move the cursor to the next instance of the text the cursor is currently on?

Suppose your code looks like this: 1. term_cursor_is_on = 500 2. cursory_next_line = 42 [...] 101. next_instance_line = term_cursor_is_on And suppose that your cursor is on line 1 (unimportant, but ...
0
votes
0answers
39 views

Emacs .el file won't load on startup

I'm trying multiple methods to load an emacs .el file on startup. ('load-file "~/.emacs.d/extra/outline-presentation-mode.el") Also: ('load "~/.emacs.d/extra/outline-presentation-mode.el") Also: ...
3
votes
1answer
23 views

How to use font-lock to set other text properties (particularly keymap)?

I'm trying to make a mode where certain strings in the buffer have a special keymap active when the point is inside them. The documentation for font-lock-extra-managed-props and the Elisp info manual ...
0
votes
1answer
28 views

What is the command to transpose line from point till end of line?

Is there a emacs command to tranpose the line from the point till end of the line. For example: quick brown fox jumps over **<point>** the lazy dog meaning After transpose it should be the ...
2
votes
1answer
31 views

How can I query Emacs from a separate process?

I'm interested in tracking how I spend my time at work. I have been using ManicTime, and it does much of what I want. However, I use Emacs as my primary editor, and ManicTime doesn't know how to get ...
1
vote
1answer
33 views

Reference cells of other tables in org-mode table as plain text

I intent to copy the value of a cell and put the exact copy to the target cell and be able to update the value on referenced cell to be updated on the targeted one. Calling remote to a cell evaluate ...
2
votes
1answer
41 views

How to introspect function & macro arguments in elisp?

Is there a programmatic way to access function/macro arguments, Something like this, which returns the the arg count and true if it accepts any number of additional arguments. eg: (number-of-...
1
vote
1answer
23 views

Remove the suffix `^M` when run ls in org src

When run ls to print the file list #+begin_src ipython :session sql :results output ! ls | head -n 5 #+end_src #+RESULTS: : create.txt^M : Lesson 10. Grouping Data.md^M : Lesson 11. Working with ...
0
votes
1answer
40 views

How to let Magit highlight changes

I've been using magit for a couple of weeks now and I really really like it. There is, however, one thing I still can't get to work, which is the highlighting of changes. In the pictures used in the ...
0
votes
0answers
37 views

.emacs showing error “Wrong type argument: listp, closed” during start up

I am getting an error Wrong type argument: listp, closed while starting my Emacs. I tried to debug each line and do a M-x eval-buffer during configuration. At at time, it was showing only End of line ...
1
vote
1answer
34 views

make AucTeX structure aware?

TeXStudio seems to be aware of the interdependencies of files and internal structure (e.g., blocks for beamer posters shown in example below). For instance, the left column panel in TeXStudio shows ...
1
vote
0answers
27 views

How to add a syntax checker to a major mode for flycheck?

I have the following flycheck setup in my init.el (use-package flycheck :after web-mode :config (global-flycheck-mode) (flycheck-add-mode 'javascript-eslint 'web-mode) :...
4
votes
2answers
70 views

Count the total no. of lines for a set of marked files in dired

I would like to be able to return the total no. of lines for a set of marked files in dired. i.e. if I marked 3 text files: file 1 contains 100 lines file 2 contains 50 lines file 3 contains 60 ...
1
vote
0answers
21 views

orgmode latex export: alternative to \newpage?

In orgmode, is there a property I can set to a section that will output a pagebreak before it? Right now, I can do the following: * Section 1 ** Subsection 1 stuff ** Subsection 2 stuff \newpage ...
1
vote
1answer
39 views

Ivy: sort candidates by most recently used

I'm coming from Helm to Ivy just to try it out, and one thing I miss greatly from Helm is how the default candidate when hitting M-x is whatever the last command was. Is there some way to sort Ivy's ...
2
votes
0answers
29 views

Different face for checked-off items in plain lists?

Q: how can I get a different face for checked-off items in org plain lists? I use org-mode's plain lists a lot: - [X] item 1 - [ ] item 2 - [ ] item 3 - [ ] item 4, with a whole lot of text that ...
0
votes
0answers
18 views

electric-pair-mode screws indentation

I have some trouble with my emacs indentation. Since I have enabled electric-pair-mode my indentation is screwed when I use hanging braces. Example (| is my cursor): int main(int argc, char *argv[]) {...
1
vote
1answer
29 views

Can emacsclient focus an existing frame?

When emacsclient is invoked with the option -c it creates a new frame. In both Windows and Linux, this frame is a window at the top of the Z-stack and has input focus. With option -n (non-blocking) ...
0
votes
2answers
27 views

How to add some space to the left of the line numbers in linum-mode?

When I enable linum-mode in the scratch buffer (and most other buffers I tried) there is no space to the left of the line numbers. Although when enable linum-mode in the .emacs configuration file, I ...
0
votes
1answer
34 views

How to debug Java Web Application

I am trying to debug my java web application (using emacs), but I am having issues setting it up to connect with the debug port. Within emacs I have installed both lsp-java and dap. The debug port ...
0
votes
1answer
22 views

How to abort an ediff merge?

I use ediff to merge mercurial conflicts (and sometimes git conflicts), but I can't seem to abort. Ediff pops up as soon as a conflict is detected, and quitting and not saving results in mercurial ...
0
votes
0answers
27 views

Emacsclient starts but no GUI shown

I'm using Emacs installed from the emacs-plus package from homebrew on Mac OS X 10.14.6. I uninstall/reinstall the package today and suddenly it stops working properly. The version of emacs-plus ...
0
votes
1answer
15 views

Is there a way I can open emacs (spacemacs) recent files from rofi?

I know Spacemacs keeps track of my recently-edited files. But I can't find a function that will allow me to see these from the command line. Ideally I'd like to find a way to run Rofi and see a list ...
0
votes
0answers
24 views

Why is Spacemacs in ssh so different from local terminal and how to make it the same?

My Spacemacs share the same configuration on local macOS and remote Linux, but they look quite different. The only OS related settings that I found in my configuration is that I enabled OSX layer on ...
0
votes
1answer
6 views

Usage of vhdl-mode's vhdl-compose-place-component function

The command vhdl-compose-place-component is supposed to create the text to place a component. I can't figure out how to specify which component it places, though. Right now, when I use it, it places a ...
0
votes
1answer
20 views

Coloured active mode line only when many windows

I am reluctantly using a coloured active mode line to distinguish it from inactive mode lines, but it occurred to me that it might be possible to reserve its colouring for times when there are more ...

15 30 50 per page