texts:
When I'm pressing C-p/n moving the cursor around, the redisplaying is quite lagging. A profile of CPU give

+ command-execute                                                 527  59%
- redisplay_internal (C function)                                 264  29%
 - eval                                                           259  29%
  - if                                                            254  28%
     abbreviate-file-name                                         187  21%
   + and                                                           35   3%
   + format                                                        26   2%
  + replace-regexp-in-string                                        2   0%
   file-remote-p                                                    3   0%
+ ...                                                              61   6%
+ timer-event-handler                                              17   1%
+ sp--save-pre-command-state                                        7   0%
+ lsp-ui-sideline                                                   3   0%
  sp--post-command-hook-handler                                     1   0%
+ delete-space-base-on-indentation                                  1   0%
+ lsp--on-auto-save                                                 1   0%

Seems abbreviate-file-name(21%~29%) when redisplaying(29%~41%) ate quite a lot resources. But I have no idea how to fix this and I can't find when the call is. The issue only happens in c/c++ mode, while python-mode works quite well.

Updated:

A longer run

- redisplay_internal (C function)                                1369  41%
 - eval                                                          1364  41%
  - if                                                           1203  36%
     abbreviate-file-name                                         970  29%
   + and                                                          129   3%
   + format                                                       104   3%
  + let*                                                          160   4%
 + #<compiled 0x4203f303>                                           4   0%
+ command-execute                                                 829  25%
- timer-event-handler                                             668  20%
 - apply                                                          668  20%
  + semantic-idle-scheduler-function                              514  15%
  + jit-lock-stealth-fontify                                      105   3%
  + sp-show--pair-function                                         18   0%
    auto-revert-buffers                                            16   0%
  + savehist-autosave                                               9   0%
  + which-func-update                                               3   0%
  + show-paren-function                                             1   0%
+ ...                                                             375  11%
+ sp--save-pre-command-state                                       29   0%
+ lsp--on-auto-save                                                 6   0%
  tooltip-hide                                                      2   0%
  hl-line-maybe-unhighlight                                         1   0%
+ lsp-ui-sideline                                                   1   0%
+ hl-line-highlight                                                 1   0%
+ delete-selection-pre-hook                                         1   0%
  company-post-command                                              1   0%


texts: How to add annotation in PDF src block like in this screenshot?

texts: How to write Org-mode, (maybe need use LaTeX) to archive this effect?


texts: Why is initial frame sticky on launch? How can I stop it?

texts:
After a recent version change, my Emacs 24.5 is now making its initial frame (window) "sticky" on launch.  I am having to unstick it manually, which is a royal pain.  I tried using the Emacs variable initial-frame-alist to make it not sticky, but this does not seem to work.

Here is what C-h v says about the variable:

initial-frame-alist is a variable defined in `frame.el'.
Its value is ((sticky) (vertical-scroll-bars))
Original value was nil

Note that (sticky) means (sticky . nil).

Some more diagnostic information:

When I launch my normal emacs with init file, the resulting window is sticky
When I launch using emacs -q (no init file), then run the init file (either with M-x eval-buffer or with M-x load-file), the resulting window is not sticky.
I am running desktop-save-mode.  When I launch a second emacs while the first is running, the initial frame opens with the initial settings, and it prompts me that the desktop file is already in use by another process—should I use it?  At that point the window is not sticky.  But after I respond n and the initialization process finishes, the window then becomes sticky.

I'd appreciate any help diagnosing the source of the stickiness and putting a stop to it.  My .emacs file is shown at http://pastebin.com/6tdc0dPM.  Please treat it gently; it's the result of over 30 years of accretion.


texts: inludegraphics macro does not ask for width etc. but only for llx, lly

texts:
Using GNU Emacs 26.3, I have a tex file with \usepackage{graphicx} and AUCTeX enabled. However, inserting a includegraphics macro does not prompt for the optional arguments defined in graphicx.el LaTeX-graphicx-key-val-options but only for llx, lly and urx, ury.
Any ideas on how to debug the wrong behavior?


texts:
The short version of my question is how do I install web-mode?

Here's what I've tried so far:

I'm trying to install web-mode, so I typed in M-x package-install, followed by web-mode.  At this point it fails with the message:

https://stable.melpa.org/packages/web-mode-15.el: Not found

Going to the MELPA page for web-mode I see a large '16' on it (as of now - August 6, 2018).

My guess is that my emacs is asking for version 15, and it doesn't exist because the current version is 16, but setting package-load-list to be "16" for web-mode only produces an error.

I'm sure there's something goofy with my setup / something I'm missing, but could anyone help me to install web-mode?


texts: Quickly navigate through a cascade of otherwise empty directories in helm

texts:
I'd like to be able to quickly skip to the bottom of a cascade of otherwise empty directories. Consider the following directory structure:

foo/
  bar/
    baz/
      a.txt
      b.txt

If I were in foo/ with helm-find-files, I'd like to get to baz/ quickly. I can think of two possible solutions.

Somehow configure helm to provide a shortcut to baz/ when in foo/, so the find file buffer  might look like:

.
..
bar/baz
bar

And bar/baz is maybe marked in a different color.
Have the active selection automatically set to the first member of the current directory instead of ., i.e.

.      <-- selection is usually here after entering a new directory
..
one/   <-- instead, automatically highlight this
two/
three.txt

That way, baz/ is two keypresses from foo/.

If I could implement both of these then I'd really be flying. I tried helm-ff-auto-update-initial-value but did not find it useful. You still have to type the first three letters of the directory to enter it automatically. Actually typing even just one character of the directory is not satisfactory. Hiding . and .. has been proposed but is a hack and not supported by the developers, see here and here.


texts: Json-Mode / Puppet-Mode unset common functions when installed with use-package

texts:
I'm facing a weird issue in my init.el. Installing packages such as json-mode or puppet-mode (from MELPA Stable) with use-package unsets common functions like forward-word or backward-kill-word. The key bindings are unaffected, the function is simply missing (I get Symbol’s function definition is void: nil). This behavior does not happen with all packages (I have dozens of other packages in my init.el which work just fine).

Here is a minimal init.el:

(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/"))
(when (< emacs-major-version 24)
    (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize)

(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package)
  )

(eval-when-compile (require 'use-package))
(setq use-package-always-ensure t)

(use-package json-mode
  :mode ("\\.json"))

(use-package puppet-mode
  :mode ("\\.pp"))

Running Emacs with a complete clean .emacs.d (apart from the init file) first installs use-package along with diminish and bind-key and then downloads the two modes json-mode and puppet-mode and adds them to the load-path (as expected).

However, opening a text file test.txt and then running M-f or M-x forward-word returns the error:
Symbol’s function definition is void: nil

I'm running Emacs 25.1.1

Is this an issue with these packages, or am I doing something wrong?

Can anyone reproduce this problem?


texts: Is it possible to export Facebook events to org-mode automatically?


texts: adding link (url) to message when writing email with mu4e

texts:
I recently started to use mu4e and maybe this is quite obvious, but how can I add an url with description to a message using mu4e?

Is there something like [[url][description]] as in org-mode?


texts: How to pipe data through multiple processes?

texts:
Currently I'm generating text from a command, eg:

(with-temp-buffer
  (call-process "my-command" nil t nil "my" "args")
  ;; operate on output in current buffer.
  )

How can I use pipes, something that would be written in shell like this:

my-command my args | wc -l

Note, this is just an example command, doing the same operation without pipes wont address this question.


texts: Top level heading in the `org-mode` agenda

texts:
Is it possible to show top level heading ("project" heading) in the agenda?

(setq org-agenda-custom-commands
  '(("g" todo "WAITING" nil)
("n" todo "NEXT" nil)
("i" todo "IN-PROGRESS" nil)
("w" "Agenda + In-progress + Next Actions @work"
 ((agenda) (todo "IN-PROGRESS") (todo "NEXT"))
 ((org-agenda-tag-filter-preset '("+@work"))))
("d" "Agenda + In-progress + Next Actions"
 ((agenda) (todo "IN-PROGRESS") (todo "NEXT")))))

Projects file is part of Getting Things Done and I have this in my .emacs:

(setq org-agenda-files '("~/Dropbox/gtd/inbox.org"
                     "~/Dropbox/gtd/projects.org"
                     "~/Dropbox/gtd/tickler.org"))

Projects file contains headings for each project and subtrees of TODO lists. I guess I can just add a tag to each heading and filter by that tag but each heading will just appear as a TODO entry rather than a heading in the agenda.


texts: Editing and viewing timestamps in Global TODO in Org Agenda

texts:
When viewing alltodo's (M-x org-agenda RET t), is it possible to see and edit Scheduled/Due dates?

I understand that the list of TODOs can be very long and therefore seeing timestamps could clutter up the view. However, I am using org-super-agenda to drastically trim down my list of TODOs. Being able to see and edit timestamps could significantly improve workflow.

A closely-related question was discussed 4 years ago. I could configure column-view to see timestamps, but that doesn't solve the need to edit in-place.


texts: "Invalid use of '\' in replacement text" with non-interactive calls

texts:
It seems that replace-regexp has a different behavior if called interactively and not, but I do not understand why, and how to get the wanted behavior.

What I want is the non-interactive equivalent of:

M-x replace-regexp RET foo1 RET foo\#

which, if called on buffer

foo1
foo1
foo1

creates

foo0
foo1
foo2

Now, non-interactively, the naive

(replace-regexp "foo1" "foo\\#")

yields

"Invalid use of '\' in replacement text"

The same happens with

(funcall-interactive "foo1" "foo\\#")

And singling or doubling the backslashes give the expected (unwanted) results:

(replace-regexp "foo1" "foo\#")
;; foo#
;; foo#
;; foo#

(replace-regexp "foo1" "foo\\\\#")
;; foo\#
;; foo\#
;; foo\#

Of course, running call-interactively works, but in my use-case the regexp and replacement string will be crafted by elisp code.

Running a loop searching and replacing would probably work, but is it really the only solution? It seems hard to believe.


texts: Specifying filetype when using counsel-git-grep

texts:
I'm using counsel-git-grep to search inside a project for a specific string, which works great. However, I would like to additionally specify a filetype pattern to reduce the result set. I tried queries like string -- '*.filetype' but none of them worked. I know I can customize the counsel-git-grep-cmd-default but this seems to be a very static approach.

So the question is, is there a way to define a filetype pattern inside a query string of counsel-git-grep?


texts: How to use .ltx as extension for LaTeX documents?

texts: Usually I name my LaTeX files using the extension .ltx like file.ltx. How can I configure Emacs+AUCTeX in a way that it recognizes those files and load AUCTeX?


texts: No confirmation for changing global key bindings Interactively in Emacs

texts:
I have tried to add global key-bindings to Emacs interactively via M-x global-set-key by following the guidelines in the Emacs Manual. When I add a keybinding though there is no confirmation prompt so that I can confirm binding the key I want. Yet the Manual states "After you press the key, a message ... appears so that you can confirm that you are binding the key you want." (https://www.gnu.org/software/emacs/manual/html_node/emacs/Rebinding.html)

If I then exit Emacs and reopen it, the global-key I have defined interactively does not work across sessions. Is this a bug? I have tried this without my default init and also in two versions of Emacs (25,26)


texts: Map a Key to an Evil Operator and to Other Things?

texts: For example, in in lisp-mode, I want to be able to use d as normal but also remap something like "dh" to something like "sp-splice-sexp-killing-backward". In vim you can remap keys like this without a problem, but with evil this would get rid of d's functionality altogether. Would there be some way to wrap this so that if a mapping exists for a d sequence, that action is taken and otherwise "evil-delete" is called with the key(s) instead?


texts: How to encrypt different headings to different keys

texts:
I'd like to encrypt different headings in my org file to different keys, e.g.,

* Heading 1
* Heading 2

where Heading 1 should be encrypted to me1@example.com and Heading 2 should be encrypted to me2@example.com, using gpg.

How can I do this?


texts: Compare all elements of 2 lists, not necessarily in same order

texts:
Q:  How to test whether all elements of two lists are the same even though the order may be different?

EXAMPLE:  (test-fn '(answered cached unread) '(unread answered cached)) => t


texts: How can I force a Hebrew font to match the fixed width of Latin text characters in a mono font

texts:
I have setup my Emacs to use Noto Sans Mono everywhere. I did this on the naïve assumption that it was in fact a mono-spaced font, with full coverage of Hebrew and Greek Extended characters. Unfortunately, while it does have that codepoint coverage, the character widths are very different and it is only monospaced for some unicode ranges.
Is there a way to force Emacs to use fixed character widths with a font, despite the font having variable widths?


texts:
I have a project base folder, ~/prj, inside of which I have many individual projects, 2014_prj1, 2014_prj2, ..., inside of which I have, among others, a doc folder.  The layout looks like this:

~/prj
~/prj/2014_prj1
~/prj/2014_prj1/README.org
~/prj/2014_prj1/data
~/prj/2014_prj1/doc
~/prj/2014_prj2
~/prj/2014_prj2/README.org
~/prj/2014_prj2/data
~/prj/2014_prj2/doc

Now I'd like to add all project directories (2014_prjX) to org-agenda-files, as well as all doc subdirectories of the project directories.  The data folders should not be part of org-agenda-files, because they can possibly contain 10000s of files.

How can I achieve this?  I tried a simple

(setq org-agenda-files (quote ("~/doc/notes"
                               "~/.emacs.d"
                               "~/prj/*/doc"
                               )
                        )

but this gives me the error

Non-existing agenda file ~/prj/*/doc


texts: Aquamacs: Display *Occur* in current frame

texts:
I find that if I run *Occur* on different virtual displays, Aquamacs will reuse whichever frame *Occur* ran in the previous time, often giving me the results I want to see on a display which I am not currently looking at.

I could find nothing in https://www.emacswiki.org/emacs/AquamacsEmacsCompatibilitySettings about changing this back to the normal sane behavior, and I don't really understand how the "dedicated window" logic works, or whether that's what at play here. I have already implemented most of the other tweaks to get a "normal" Emacs, including setting one-buffer-one-frame-mode to nil.

In simple terms, how can I make sure the *Occur* buffer is displayed in the frame which is currently active, where I just ran M-x occur?

There are other functions which behave the same in Aquamacs, too; a general solution which turns off this buffer window reuse would be much preferred. For example, I often (but not always) see this with *vc-log* for getting diffs for a version-controlled file.


texts: Display max line in bottom line (nox) (aka mode-line)

texts: How can I display the max line of a file in the bar at the bottom? So, how could it say "L1/L1300" instead of just "Top L1", if the respective happens to have 1300 lines?


texts: How to get a stack trace for "Eager macro-expansion failure:"

texts:
On startup I'm getting this message:

Eager macro-expansion failure: (wrong-number-of-arguments (3 . 3) 2)

How can I find whats causing the warning? --debug-init doesn't do anything in this case as it does with many other errors.


texts: When using C-x C-f turn off the suggestions

texts:
When i do C-x C-f to create a new file in the directory A, if emacs finds another file in another directory (say B) with exact same name, in the mini-buffer it changes the path to the other existing file (forcing me to open the old file instead of letting me create my new file). How can i disable this annoying thing?

Update
It is because of the ido-vertical mode which i have in my init.el:

;;; ido vertical
(require 'ido-vertical-mode)
(ido-mode 1)
(ido-vertical-mode 1)
(setq ido-vertical-define-keys 'C-n-and-C-p-only)


texts: Problem with FTP connections under Windows

texts:
Say I have an org-link like [[file:/ftp:anonymous@ftp.gnu.org:]] to an FTP site that I would like to open in dired. Unfortunately, when opening the link, the following is prompted:

Opening FTP connection to ftp.gnu.org...
tramp-file-name-handler: FTP Error: OPEN request failed:

Upon trying it a second time, Emacs tends to crash.
There is also a buffer *ftp anonymous@ftp.gnu.org* which has the following content (sorry, partly in German):

Ung ltiger Hilfebefehl foo
open ftp.gnu.org
Verbindung mit ftp.gnu.org wurde hergestellt.
220 GNU FTP server ready.

Any idea what could be going on?
(I'm under Windows with Emacs 25.1.90.1 (x86_64-w64-mingw32) using tramp 2.2.13.25.2 as is.)


texts: Implement modal interface in a major mode

texts:
I am creating a major mode, and would like to have modal interface (such as vi) on it.
I want to have a special key that toggles the behaviour on arrow keys.
So, for example, if the special key is hit, arrows move the char underneath.
And when the special key is hit again, arrows behave as normally.
How can I implement such thing?
I suspect it could work creating two different keymaps for the mode.
And then switching from one to the other after the special key press.
But not really sure if that would be the way to do it.
And honestly, I do not really know how to make that special key, so it can rebind other keys on the fly.
Hmmm... I should probably look for the code of a mode that implements a modal interface...


texts: ffap.el currently ignores file path with whitespace. How can I change this behaviour?

texts:
When I invoke ffap on the file path that include whitespace, such as
"/path/to/dir name/filename.txt", ffap.el stop searching file path before the "/path/to/dir" part.

I've checked the ffap.el, but there are many options and I couldn't find the
appropriate configuration settings to change this behaviour, that trying to find proper file name beyond the whitespace character.

What is the best settings not to ignore whitespace when ffap trying to find the file name that include white space?


texts:
Say I have an org-mode document with some block like this:

#+BEGIN_SRC blablabla
bla1
bla2
bla3
#+END_SRC

I'd like to put the point after, say, bla2, call some elisp and split the block like so:

#+BEGIN_SRC blablabla
bla1
bla2
#+END_SRC

#+BEGIN_SRC blablabla
bla3
#+END_SRC

Does this already exist?


texts: Is it possible to override the column width in Emacs?

texts:
I'm using graphical GNU Emacs 26.3 on Windows.

At least on Windows, Emacs determines column width by looking at the AveCharWidth field in the font's OS/2 table. As the name suggests, this field contains the average width of all non-zero-width characters in the font. Emacs then uses this to calculate pixel widths for things like an 80-column window.

However, the font I'm using, BIZ UDGothic, happens to be a CJK (Chinese, Japanese, Korean) monospace font. In fonts like this, there's a notion of "half-width" and "full-width" characters. For example, a character like a is "half-width" and therefore one cell wide, but CJK characters like あ are generally "full-width", or two cells wide.

In this font, half-width characters are 1024 FUnits wide, and full-width characters are 2048 FUnits wide. Ideally, the column width would be 1024 FUnits, since that aligns with the CJK notion of a half-width character being one cell wide. Unfortunately, because of the large number of full-width characters in this font, the average character width is 1991 FUnits, meaning the column width is nearly twice what it should be.

Now, this doesn't negatively impact the actual rendering of the font, since Emacs treats it as it would treat any proportional font, looking at the width of each individual character. It does, however, mean that windows are created much wider than they should be, and code that attempts to center text based on number of columns is significantly off.

I have fixed the problem by actually editing this field in the font file, but doing so was a bit of an ordeal, and I'd much prefer to configure this in Emacs itself. So, my question is, is there any way to do so, short of patching Emacs?

EDIT: To clarify a little, while editing the font itself is a solution, I'm not sure it's the right solution. Having the AveCharWidth field be 1991 FUnits isn't wrong per se, it's an accurate description of the font. The problem is that the heuristic of column width = average character width doesn't work in this case.

EDIT 2: Adding some screenshots to illustrate the problem:

With AveCharWidth set to 1991 FUnits, the default size of the window is way too wide, and nothing is centered properly relative to the window size or the Spacemacs logo:

With AveCharWidth set to 1024 FUnits, things are as they should be:


texts: How to force redisplay after you change truncate-lines?

texts:
The boolean variable truncate-lines controls whether continuation lines are displayed or not. I use this when I am checking some log file where the very long lines are truncated thanks to a previous (setq truncate-lines t). This is convenient since the relevant contents is usually at the beginning of the lines. However I sometimes need to see the end of the inspected lines and I'll occasionally toggle truncate-lines on and off (this is done in code temporarily bound to a function key).

The problem is that toggling truncate-lines on and off does not update the display unless I do some editing, or move the cursor far enough, or .. I don't know what. I tried to insert a (redisplay t) in my toggling code but this is not enough.

What bit of elisp magic will cause the display to be updated according to the new value of truncate-lines once it is changed?  And, by the way, is the lack of immediate update a bona fide bug?

How to reproduce the problem: After some investigation, it seems that the problem appears because I invoke the toggle via some key binding and not by execute-extended-command aka M-x. Here is a test file for you to download. Start with emacs -Q test_file, then eval-defun the first expression. Now M-x ttl does the toggle ok but on my machine hitting CTRL l (now bound to ttl) does the toggle without redisplay. If I move to end of buffer, the redisplay is activated.
FWIW I use emacs 24.5.1

Added Jan. 5th: it turns out that the behaviour described above is due to a minor bug that will be fixed in Emacs 25, see here. In principle there is nothing wrong with changing truncate-lines directly without going through toggle-truncate-lines.


texts: I have a checklist to do when adding new tasks for myself in org-mode. I would like to see it when capturing a task via org-capture, but I don't want it to be among the text I am adding because I would have to erase it every time. How can I do this?


texts:
Running emacs 25.2.2, general, evil and markdown-mode installed from MELPA.

The problem is when I hit TAB on a heading in a markdown file, it does not cycle visibility of content.

C-h k TAB shows it is assigned to evil-jump-forward.

So, in my init.el, I added:

(general-def 'markdown-mode-map
  "TAB" 'markdown-cycle)

But still TAB is assigned to evil-jump-forward.

How do I assign TAB to markdown-cycle in markdown-mode?

Moreover, can I assign it such that only when the cursor is on a heading, it is assigned to markdown-cycle but at other locations, it is assigned to evil-jump-forward?


texts: Modifying `org-end-of-line` within markup tags

texts:
If I'm typing along in org mode, like so:

This is a sentence|. It is followed by another sentence on the same line.

And point is indicated by the |, and I hit C-e, I get a perfectly normal result -- I jump to the end of the sentence.

But! Now imagine I'm using org markup tags with a tool like smartparens that inserts pairs. I'm here:

I'm going to type a *bold|*

Press C-e; I want to wind up on the other side of the second asterisk. Instead, I wind up here:

I'm going to type a *bold*
|

All the way on the next line. Now I have to move point a line up and C-e again, which jumps me to where I want to be.

Is anyone familiar enough with org-end-of-line to know if this is intended? My current approach is to try and concoct an advice for org-end-of-line to make it go to end of line properly, but I'm not sure it's the right solution. Suggestions?


texts: Cannot open JPEG files in new emacs build

texts:
When I try to open jpeg images on a new emacs build I get the error message

Cannot display image: (This Emacs mishandles this image file type)

I compiled on Debian Jessie and the configure commands output is below:

It can open some PNG files but not all, and JPEG files don't open at all.

I have a version running Debian Buster/Sid version and all the files display normally in that (stock) installation.

Are there some missing files which could be the cause, or could it because the standard Debian Jessie libraries it was build against are not up to scratch?

./configure --with-xwidgets --with-modules --with-xml2 --with-cairo --with-gnutls --with-xft --with-rsvg --with-gconf

Configured for 'x86_64-pc-linux-gnu'.

  Where should the build process find the source code?    .
  What compiler should emacs be built with?               gcc -std=gnu99 -g3 -O2
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK3
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use a png library?                           yes -lpng12
  Does Emacs use -lrsvg-2?                                no
  Does Emacs use cairo?                                   yes
  Does Emacs use imagemagick?                             no
  Does Emacs support sound?                               yes
  Does Emacs use -lgpm?                                   no
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               yes
  Does Emacs use a file notification library?             yes -lglibc (inotify)
  Does Emacs use access control lists?                    no
  Does Emacs use -lselinux?                               no
  Does Emacs use -lgnutls?                                no
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use -lm17n-flt?                              no
  Does Emacs use -lotf?                                   no
  Does Emacs use -lxft?                                   yes
  Does Emacs directly use zlib?                           yes
  Does Emacs have dynamic modules support?                yes
  Does Emacs use toolkit scroll bars?                     yes
  Does Emacs support Xwidgets (requires gtk3)?            yes


texts: Disable "10 repeater intervals were not enough"

texts:
I sometimes get the message:
10 repeater intervals were not enough to shift date past today.  Continue? (y or n)
When I mark a repeating TODO as done.
I would not like to be asked this.
In other words, I would like the answer to this to always be "yes". Automatically.
I imagine there is a setting to set the number of repeater intervals to infinite or a large number or to disable this message.
I have not been able to find a setting to do this.
Any help is much appreciated.


texts: Easily open PDF attachments from gnus with pdf-tools?

texts:
I seem to remember that I used to be able to press RET on a PDF attachment button in a Gnus article and have it open with pdf-tools. It's not working now, when I press RET I get prompted to save the PDF somewhere (after which I can use find-file to view it with pdf-tools). The prompt says "Save MIME part to:", just like when pressing o on the button (which runs gnus-mime-save-part). The same thing happens with E (gnus-mime-view-part-internally), which I also wouldn't expect.

Using either c or K c (the oddly named gnus-mime-copy-part and gnus-copy-article-part) does open the PDF attachment in a new buffer using pdf-tools, so a simple workaround would be to just use c instead of RET or E. But I really seem to remember that RET used to work (but I don't remember when it worked: I stopped using Gnus for a while, I'm probably not on the same versions of Emacs, Gnus and pdf-tools) and I don't know what changed.

Am I misremembering? Did this work at some point? How can I fix it?

I'm using Emacs 28.0.50, Gnus 5.13 and pdf-tools-20200214 from MELPA.


texts: Debugging - emacsclient: error accessing server file "server"

texts:
I got the not terribly helpful error message recently trying to connect emacsclient to a emacs daemon using tcp sockets.

emacsclient: error accessing server file "server"

Looking at the source, its not obvious what is going wrong - http://git.savannah.gnu.org/cgit/emacs.git/tree/lib-src/emacsclient.c?h=emacs-24#n1356

Any suggestions?

(I tried to recompile emacs and attach a gdb, but I didn't have much luck with that)


texts: How can I tell appt to warn me about tasks not done in the past?

texts:
I use appt with org-mode to warn me when is time to do something scheduled. I have one repetitive task schedule to be checked and done once per week, but there is a possibility that I may not turn on my laptop such day, hence that task may not be checked and done.

I was wondering if I can make appt-mode remind me about tasks been leaved in the past without being checked, how can I achieve that?


texts:
For some reason, fuzzy matching is not working in helm-recentf for me (though it is working everywhere else).

I have the following settings in my .emacs file:

(setq helm-recentf-fuzzy-match t
      helm-buffers-fuzzy-matching t
      helm-completion-in-region-fuzzy-match t
      helm-mode-fuzzy-match t)

I assume that there is some overlap with the functionality of these settings, but I don't see why any of them should mess up helm-recentf-fuzzy-match. Also, I have tried setting only helm-recentf-fuzzy-match to t and removed the other settings, and still no good. Also, when I check the value for helm-recentf-fuzzy-match this is what I get:

helm-recentf-fuzzy-match is a variable defined in `helm-files.el'.
Its value is t
Original value was nil

Am I experiencing a bug, or is there something I need to configure/have configured wrong? Thank you!

Update and details:

I am using Emacs 24.5 and Helm 20150704.1247.

I tried loading up emacs without my init, and only turning on helm mode with fuzzy matching for recentf, and it still doesn't work. On top of that, if I use helm-mini I have fuzzy matching in the Buffers section, but not the Recentf section...


texts: How to set the end time of a scheduled task in org-mode?

texts:
I know I can schedule a starting time for a task using C-c C-s, but is there a way to set a scheduled end time for a task? So that I can see my scheduled range in the agenda view, as follows.

Week-agenda (W16):
Monday     13 April 2020 W16
Tuesday    14 April 2020
Wednesday  15 April 2020
Thursday   16 April 2020
Friday     17 April 2020
Saturday   18 April 2020
               8:00...... ----------------
              10:00...... ----------------
              12:00...... ----------------
              14:00...... ----------------
  TODO:       14:30 ~ 16:00...... Scheduled:  TODO Start development
              16:00...... ----------------
              18:00...... ----------------
              19:50...... now - - - - - - - - - - - - - - - - - - - - - - - - -
              20:00...... ----------------
Sunday     19 April 2020
  TODO:       10:30 ~ 11:00...... Scheduled:  TODO Start making videos

Notice that this is my estimated end time, not the actual one.


texts:
I followed the tutorial verbatim and I am unable to yank earlier kills. I have looked online for support, but noone else seems to have this problem.

  Kill a line, move around, kill another line.
     Then do C-y to get back the second killed line.
     Then do M-y and it will be replaced by the first killed line.
     Do more M-y's and see what you get.  Keep doing them until
     the second kill line comes back, and then a few more.
     If you like, you can try giving M-y positive and negative
     arguments.

When I do C-y, I get back the last killed line. "Mark Set" shows up in the "command window"(where we type commands) after I do C-y. When I follow it up with M-y, nothing happens.

Question

My question is where do I start looking for the issues? Am I doing something wrong, or is the documentation not right? Could it be the version I have installed? Please help. Thanks.

computer specs:

Emacs 24.3.1
Ubuntu 14.04 LTS (almost up-to-date)

ME

I am a noob, going through line by line of the emacs tutorial to get the basics of emacs.


texts: xpm: Change displayed image on mouse-over in `header-line-format`

texts:
Q:  How do I programmatically instruct Emacs to change a displayed image (XPM) on mouse-over in the header-line-format?

For example, the following image has a black circle with a white letter X.  On mouse-over, I would like to modify the header-line-format and substitute the existing XPM image with one using different colors.

  (setq header-line-format (propertize " " 'display
  '(image :type xpm :data "/* XPM */
          static char * close_tab_xpm[] = {
          \"14 11 3 1\",
          \"       c None\",
          \".      c #000000\",
          \"+      c #FFFFFF\",
          \"     .....    \",
          \"    .......   \",
          \"   .........  \",
          \"  ...+...+... \",
          \"  ....+.+.... \",
          \"  .....+..... \",
          \"  ....+.+.... \",
          \"  ...+...+... \",
          \"   .........  \",
          \"    .......   \",
          \"     .....    \"};" :ascent center :mask (heuristic t) :margin 0)))


texts: I have some code that has names every few lines and wanted to use multiple cursors to edit all of them at once but it seems like it will only edit consecutive lines. By this I mean I have code on lines 1 5 11 and 15 I want to edit but with MC I can only seem to grab lines that are one below or above an already marked one. Is there a way to skip multiple lines?


texts: How can I display desktop-dirname in the modeline (or elsewhere)?

texts:
I often get confused about the current desktop I'm using. Currently, I have to call (display-variable desktop-dirname) to see in which desktop I'm working.
It would be much nicer, if the current desktop would be displayed somewhere. The modeline seems to be ok for that.
How can I do that?


texts:
In some projects I'm working with, there are coding rules that don't allow C++ operators such as == (for fear of being confused with = I suppose, but oh well...). Instead, special macros such as _EQ_ have to be inserted, which #define to ==. There are other #defines as well, such as _SH_LEFT_, _BITAND_ and so on.

Needless to say, this is all quite tedious to write and I would love to have a meachanism that makes me type == as I'm used to and have it automatically replaced by _EQ_.

I tried abbrev-mode, but as this answer explains, abbrevs can only be defined for words, and I don't really want to change the definition all the required syntax entries. Also, it would be nice if I don't have to type a space after the keyword, but have the macro appear as soon as I hit the last char of the "forbidden" sequence.

Is there any way to achieve this, maybe a "more aggressive" abbrev-mode or some package?

EDIT: Here are some replacements that need to be performed:

I type:            I want:
=                  =              (works with key-combo)
==                 _EQ_           (works with key-combo)
&                  _BITAND_       (works with key-combo)
&&                 _AND_          (works with key-combo)
|                  _BITOR_        (works with key-combo)
||                 _OR_           (works with key-combo)
!                  _NOT_          (works with key-combo)
!=                 _NOT_EQ_       (doesn't work with key-combo)


texts: ELPA list is missing markdown-mode according to list-packages

texts:
I'm trying to install markdown-mode using instructions on https://jblevins.org/projects/markdown-mode/, according to which I put into my init.el file

(require 'package)
(add-to-list 'package-archives
         '("melpa-stable" . "https://stable.melpa.org/packages/"))
(package-initialize)

and evaluating it, then evaluating

M-x package-install RET markdown-mode RET

but it gives the message, "[Not found]".

I tried package-refresh-contents but it didn't fix the problem. Also, the list returned by package-list-packages doesn't contain "markdown".

I've spent about an hour googling and reading but haven't found a solution so far.

I'm using Aquamacs 3.4 GNU Emacs 25.3.50.1, which "Check for updates…" claims is the current version. (I guess there's a delay between Emacs releases and downstream integration; hopefully my issue is not version-specific.) This distribution has some built-in markdown functionality but not (apparently) markdown-mode. Also, somewhere I read that there are additional packages (markdown2 and a couple of others) that I'd also like to try but which are likewise missing from my list-packages.


texts: In the help page of a function/variable, how to jump to the corresponding part in the manual?

texts: Sometimes the doc is just confusing without proper background knowledge mentioned in the manual (Info). How to jump to the manual from the help buffer?


texts: Add both `s` and `S` to ace-window's dispatch list

texts:
I've created two functions, scroll-window-up and scroll-window-down, and want to add these to ace-window's dispatch list:

(add-to-list 'aw-dispatch-alist
             '(?S gpolonkai/scroll-window-down " Scroll window down"))
(add-to-list 'aw-dispatch-alist
             '(?s gpolonkai/scroll-window-up " Scroll window up"))

When I press s in dispatch time, the selected window scrolls up,but for S it says there is no such candidate. I remember it worked on my other machine, so there may be some differences in how the two OS handles keys. If I'm right, is there a more reliable way to distinguish between upper and lower case characters? If not, can I specify C-s or M-s where it needs a character?

Edit: it seems I messed up a bit… the error message I get when pressing S is:

Args out of range: "S", 0, 5


texts:
I'm vim user and I've just started using emacs with evil. But one thing I'm finding really hard to understand is when do we use <C-x>, <M-x> etc. I want to understand when to use Control or Meta.
For example in vim, in normal mode d is the delete operator and can be combined with text objects like lines and words. So I'm trying to understand if things like C-x is bound to say runtime operations etc.


texts: I've run ediff-buffers to compare two versions of the same file, how can I now exit from this diff? How can I restore the view of the buffer?


texts:
I want to use the forward-sexp function in Emacs, which on my Spacemacs for Mac is bound to C-M-f.
Similarly for the backward-sexp. However, upon pressing C- for Control, and then the Meta key, which is the Escape key, I'm getting the following in the minibuffer:
<C-escape> is undefined.

How to fix this?


texts: Emacs shell send ^] (hat-right-sqare-bracket)

texts: Trying to run telnet in Emacs shell I cannot figure out how to send ^] to terminate it.


texts: How can I distinguish between Linux distributions in Emacs?

texts:
For example, to distinguish between Linux and Windows, I can use (when (eq system-type 'gnu/linux).

Is there a way to distinguish between Linux distributions, such as Ubuntu vs CentOS?


texts: Org latex preview untoggle when toggling

texts:
when I have latex in a section, and press C-c C-x C-l it preview all LaTeX fragments in the section, and when I jump to another section and toggle latex preview fragment for that section, it untoggle the latex preview of the other section.

By section I mean an outline, or source code.

For example I have some LaTeX in an outline and some in a source code (because I am writing a lesson), and when I toggle the LaTeX in the source code, it untogle the LaTeX of the outline.

How can I prevent that ?

Is there a way to have a binding to preview all the LaTeX of a document, even if it's already previewed ?

Thank you


texts: How to return to the original place where query-replace was started?

texts: Assume that I perform a query-replace in a document. When the process is finished, is there a simple way (1) to return to the original place where query-replace was started? (2) to return to the first place where a replacement was done?


texts: Can Dired query replace use regular expression to rename a group of files?

texts:
So I have long list of files that I'm trying to use regex to rename but, it looks like it does not take standard regular expressions. I’m sure I’m just doing this incorrectly.

After entering dired and C-x C-q to make the files writable. I do M-% or query-replace-regexp to start the regex file rename but it does not work.

I tried doing a query replace for .eps\d.* to match everything then a replace with .mkv with no luck.
What is the proper way to complete this task?

Starting File list example:

Show.S03E01.eps3.0.modifer322344.mkv
Show.S03E02.eps3.1.someihtng.else.mkv
Show.S03E03.eps3.2.lega.matters.mkv
Show.S03E04.eps3.3.data.par2.mkv

Finished File list example:

Show.S03E01.mkv
Show.S03E02.mkv
Show.S03E03.mkv
Show.S03E04.mkv


texts:
I am unable to use Ispell, after the upgrade to Hunspell 1.7.0.
It seems that the "-D" option does not return the loaded dictionary, therefore the function ispell-find-hunspell-dictionaries fails. Calling a fake file (null device) seems to return the proper values. I am using therefore this workaround:

;; Work around for Hunspell 1.7.0
(defun manage-hunspell-1.7 (old-function-ispell &rest arguments)
  "Add null-device when calling \"hunspell -D\"."
  (if  (equal "-D"  (nth 4 arguments))
    (funcall old-function-ispell "hunspell" null-device t nil "-D" null-device)
    (apply old-function-ispell  arguments)))
(advice-add 'ispell-call-process :around #'manage-hunspell-1.7))

What is the official way to use Hunspell 1.7.0?


texts:
I forgot what a key is bound to, so I decided to run

C-h k <my key binding>

But after pressing C-h k, I've remembered about that key binding and decided to quit. So I pressed C-g. Instead of quitting that command, describe-key described about C-g. I tried various other quit functions but they didn't work. I am wondering how to quit describe-key?


texts:
I sometimes want to insert a new heading without first jumping
to the end of the current tree.  It was fairly simple to guess
that this could be achieved by calling (org-insert-heading),
but from C-h f this function didn't seem to be bound to any
key.  I discovered by accident, though, that this function is,
usually, called after C-c <return>.  Question: was there any
non-accidental and easy way of discovering this?


texts: How can I run a keyboard macro in selected buffers from Ibuffer or selected files from dired?

texts:
If I have to do some variable name refactoring, I use ag and multiple-cursors.

But when I have to do some code block removal/addition/moving, I use keyboard macros. But I need to switch to each buffer and initiate that macro run manually.

Is there a way to simply selected the open buffers from Ibuffer (or files from dired) and execute the last recorded keyboard macro on all of them?


texts: Is there some completion plugin that can display the details of the currently selected item below the completion list?

texts:
When you use a dialog such as with C-x b, C-x C-b or C-x k the columns are usually not long enough, especially with long file names and directories.

Is it possible to have a detail view below the completion list, that will show the currently selected item below the completion list, with labels on the left and the values on the right.

A file selection dialog may look like this

So if I was on the row with another filename below the list I would have something like this

Is there some plugin for something like this?

Not only that when you navigate a list, shouldn't it be possible to scroll through the truncated columns to see more detail?

This problem is ruining the emacs experience for me. For instance it makes it hard to disambiguate browser windows in exwm.


texts: Accidentally started emacs --daemon, and couldn't kill it!

texts:
I was testing emacs --daemon functionality, and called two daemons alive. I wanted to kill them, with

$ pgrep emacs
275760
275857
$ pkill emacs
$ pgrep emacs
276788
276847
# It's alive again!
# Lemme kill them with emacsclient --eval
$ emacsclient -e "(kill-emacs)"
$ pgrep emacs
277339
277340

Are they zombies? I'm sure shutting down my laptop will really kill them.. but just to boost my understanding, what was going on here? How to kill emacs daemons properly (and gracefully?).


texts: When gdb debugging, can local window in emacs show c++ object's value correctly?

texts:
Suppose I've this code:

#include "map"
#include "string"
using namespace std;
int main () {
    map<string, string> m = {{"1", "2"}};
    return 0;
}

If I set BP at "return 0" and when it's hit, local windows shows:

std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > m <complex data type>

On the other hand, in gdb windows, "p m" can print out "$1 = std::map with 1 element = {["1"] = "2"}". Speedbar can shows the correct value too.

When gdb debugging, can local window in emacs show c++ object's value correct, same as speedbar?

(Speedbar is not convenient because I need manually add/remove data.)

Thanks.


texts:
I try to use mu4e with smtpmail to send mail, and use mml-attach-file to add attachment.

If the attachment filename contains non-english name, such as Chinese, the header of message will become Content-Disposition: attachment;
 =?us-ascii?Q?filename=3D=22=3D=3Futf-8=3FB=3F5aSN5Lmg5o+Q57qyLTE5LmRvY3g?=, which can show correct filename in mu4e. And there is a utf-8 coding in this header.

But, it cannot be shown in some web mail client such as zoho and gmail and some local client. They display the name by themselves rules such as the mail's subject. And I check the one's header which attachment filename can be shown correctly, it is Content-Disposition: attachment; filename*0*=utf-8''... or filename="=?UTF-8...

The first term of my emacs's coding-system in priority list is utf-8. sendmail-coding-system and mm-coding-system are nil or utf-8, which nil means use the same as emacs configuration.

My language environment is English, and I also tried to set it to UTF-8, but it is no effect.

By the way, my shell variable of LANG is en_US.UTF-8.

Is there a way to make it work correctly?


texts:
I'm following info found on this link, but cannot get the desired custom key bindings to work for windmove.

Basically, I put the following in my .emacs file:

(global-set-key (kbd "C-M-<left>") 'windmove-left)
(global-set-key (kbd "C-M-<right>") 'windmove-right)
(global-set-key (kbd "C-M-<up>") 'windmove-up)
(global-set-key (kbd "C-M-<down>") 'windmove-down)

Where my Control key is Ctrl and my Meta key is Alt, and I am using Emacs 24.5.1 on OS X 10.10.5.

While I have two windows in a maximized terminal (iTerm2), nothing happens when I press any of the 3-key chords above. Why?


texts: AppleScript wrapper for pdf viewer fails to complete

texts:
My setup is 2020 MacBook Pro M1 (Apple silicon), Big Sur 11.2.2, MacPorts, emacs-mac-app, AucTeX, and PDF Expert.  I am trying to get C-c C-c (View) to open PDF Expert at the right page.  I'm almost there, but my AppleScript wrapper for PDF Expert is not completing properly.  The AppleScript wrapper, ~/bin/pdfe, is below.  It is invoked as "pdfe filename page-number".  It works fine from the command line, but does not seem to execute the "tell" portion when executed through Emacs (setq TeX-view-program-list '(("PDFExpert" "pdfe %o %(outpage)"))).
    #!/usr/bin/osascript
    use framework "Foundation"
    use scripting additions
    on run argv
        set arguments to (current application's NSProcessInfo's processInfo's arguments) as list
        do shell script "open -a \"PDF Expert\" " & item 3 of arguments
        activate application "PDF Expert"
        tell application "System Events"
            tell process "PDF Expert"
                click menu item "Go to Page..." of menu 1 of menu bar item "Go" of menu bar 1
                keystroke item 4 of arguments
                key code 36
            end tell
        end tell
    end run

I have taken some pains to ensure that Emacs is running in my usual login environment including PATH, so I'm reasonably confident that isn't the problem (but I can supply my Emacs startup script if requested).  I have tried it with and without dbus running.  I have tried putting delays all over.  I have tried putting popup messages at various places, and found that the script just seems to stop dead before or during the first tell.
I suspect there might be a permissions issue.  Emacs I think has all the permissions it needs, but I don't understand enough about the situation to know how exactly the script is forking from Emacs, or how to enable the necessary permissions.

EDIT: I tried Emacs in an iTerm2 windows, invoking with /Applications/MacPorts/EmacsMac.app/Contents/MacOS/Emacs -nw, and the pdfe script runs perfectly, after I enabled Accessibility for iTerm2.  I have now also enabled Accessibility in Terminal, and my Emacs GUI version still does not have the right permissions.

EDIT 2: I tried running GUI Emacs by invoking with /Applications/MacPorts/EmacsMac.app/Contents/MacOS/Emacs, and the pdfe script again runs perfectly, so it seems the issue is with the way I start up GUI Emacs.  So here is my startup script, which I based on Emacs Wiki with a small modification to stop the Automator gear from turning indefinitely:
EMACS=/Applications/MacPorts/EmacsMac.app/Contents/MacOS/Emacs
EMACSCLIENT=/Applications/MacPorts/EmacsMac.app/Contents/MacOS/bin/emacsclient

cd # start in my home directory

if pgrep -U $(id -u) $(basename $EMACS) >/dev/null; then
  if [ "$#" -eq 0 ]; then
    # set -- -e '(select-frame-set-input-focus (car (or (visible-frame-list) (frame-list)))'
    echo "\"$EMACSCLIENT\" -e '(select-frame-set-input-focus (car (or (visible-frame-list) (frame-list))))'" | bash --login -s "$@" ;
  else
    echo "\"$EMACSCLIENT\" -n \"\$@\"" | bash --login -s "$@" ;
  fi
else
  nohup bash --login -c "$EMACS "$@"" >/dev/null 2>&1 &
fi


texts: Emacs Prelude key binding for bury-buffer

texts: Does Emacs Prelude provide a key binding for bury-buffer, which I use very frequently?


texts: Execute org-mode source blocks without security confirmation

texts:
I only want to turn off the warnings for certain source block languages.

I couldn't find an answer to this anywhere, only how to turn off the confirmation requests for all languages:

(setq org-confirm-babel-evaluate nil)

This is a super easy question for someone who knows e-lisp. It should be included with the documentation in my opinion, but there is only one language in the example.

How can I extend this to include more languages?

(defun my-org-confirm-babel-evaluate (lang body)
            (not (string= lang "ditaa")))  ; don't ask for ditaa
          (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)


texts:
Read process output line by line gives some partial ideas about how to deal with sub-process output in an intelligent manner, but no example and no working solution.  I have a couple of examples, one of them works (badly) and the other doesn't.

  To invoke the code: save the Emacs Lisp snippets as code1 and code2 then make them executable with chmod +x code* and run, e.g. ./code1 test.tex.

test.tex

\documentclass{article}
\begin{document}
Emacs compilation test.
\end{document}

this prints output from the inferior process all at once

#!/usr/bin/emacs --script

(call-process "pdflatex" nil '("*scratch*" t) nil (car argv))
(set-buffer (get-buffer "*scratch*"))

(prin1 (buffer-string))

(setq argv nil)

;;; Local Variables:
;;; mode:emacs-lisp
;;; End:

This does not print output from the inferior process at all

#!/usr/bin/emacs --script

(defun my-process-filter (proc string)
  (print "%s\n" string))

;; my understanding from comments on the question linked above
;; is that this would cause the output of the inferior process
;; to print out line by line.  It doesn't seem to work though.
(set-process-filter
 (start-process "tex" "*Messages*" "pdflatex" (car argv))
 #'my-process-filter)

(setq argv nil)

;;; Local Variables:
;;; mode:emacs-lisp
;;; End:

tl;dr

Another "solution" that serves as an interactive "proof of concept" is to run M-x shell followed by pdflatex test.tex.  Output from pdflatex is printed line by line.  How to achieve the same result non-interactively?


texts: Configure smartparens wrapping to work in evil-visual-state?

texts:
I've been migrating from Vim to Emacs in evil mode, and I'd like to use smartparens. I know there's a port of surround.vim, but I've always found surround.vim awkward to use, so I'd like to explore an alternative approach.

I particularly like smartparens' take on wrapping -- select a region and type ( to wrap it in parens. This seems especially nice in concert with expand-region.

But in evil-visual-state, ( is bound to evil-backward-sentence-begin. The binding originates in evil-motion-state-map, which both normal and visual states inherit from. I've tried a few ways to rebind ( to self-insert-command in order to let smartparens do its thing, but so far nothing I've tried has worked:

(define-key evil-visual-state-map (kbd "(") 'self-insert-command)
(define-key evil-motion-state-map (kbd "(") 'self-insert-command)
(define-key evil-motion-state-map (kbd "(") nil)
(evil-define-key 'visual evil-visual-state-map (kbd "(") 'self-insert-command)

How can I properly configure this?


texts: How do I get the old query-replace up-arrow functionality back?

texts:
the case:
Let's say I did a query-replace is foo1 with foo2, and now I want to query-replace foo2 with foo1.

In earlier versions of emacs (emacs 24, and every other version I remember), each previous entry into query-replace could be accessed via the  up-arrow:

I used to go ESC-%  (query-replace), up-arrow ** x1, it then shows ("foo2"), RETURN, then up-arrow x3 ("foo1"), RETURN.

In my new Emacs (emacs 25), up-arrow gives me the entire previous query-replace ("foo1 -> foo2"), instead of each field separately.

So I've got to do a rather convoluted edit which involves:

putting either foo1 or foo2 onto the clipboard. e.g. put foo1 onto clip board (which involves many keystrokes if foo1 is long and complicated)
3 x delete (to remove the arrow and spaces),
RETURN ctrl-Y, RETURN.

I've no idea why emacs 25 "improved" `query-replace up-arrow like that, but I find it a pain.

Is there any way to get the old, simpler, query-replace up-arrow functionality?


texts: bbdb -- searching for a name by regex with tab auto-completion

texts:
I use the function bbdb or bbdb-name to search for a particular record in my database using a regexp.  Due to muscle-memory, I routinely hit the tab key inside the mini-buffer expecting to have auto-completion, but that feature appears to be lacking.

Q:  Is there an alternative function that would enable auto-completion to help locate records matching a particular regexp?  If not, a suggested modification of the source code to achieve that goal would be greatly appreciated.


texts: How do I duplicate the 'effective' theme colors resulting from using terminal Emacs with a transparent background?

texts:
I'm running GNU Emacs 24.5.4 on Mac OS X 10.10.5 in Terminal.app.

In this (stock) setup, Emacs has a transparent background.  With a transparent background, the colors that Emacs uses to display text are auto-adjusted based on the color underneath Emacs.  In my case, "underneath Emacs" is a Terminal.app window with an opaque black background.

(In the title I refer to the "effective" theme.  I'm using that to mean to the colors that Emacs actually uses to render text - as opposed to the "specified" theme, which is different in this case.)

Here is what the default theme looks like when no background color is specified in Emacs, and Emacs is running in a Terminal.app window with an opaque black background:

And here is the same setup - except with a black background specified in Emacs:

While beauty is certainly in the eye of the beholder, I've gotten used to the colors in the top image.

So I'd like to duplicate those colors in GUI Emacs.  But since GUI Emacs isn't a transparent window always running on top of something with a black background and hence having colors auto-adjusted, setting its background to black results in the coloring shown in the bottom screenshot.

How do I duplicate the 'effective' colors used in the top screenshot so that they are used in GUI Emacs as well?

P.S. Here's a video demonstrating the text color adjustments happening in real-time vs. changes to the background color of Terminal.app: vimeo.com/139967912.  (I had to use an external camera since QuickTime Player's screen recording didn't work for this purpose.)


texts: What options are out there for quick-fix type functionality in emacs?

texts:
When using flycheck or flymake, it would be nice to have quick fix functionality which gives suggested fixes and automatically applies them when selected like most IDE's provide.

So far the only thing i've found that seems to do this is:

https://github.com/ulises/quickfix-mode

But it looks like it isn't commonly used or actively maintained and only supports a couple of languages.

Is there anything else out there? or is there something built-in to some commonly used programming modes that I might be missing?


texts:
How can I insert all the subdirectories of the toplevel directory in Dired?

And how can I insert the whole directory tree, i.e. all the subdirectories recursively?

I don't want to change the default switches, only to insert all the subdirectories just this once.

I'm not looking for C-u i and adding the R switch: that inserts subdirectories of the directory under the cursor. I want to insert all the subdirectories of the main directory.


texts: One key shortcut to jump two-ways between matching opening/closing tags in nxml mode?

texts:
Context

Editing an arbitrary XML file in nxml-mode.

Need

Let's say I have a structure like this:

  ...

Let's say the cursor is at the .
I'm looking for one shortcut that brings the cursor directly from  to , and back if called again.

Search before you ask

This question requests one-way jump and gets an answer: C-M-n to jump forward,  C-u -1 C-M-n to jump backwards -- Emacs, nxhtml how to highlight or jump to the closing html tag? - Stack Overflow.

But this is inconvenient because to jump back one has to:

position the cursor exactly at end of closing tag, and
use a long and convoluted key shortcut C-u -1 C-M-n.

There's room for more convenience: one shortcut to do both directions.

How to do that?

If this does not already exists, I'd like to it. I'm a seasoned developer in a number of languages and environments but not proficient enough in emacs-lisp to make my own solution.  Still, it might be easy enough to do for an emacs-lisp wizard.

Technically, one function with this behavior would do the trick:

when cursor is on an opening tag, jump forwards (call (nxml-forward-element 1))
when cursor is on a closing tag, jump backwards (call (nxml-forward-element -1))
bonus points if, when cursor is anywhere between < and > (not only just before < as nxml-forward-element requires), the function still works
bonus points if, when cursor is anywhere inside text or whatever, then jump backwards to opening tag.


texts: Open directory containing file during counsel-file-jump

texts:
I use counsel-file-jump to search files recursively. I would like to open the directory that contains a particular file candidate. I can execute counsel-dired after I open the file, which allows me to open the directory which contains the file. I would like to jump straight to this directory without first opening the file.

How can I achieve this?


texts: Spacemacs trying to download anaconda-mode instead of using existing installation

texts:
I'm using a preconfigured spacemacs/.emacs configuration put together by a coworker due to limited internet connectivity on the system I'm working with.  When I open a .py file I'll quickly get an error about being unable to download anaconda-mode

Download error on https://pypi.python.org/simple/anaconda_mode/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:645) -- some packages may not be found!

I'm not surprised that I can't access pypi to download a new version.  I want to use the already installed anaconda_mode

When I run packages-list-packages I see I have an anaconda-mode with a version listed as 20160901.1423 instead of a normal version number.  I'm not sure why I have a date format but all of the emacs packages I was provided with have this format, I assume it has something to do with how they were imported.

How can I configure spacemacs to trust the anaconda-mode I have installed instead of demanding anaconda-mode 1.5?


texts:
When attempting to save some file.gpg, the minibuffer returns Opening output file: Searching for program, no such file or directory, gpg. According to the EmacsWiki, all that should be required is the following two lines in ~/.emacs.d/init.el

(require 'epa-file)
(epa-file-enable)

I am running Emacs 24.5.1 on Mac OS X  10.11.6. I installed gpg separately via terminal command brew install gpg, but this did not help. What am I missing?


texts:
I have installed leuven with melpa a while ago and updated it as of 31st of August 2019. I found out there is a dark version. How do I activate it at loading of Emacs? I have tried:

(add-to-list 'custom-theme-load-path " ~/.emacs.d/elpa/leuven-theme-20190831.1008/")
(load-theme 'leuven-dark t)

Note that (load-theme 'leuven t) works for the light version. I have tried comparing leuven-theme.el and leuven-dark-theme.el but could not find a clue about what I am doing wrong.


texts: what is the difference between gtags-mode and ggtags-mode

texts: In my emacs (24.5.1) I have both and I'm not sure which is what. ggtags was installed through list-packages from melpa.


texts: Org-mode find tasks with no deadlines, transitively

texts:
I'm using sparse trees (not in agenda view, but in "normal" tree view) to help me get a clear picture of what I have to do, at a glance.

I would like to create a sparse tree that shows all the tasks that have no deadlines, and whose parents also have no deadlines.

Is that possible with a search query? If not, how can I do it?

Thanks for your help!


texts:
I recently setup org-crypt to use my gpg key to encrypt headings in org-mode files. I post my .init files in a public github repo.

My question is: Is the key in (setq org-crypt-key "xxxxxxxx") actually my gpg secret key?

Did I just post my gpg secret key online?

I'm revoking the key, generating a new one, then encrypting that heading in my .init file just to be safe.


texts: How to open a a file:line:col that works with tabs?

texts:
Currently I'm using:

emacsclient +12:34 some_file.txt

This works for the line but not for the column, since tabs are expanded when calculating the offset.

Is there a way to open a file at the correct column based on the character offset instead of white space width?


texts: On exporting Org-agenda to Google Calender via online ics file

texts:
I would like to apply the steps in:
http://orgmode.org/worg/org-tutorials/org-google-sync.html

I am starting with updating my Org-mode entries in my Google calender.

However, to have an ics file online for Google calender automatic update, I tried to publish the file through MEGAsync as a shared file/directory and supplying the link to Google, which did not work (Google complaining about no ics file).

My goal is to automate the export (eventually cron-job) from Org to ics and the update on the online server and just wait for Google to update it (once a day is Okay for me).

So any help is appreciated!


texts: How do I enable line numbers (on the left) every time when line is the long logical line

texts:
I have linum-mode enabled as well as truncate-lines.  Works fine as long as Emacs displays column 0:

The line number is  showed  on left (OK)

But as soon as the window is scrolled horizontally, the line numbers disappear:

The line number is not showed on left

How do I make it so the line numbers (on the left) stay displayed when I move along a long logical line ?


texts: Is it possible to select a buffer by the line at point?

texts:
I'm not entirely clear that this is a good idea... but it feels like it might be.

To avoid having to think about "which buffer contains what" it might be nice to be able to select buffers by recently viewed content. The simplest definition of "recently viewed content" is where the point is.

Is there any utility that implements this feature?

The closest analogue I can think of helm-mark-ring.
Ideally this might include some context in the results (like helm-org-rifle).


texts: Only open files which should be opened via Emacs via RET in dired

texts:
I got

;; Opens files externally from dired.
(defun dired-open-file ()
  "In dired, open the file named on this line."
  (interactive)
  (let* ((file (dired-get-filename nil t)))
    (message "Opening %s" file)
    (call-process "xdg-open" nil 0 nil file)
    (message "Opened %s" file)))
(eval-after-load "dired"
    '(define-key dired-mode-map (kbd "C-c o") 'dired-open-file))

in my init file so I can use dired to open PDFs, videos, etc. in applications like Evince or MPV. However, because I'm stupid, I keep hitting RET when wanting to view a PDF or watch a video which then causes Emacs to freeze.

How can I make dired only open files the way it currently does when I hit RET if xdg-open would open it with Emacs, and otherwise invoke xdg-open to open the file externally?

Note that I don't always want xdg-open to be invoked when I hit RET on file because that'd mean a new Emacs instance would be launched every time I open a simple text file via dired.

There is an answer which enables distinction based on the file name extension. This, however, does not work for me as I have many text files without any file name extension but also pictures and PDFs without file name extensions. xdg-open (and thereby file browsers like Nautilus) manage to open these files using the correct application because xdg-open can distinguish file type based on their magic numbers.


texts: How to set up Emacs Tide to use auto-complete for completion instead of company-mode?

texts:
I installed Tide in Emacs, and found it is pretty useful for writing JavaScript code.

But one thing is that Tide has built-in support for company-mode to do completions. Since I am an auto-complete user, just wondering whether it is possible to have a way to make Tide work with auto-complete?

Both Tide and auto-complete are 3rd party packages.


texts: Verifying behaviour of featurep when checking if a package is installed

texts:
;; Install package.el for package management
(require 'package)
(setq package-enable-at-startup nil)

(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t)
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/") t)

(package-initialize)

;;(when (not package-archive-contents)
;;   (package-refresh-contents))

;; Bootstrap use-package
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

;; (package-install 'use-package)
(featurep 'use-package)

Hi I'm new to emacs and I'm learning how to configure the init file. I have this code above so far that I'm not sure is working. Of particular interest is the bootstrapping of use-package. It might be ok and I just don't know how to use featurep or misunderstand it's use.

So I want to verify that the packages are being installed so I read somewhere on the internet that you can use (featurep 'some-package) to verify that the package is installed. So when I run the last line of this code, it is supposed to verify that the use-package bootstrapping worked.
I thought I should be expecting t as the output but I'm getting nil as the output from running (featurep use-package)

Any advice?


texts: Magit status section with recent checkouts / visited branches?

texts:
In the same fashion magit can offer the list of recent commits in a section of status buffer. I'd like to have a list of recent checkout/visited branches to be able to quickly switch to it (M-xbb).
One of current patterns I have is :

work on my topic branch
find a bug unrelated to my topic
switch to master and pull latest
create a spinoff branch from master (checkout -b )
fix bug
push & pull-request
go back to my topic branch

For last step I have to remember the name of my branch ; which is not handy for me.


texts: Flycheck error buffer empty for python files in the {package-name}/bin/ directory

texts:
I have this odd problem when I run flycheck on the python files inside the {package-name}/bin directory of my git repository. When I attempt to run flycheck on these files, the buffer with the Flycheck error appears empty and no errors are show. However, when I ran the command from the terminal it works fine.

I can also run flycheck on emacs on all other files outside of the {package-name}/bin without issue.

I also tried renaming the files (adding the .py extension) and moving them to another directory, but the problem persists.

Thanks


texts: Using org-capture to record an appointment with a time range

texts:
I would like to use org-capture to quickly store appointments in a journal file, and add a timestamp so that the appointment appears in my agenda. I'm using the following template:

;; excerpted from my .emacs-custom.el
(custom-set-variables
  '(org-capture-templates
        ("a" "Appointment" entry
         (file+olp+datetree "~/org/journal.org")
         "* %?
%T" :time-prompt t))))

This almost works. file+olp+datetree automatically places the new appointment at the correct spot in a date-tree, I am prompted for the actual date and time to use due to :time-prompt t, and the item has a time stamp inserted via the %T in the template.

The only hitch is that if I enter a time range (as for a meeting that will take 30 minutes):

<2019-09-18 Wed 12:30-13:00>

The time is truncated in my item to:

<2019-09-18 Wed 12:30>

So I have to manually add the time range myself.

Looking into the source code, it looks like org-capture-set-target-location explicitly cuts off the second part of a time range. That makes sense for the date-tree headings, but it breaks my scheduled timestamp.

Before I start hacking away at the org source code, I wonder if there's a way to accomplish this more directly. Specifically, what I would like:

Get a prompt for a date and time, which could include a time range.
Fill in an org entry, which includes the time I selected as a timestamp.
Store the entry in a date-tree structure in an org file.

What I don't want is to enter the date twice (once for the date-tree, once for the schedule), or to manually fix the date after the entry is created.

To clarify, I want the items stored in a date-tree structure so I can browse through this one file to review my past and coming appointments. I want to add the time stamp so the entries will appear in my org-agenda at the appropriate time and date.


texts: defcustom values for selecting from function call?

texts:
I have definition:

(defvar my/python-checker-alist
  '((pylint . (my/python-pylint-command my/python-pylint-args))
    (pep8 . (my/python-pep8-command my/python-pep8-args))
    (pyflakes . (my/python-pyflakes-command my/python-pyflakes-args)))
  "Known Python source code checkers.")

Default checker defined in:

(defcustom my/python-default-checker 'pyflakes
  "Default Python source code checker. See `my/python-checker-alist' for full alist."
  :group 'my/python
  :type 'symbol)

I would like to restrict user choice in M-x customize-group to only symbols from list:

'(pyflakes pylint pep8)

(1) How can I do this?

(2) What if I want to access alway up to date values? Can I specify function reference of lambda, like this:

(lambda () (mapcar 'car my/python-checker-alist))


texts: In a buffer with widgets how can I find out what function is called on a (link) widget

texts:
In a buffer with widgets how can I find out what functions widgets call?

Let's say I position the cursor on a widget, I execute M-x widget-browse-at and know now that the widget is of class "link".

From experiments I know that activating the widget (i.e. pressing RET on it) creates an new buffer, but what function calls it for this?

describe-key gives me only wid-edit as a function, but somehow wid-edit then must call the real action function.

How can I find out which function that is?

Is there something like an action table for widgets?

Some more details:

1) When I am on the widget and call M-x widget-browse-at I get a buffer like this:

Widget object browser.

Class: link

:args

:value
    "Open"

:notify
    [show]

:button-overlay
    #<overlay from 316 to 322 in *ein:notebooklist http://127.0.0.1:8989*>

:from
    [show]

:to
    #<marker at 322 in *ein:notebooklist http://127.0.0.1:8989*>

2) When in that buffer I am on the [show] widget of the :notify property and I call M-x widget-browse-at I get:

Widget object browser.

Class: push-button

:args

:value
    [show]

:tag
    "show"

:action
    [show]

:button-overlay
    #<overlay in no buffer>

:from
    [show]

:to
    #<marker in no buffer>

3) Using M-x widget-browse-at again doesn't give anything new.

So M-x widget-browse-at doesn't seem to point me to the function eventually called (which in this case probably is ein:notebook-open).


texts: How can I connect to a REPL and send and read data?

texts:
Let us say I have a command to start a REPL. How do I most easily read output and send input? A minimal example with shell, sending ls and reading the output would be appreciated.

The shell should preferably not be opened in a buffer, but run in the background, if that isn't very hard.


texts: I'd like to remove all wip references but current and send unused commits to garbage. But I found no specific wip commands for it. Should I use some combinations of generic git commands?


texts: show output from python-shell-send-region

texts:
Using python.el and ipython.exe (from Miniconda3), I'd like to highlight a portion of code and execute it in the associated inferior python buffer. Example:

#!/usr/bin/python3

myvar = 100+200
        ^^^^^^^ (this is my selected region)

If I use C-c C-c, it correctly sources the file. That's not what I want.

If I highlight the region as depicted above and use C-c C-r (python-shell-send-region), the entire line is executed, not just the region. That is, myvar should not be defined by this step. I'd like to send just the highlight region.

So I created an edited version of python-shell-buffer-substring, omitting the part that redefines start:

  (let* ((start (save-excursion
                  ;; Normalize start to the line beginning position.
                  (goto-char start)
                  (line-beginning-position)))

I also create my-python-shell-send-region, where the only difference is it calls my-python-shell-buffer-substring. This properly creates the substring

# -*- coding: utf-8 -*-

100+200

and sends it correctly to the inferior process. Except ... the output is inhibited (generally a good thing), and I'd like to see the output 300. I see the function python-shell-send-string-no-output, but I don't see a way to allow output when using *-send-string.

Q: how to allow the output, and/or is there a better mechanism for doing this?

(In the unrelated package ess, I use C-u C-c C-r for show-no-output, and C-c C-r when I want the output shown. I can deal with a reversal of this logic, that's not the issue for this question.)

(emacs-25.2.1 (x86_64-w64-mingw32) and ein-20171128.516)

EDIT

After some more digging (thanks wvxvw), I found that removing the inserted # -*- coding: utf-8 -*- line from the pasted string allowed the inferior process to print the output, but only on single-line regions. For instance:

#!/usr/bin/python3

myvar = 100+200
200+300

Highlighting just 100+200 produced the output 300, good. Highlighting from 100 through 300 on the next line, however, produced no output. If the highlighted string is on a single line and contains semicolon-delimited commands (e.g., 100+200;200+300), then the output from the last command is shown, nothing else (which is, I believe, correct behavior for python.) So the problem remains with multi-line regions.


texts: Unicode input from keyboard (QMK) to Emacs

texts:
I have setup my QMK-enabled keyboard to output Unicode characters. In short, that was adding UNICODE_ENABLE = yes line to the rules.mk file and adding the following two lines to the config.h file.

#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC
#define UNICODE_CYCLE_PERSIST false

And afterward adding (for example) UC(0x2227) and UC(0x2228) to keymap.c file in order to be able to type ∧ and ∨ characters. Now, this works fine in most GUI applications like web browsers, etc, it also works in Terminal (GUI). However in Emacs instead of ∧ and ∨ I get 2227 or 2228 SPC characters inserted in a buffer :(

I have tried setting (set-keyboard-coding-system 'utf-8) without any effect.

Switching to other Unicode insertion modes from my default UC_LNX, which gives the above behavior, results in:

for UC_OSX: same as pressing-and-holding Ctrl key and hitting digits (2227);
for UC_WIN: same as above with extra screen "blink";
for UC_WINC: only raw string u2227 gets directly inserted in the buffer.

The behavior for UC_LNX seems to be explained by Emacs interpreting the Unicode insertion as the following key-sequence: C-2 C-2 C-2 C-7 SPC, thus inserting 2227 space characters... :/

I am using GUI version of GNU Emacs running on CentOS 7 with GNOME Shell 3.28.3.

Has anybody any idea on how to get Emacs to correctly interpret the Unicode characters inserted directly from keyboard OR how to augment QMK software with Unicode insertion method that Emacs will understand UC_EMACS?


texts: How to disable the close frame shortcut?

texts:
Apparently pressing C-[ (three times in a row it seems?) (or alternatively ESC three times) closes a frame. I oftentimes accidentally press C-[ when I meant to press C-p. I tried to disable it with

(define-key "\C-[" KEY nil) which does nothing

as well as

(dolist (key '("\C-["))
 (global-unset-key key))

which for some reason makes my meta key not work anymore.

How can I disable \C-[?


texts: How open text file by default with UTF-8 endcoding system?

texts:
Emacs 26.1, Windows 10

In my init.el:

(set-language-environment "UTF-8")

But when I open text file the Emacs not show correct Cyrillic text.

Why?

describe-variable -> buffer-file-coding-system

show that file is encoded in utf-8-dos


texts: Can desktop sessions be used to save and restore shell buffers?

texts: Is it possible to use desktop-save-mode to save and partially restore my shell buffers? I realize shell buffers have quite a bit of state that isn't under the direct control of emacs, so specifically I am just looking to restore shell buffers with the shell running in whatever directory it was saved in. Not looking to restore prior output, env vars, or anything like that.


texts: Why do org-journal entries fail to show up in org-agenda unless given schedule or deadline date?

texts:
When I create an org todo entry in a weekly journal file under a date heading using org-journal, that todo will not appear in org-agenda unless I specifically assign a deadline or scheduling date to the item. The org-journal documentation seems to imply that todos created in a org-journal file can inherit a deadline from the file or header.
If that is the case, I wonder what I might be doing wrong. If not, what might be a way to achieve this kind of customization?
Here are my org-journal customizations:
(setq org-journal-dir "~/Documents/org/journal/")
(setq org-journal-file-type 'weekly)
(setq org-journal-file-format "%Y-%m-%d")
(setq org-journal-time-format "TODO ")
(setq org-journal-time-prefix "** ")
(setq org-journal-date-format "%A, %B %d %Y")

(defun org-journal-date-format-func (time)
  "Custom function to insert journal date header,
and some custom text on a newly created journal file."
  (when (= (buffer-size) 0)
    (insert
     (pcase org-journal-file-type
       (`daily "#+TITLE: Daily Journal\n\n")
       (`weekly (concat"#+TITLE: Weekly Journal " (format-time-string "(Wk #%V)" time) "\n\n"))
       (`monthly "#+TITLE: Monthly Journal\n\n")
       (`yearly "#+TITLE: Yearly Journal\n\n"))))
  (concat org-journal-date-prefix (format-time-string "%A, %x" time)))
(setq org-journal-date-format 'org-journal-date-format-func)


texts: Search for and correct capitalized words that are not at the beginning of a sentence

texts:
I have a latex document in which there are many incorrectly Capitalized words. Could anybody suggest a clever regex to track them?

Even better if there is a function which cycles through such words corrects them by asking yes or no.


texts:
When you have to edit system files, it's an usual situation that you launched Emacs with a normal user before, so the file will be write-protected. What can I do to gain root privileges? I mean something like M-x sudo from dired.

I don't want to launch Emacs as super-user and I don't want to quit it.


texts: Why Emacs overrides my PATH when it runs bash?

texts:
Why do (shell-command-to-string "echo $PATH") and echo $PATH in eshell differ from echo $PATH from ansi-term and gnome terminal in Ubuntu?

Some paths are missing from (shell-command-to-string "echo $PATH") and echo $PATH in eshell.

Emacs apparently does not read .bashrc nor .bash_profile nor .profile. Thus, paths added to $PATH using export PATH="<some_path>:$PATH" in any of above files are not visible to Emacs.

This behavior is same when I connect to emacsclient from terminal.
I'm using emacs --deamon on startup.


texts:
In my org file I have something like:

#+NAME: fig:figure
\begin{figure}
   \includegraphics{figure}
\end{figure}

and then I want to reference that figure inside a code block:

#+BEGIN_SRC r
    # code ...
    x <- 3
    # more code for fig. [[fig:figure]]
    plot(1:x)
#+END_SRC

[[fig:figure]] is not a link in the org document and does not get resolved when exported, it simply stays verbatim in the text. Is it somehow possible to make it reference the figure?


texts:
After doing some changes in a git "feature branch", I use "magit diff" to review/cleanup before pushing code to GitHub.

My question is

a) How can I get this ^ magit buffer in to my bookmarks+ (C-x r l) bookmarks


texts: `query-replace` leaves potential match to be replaced at bottom of window

texts:
If I have a long document that I run query-replace (or any other number of commands) in, as I'm saying y or n to replace that match or not, the current potential item to be replaced is always at the bottom of the window.

I'd like to be able to see more of what's below this match, to see the context a little more easily --- effectively, hitting C-l after each match update.

I could probably find some specific hooks that run at the point a new match is found to do this for me, but is there a more generic way of doing things, not involving writing a hook for each function that has this behaviour? (It seems pretty general.)


texts:
Was seeking here a way to show in mode-line the full path of directory, as the answered question bellow:

How can I show the full path to the current file in the mode-line for Spacemacs (Spaceline)?

But it doesn't works in Emacs 26.3, maybe only in Spacemacs.

Although already made some research, couldn't find a way to do it propperly, despite tried several codes found around the web,.


texts:
When I run code from a buffer in python-mode for it to evaluate in a dedicated inferior ipython process emacs freezes. It freezes if, while the code is evaluating, I try to edit the buffer from which I sent the code. I am unable to move the point, am unable to change buffers, am unable to type, and the time in the mode-line does not update.

What can I do to stop this from happening? Could it be related to the settings of my python-shell-interpreter?

Here is my python init

(use-package python
  :mode ("\\.py\\'" . python-mode)
  :interpreter ("ipython" . python-mode)
  :demand
  :config
  (setq python-shell-interpreter "ipython"
    python-shell-interpreter-args "-i"))

Thank you!


texts: special form or macro? eval-when-compile, eval-and-compile

texts:
Is eval-when-compile a special form (primitive in C), or a macro?
According to the elisp manual, C-h S eval-when-compile RET,

Special Form: eval-when-compile body...

But according to C-h f eval-when-compile RET,

eval-when-compile is a Lisp macro in ‘byte-run.el’

I'm trying to understand the difference between eval-when-compile and eval-and-compile. They have identical macro definitions in byte-run.el, but since the manual says they're special forms, rather than macros, I suspect there's something I'm missing.


texts: Get Administrator privileges on Windows via TRAMP?

texts:
I constantly use /sudo::/ URI schema on Linux to edit protected files.

Is there something similar on Windows?

Currently I start Emacs with Administrator privileges but that can lead to write protected files with some directory permissions' inheritance schemas.


texts: emacs, geiser, chiken scheme on windows setup help

texts:
I want to go through SICP.
I installed Geiser and Chiken scheme

I set the scheme interpreter to be chiken

(setq scheme-program-name "C:/Program Files\ (x86)/Chicken Scheme/bin/csi.exe")

Then I run M-x geiser and choose chicken in the Start Geiser for scheme implementation: menu.

A new window with a new buffer is opened. The buffer is called * Chiken REPL *.
But the buffer is empty. No promp no nothing.

Also, when I do M-x run-scheme it tells me Spawning child process: invalid argument.

Can anyone tell me please, how do I setup emacs, geiser, a scheme interpreter to run on windows?

Thanks for your help in advance.


texts:
On my Emacs (Aquamacs on OSX, latest version) the command Edit -> Spelling -> Mark All Misspellings goes through the whole file (from 0% to 100%) and then starts again at 0%, and continues ad infinitum.

The menu item runs the command flyspell-buffer
(found in global-map), which is an interactive autoloaded compiled Lisp
function in ‘flyspell.el’.

I cannot do anything else and have to abort Emacs to stop the command. What am I doing wrong?


texts: How do I show initial-scratch-message when the *scratch* buffer is recreated?

texts:
By default, a *scratch* buffer is created when Emacs starts. The initial *scratch* buffer contains the following message by default:
;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.

This message appears to be set by the variable initial-scratch-message.
If I kill (C-x k) the initial scratch buffer and recreate it using C-x b *scratch*, the new scratch buffer will be blank. It will not contain the initial-scratch-message. This is not what I want. I want to see the message. How do I configure all scratch buffers to contain initial-scratch-message when they are recreated?


texts: how to make emacs prompt me before closing the last emacs gui frame when running emacs as a daemon?

texts:
I know that if I set:

(setq confirm-kill-emacs 'y-or-n-p)

Emacs prompts me before I kill it.

But I want emacs to prompt me before I close my last gui frame (prompting me before killing any frame would be very helpful already). When you run
emacs in daemon-mode, closing the last gui frame does not kill emacs and thus the aforementioned setting does not work.

The problem is that sometimes I overpress my keybind to quit emacs windows (evil-quit) and I endup quiting also my current gui frame, which is annoying.

I know that before deleting the frame, emacs runs the functions that are listed in the variable delete-frame-functions, so I thought I could include a function there that would prompt me to query if I really wanted to kill the frame. But it is not clear from the documentation what I would have to do inside that function to stop the process of killing the frame.

Another idea would be to add an advice to evil-quit, like: if daemon-p is t then evil-quit have to prompt me to quit my current frame. Something like that?

I run GUI emacs from both OSx and GNU/Linux.


texts: Wait for (tex-file) to execute before go on with an elisp script

texts:
I wrote a script that reads the .aux and .log files after some replacements in the ·tex file (LaTeX). To achieve this i did:

(tex-file)
(read-string "Wait to tex-file to complete, then press ENTER:")

So I wait for tex-file to complete and then I press ENTER to make the script go on in reading the (re)genereted files.

I'd like to obtain the same result without the read-string command, with the script automatically waits for tex-file to compleate.

I read about sentinels but I'm not able to use them. I can't figure out how they works.


texts: Is it possible to have IPython qtconsole open as the default python console in Spacemacs?

texts:
Whenever I open a Python script in Spacemacs, I do C-c C-p to launch a console embedded - a console that is, by default, actually an iPython console.

Here is what I would love to be able to accomplish. I would like to configure it so that when I do C-c C-p, actually an embedded (i.e. not in a new external window outside Spacemacs) iPython qtconsole is created/opened instead of normal ipython console.

Note that I am not interested at all in working with Jupyter notebooks. I just want to have an ipython qtconsole inside Spacemacs.

Is such a task possible to achieve? How could I proceed to do have it like that?


texts:
I'm using calc on OSX and on a spanish keyboard, and I see some problems in using ^, but this is the most annoying:
when I type this example from de calc tutorial

 1:  2          2:  2          1:  8          2:  2          1:  6
     .          1:  3              .          1:  3              .
                    .                             .

    2 <RET>           3              ^              U              *

I always get:

Û is undefined on the minibuffer, what should I do, I can correct it with extra return pressing after ^, I need to press two time ^ in order to have it effect on calc


texts:
I have an org document and I go to one of it's subheading and issue this command:

org-narrow-to-subtree

As documented, it narrows the buffer to the current subtree. Now how do I un-narrow it ? I tried things like:

org-show-subtree
org-show-block-all

But nothing seem to bring the original buffer back. I can of-course kill the buffer and open the file again, but I think there would be a better way of doing it.


texts: Opening emacsclient -n -c opens a small frame with small fonts

texts:
I had set up a emacs --daemon at the OS startup and whenever I try to open emacsclient -n -c emacs opens a small window (possibly the minimum size possible) and with unreadable fonts (they are too small). A following picture shows the emacs window in perspective when opened with emacsclient -n -c

However, if I try to open an emacs frame on the default OS terminal (emacsclient -t) it works perfectly:

Whats wrong with emacs? I use Prelude and I have a .Xdefaults file containing Emacs.font: Ubuntu-10 that specify which font to use, but that doesn't seem to work.


texts: Org mode M-RET not working with new builds

texts:
Since the build of org mode of the end of august (now I use elpa/org-20150907), the M-RET does not start a new entry, and gives the error "Symbol's value as variable is void: org-planning-line-re". Strangely enough, M-SHIFT-RET still gives a new TODO entry.

I am currently on aquamacs emacs on OSX El Capitan public beta, but I do not think it is a system issue. In fact, if I go back to the aquamacs-bundled version of org (8.2.10, I do not know of which date, but I presume late 2014) M-RET works again perfectly.

Is anyone else having the same issue?


texts:
I am trying to run tests for a project called omnisharp-emacs. When I do so the following warning appears:

Warning: Lisp directory `/usr/local/Cellar/emacs/24.5/share/emacs/24.5/lisp/emacs-parallel': No such file or directory

Emacs was installed on MacOsX using brew, and is up to date. I have not idea what is that emacs-parallel. Haven't found any information, on searches, and doesn't appear on elpa, melpa, melpa stable, or marmalade.

Could anybody explain me what it is (or point to where it is explained), and how to install it?


texts: Elpy Configuration...Setting Up a Virtual Environment and Pip Conflic with Conda? Need hand holding

texts:
Full disclosure: I installed anaconda and set it to the path variable. After I did this I was able to access elpy-config which I was not able to (see my prior question). I still pretty much have no idea why this worked and what I'm doing right or wrong.
My three questions:
1. When I type command M-x pyvenv I get a message saying Can't find a workon home directory, set $WORKON_HOME. How do I actually do this without screwing up the existing paths?
2. How do I setup a virtual environment? I have trouble understanding this conceptually and I get confused as to what I'm actually doing when following instructions.
3. I read that having pip and conda simultaneously can bring issues when trying to install various packages. The warning tells me that I need pip...but do I?
Elpy Configuration

Emacs.............: 26.3
Elpy..............: 1.34.0
Virtualenv........: None
Interactive Python: python . (c:/Users/Robby Parliament/AppData/Local/Microsoft/WindowsApps/python.exe)
RPC virtualenv....: rpc-venv (c:/Users/Robby Parliament/.emacs.d/elpy/rpc-venv)
 Python...........: c:/ProgramData/Anaconda3/pythonw.exe 3.8.3 (c:/ProgramData/Anaconda3/pythonw.exe)
 Jedi.............: 0.17.1
 Rope.............: 0.17.0
 Autopep8.........: 1.5.3
 Yapf.............: 0.30.0
 Black............: Not found
Syntax checker....: flake8.exe (c:/ProgramData/Anaconda3/Scripts/flake8.exe)```

Followed by:
Warnings

You have not activated a virtual env. While Elpy supports this, it is
often a good idea to work inside a virtual env. You can use M-x
pyvenv-activate or M-x pyvenv-workon to activate a virtual env.

Elpy could not connect to Pypi (or at least not quickly enough) and
check if the python packages were up-to-date. You can still try to
update all of them:

[Update python packages]

Pip doesn't seem to be installed in the dedicated virtualenv created
by Elpy (c:/Users/Robby Parliament/.emacs.d/elpy/rpc-venv). This may
prevent some features from working properly (completion,
documentation, reformatting, ...). You can try reinstalling the
virtualenv. If the problem persists, please report on Elpy's github
page.

[Reinstall RPC virtualenv]

The black package is not available. Commands using this will not work.