texts: Cannot open .gpg file in emacs after upgrading to 27.1

texts:
I was upgraded from RHEL 7.6 to 7.8 last week.  After upgrade my emacs (v25.3) was broken and I got the following error:

error while loading shared libraries: libMagickWand.so.5: cannot open shared object file: No such file or directory

I could not figure out a solution (partly, I think, because our RHN server is down) so I downloaded/installed emacs 27.1.  Now, I cannot open a gpg file.  I get the following error in emacs:

GPG error: "no usable configuration", OpenPGP

I tried solutions offered here and here, but nothing has worked so far.
One solution suggested adding this line to .emacs
(custom-set-variables '(epg-gpg-program  "/usr/local/bin/gpg2"))

However, adding that results in the following error: "Wrong type argument: arrayp, nil"
I did not blow away the old emacs install prior to installing 27.1, but I doubt that is the problem.
Any help on resolving this is appreciated.


texts:
I have a freshly installed spacemacs installation and I want to make it so that I ansi-term is in emacs mode. However, I try to add

(add-to-list 'evil-emacs-state-modes 'term-mode)

to my .spacemacs in the dotspacemacs/user-config and/or dotspacemacs/user-init function and it has no effect.

Is there a canonical way to do this in spacemacs?


texts: how to insert image in table cell in org mode

texts: I am trying to make a table with images and texts, then export to an odt file. How to mix text and image in org table?


texts: How to save the text selection and keep the selection highlight

texts:
In Emacs 25 how can I save the text selection and keep the selection highlighting when using Transient Mark mode?

If I use kill-ring-save, the highlighting is switched off and I have to switch it on with exchange-point-and-mark.


texts: python emacs interpreter doesn't pause for input in loops

texts:
This looks like Weird shell output when using IPython 5, but it actually is not. I did set

(setq python-shell-interpreter-args "--simple-prompt -i --pylab")

in .emacs, but I get the following error:

Python 2.7.12 (default, Nov 19 2016, 06:48:10)
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
Using matplotlib backend: TkAgg
Warning: disable autoreload in ipython_config.py to improve performance.

In [1]:
In [2]:
In [3]:
In [4]: for i in range(3):
File "<ipython-input-4-658181e351fb>", line 1
for i in range(3):
                   ^
SyntaxError: unexpected EOF while parsing

This appears after I hit return. I was expecting the interpreter to wait for the content of the loop. Note that if I do not set the python-shell-interpreter-args, the prompt is garbage, but there is no error.


texts: Emacs not taking full space inside terminal

texts:
Image for description:

If you notice carefully, blue background of gnome-terminal is visible below where emacs ends. This probably means that emacs isn't taking full space inside gnome-terminal. How do I solve it (except setting my terminal background as same color which is an annoying hack)?


texts: How can I use the SE flavor of Markdown in emacs?

texts:
I would like to use the SE flavor of markdown in my emacs. The default Markdown mode has some features (backticks and indentation mark code, # makes a header and > also changes the font) but I would also like to have:

* to make a list item, including indentation.
[foo](http://example.com) to show up as foo and open a browser to http://example.com when clicked.

Ideally, I would like this to be shown in my emacs as rendered Markdown. For example, if I were to write:

## Header

* item 1
* item 2

         while true; do echo foo; done

End of list and more code

    while true; do echo bar; done

 See [here](http://example.com) for details

I'd like it to be rendered like this in emacs itself:

Header

item 1
item 2

while true; do echo foo; done

End of list and more code

while true; do echo bar; done

See here for details

Can this be achieved and, if so, how?


texts: user-init-file Variable Value Doesn't Change

texts:
The Goal

Place everything related to emacs in ~/.config/.emacs.d

What I Have Done

Created /usr/share/emacs/site-lisp/site-start.el which contain the following code:

(setq user-init-file "~/.config/.emacs.d/init.el")
(setq user-emacs-directory "~/.config/.emacs.d")
(load user-init-file)

Source

The Outcome

emacs still creates ~/.emacs.d which contains the auto-save-list directory.
Changing the value of variables through M-x customize creates the ~/.emacs file.
Examining the value of variables modified within site-start.el I get the following result:

user-init-file is a variable defined in ‘C source code’.
Its value is "~/.emacs"

user-emacs-directory is a variable defined in ‘subr.el’.
Its value is "~/.config/.emacs.d"

Is it possible to achieve what I want? This is part of my effort to organize my HOME directory. I have read the following documentation.


texts: How to check if there exists a secondary selection?

texts:
Emacs has a secondary selection (not the X11 selection, rather the mouse-secondary-overlay).

On my system holding Alt-LMB dragging sets it.

How would I check if there this selection is set in elisp?

I tried checking;

(if mouse-secondary-overlay
  ... do something ...)

however this always prints "Have Second Select"

How can this be tested?


texts: Difference between (quote string) and "string"

texts:
Experiment on interative ielm

ELISP> (print 'list)

list

list
ELISP> (print "list")

"list"

"list"

Any differences with the two results? by the way, one extra times printed.


texts: Org mode: export empty heading with tags

texts:
While writing in org mode for export to Beamer, I've found myself creating empty headings to control structure. For example:

*
Aliquam erat volutpat.  Nunc eleifend leo vitae magna.  In id erat non orci commodo lobortis.
*
Proin neque massa, cursus ut, gravida ut, lobortis eget, lacus.
**
Sed diam.  Praesent fermentum tempor tellus.  Nullam tempus.
**
Mauris ac felis vel velit tristique imperdiet.  Donec at pede.
*
Etiam vel neque nec dui dignissim bibendum.  Vivamus id enim.
**
Phasellus neque orci, porta a, aliquet quis, semper a, massa.  Phasellus purus.  Pellentesque tristique imperdiet tortor.  Nam euismod tellus id erat.

This works fine, but if the headlines have tags, the tags are treated as the title (this occurs when adding beamer properties). For example:

* :lorem:
Aliquam erat volutpat.  Nunc eleifend leo vitae magna.  In id erat non orci commodo lobortis.
* :ipsum:
Proin neque massa, cursus ut, gravida ut, lobortis eget, lacus.
** :dolor:
Sed diam.  Praesent fermentum tempor tellus.  Nullam tempus.
** :sit:
Mauris ac felis vel velit tristique imperdiet.  Donec at pede.
* :amet:
Etiam vel neque nec dui dignissim bibendum.  Vivamus id enim.
** :whatever:
Phasellus neque orci, porta a, aliquet quis, semper a, massa.  Phasellus purus.  Pellentesque tristique imperdiet tortor.  Nam euismod tellus id erat.

Is this intended behavior? Is there a setting?


texts:
Whenever I paste something in a source code buffer it is automatically re-indented. This is great sometimes, if I'm pasting a complete block of code or a single self contained line for example, but it's awful other times. For example I often assemble fragments together from various places and usually they have at least some existing indentation that I'd prefer to keep.

I've been told I can pass the universal argument to the past command to paste without indentation but "SPC u p" doesn't seem to do anything different.

Is there a way to turn off auto-indent for one paste in Spacemacs or, alternatively, is there a way to disable auto-indent on paste altogether (in that second case it'd be cool to have a command to indent the last pasted block).


texts: Every monospace glyph rendered with two whitespaces after?

texts:
As said in the title, every monospace glyph seem to be "rendered" as itself plus two whipespace characters; so, for example, the cursor is three characters wide. This doesn't happen with any part of the interface which uses non monospace fonts.

I checked and this happens also with an empty configuration.

I'm on Arch Linux, which is shipping Emacs 26.3.


texts:
Is their a way to hide comment whatever the language used?

Like if I'm in cpp mode all /* ... */ should be hide and if I'm on LaTeX mode, all % ... will be hide.


texts: Bug? Can get point into the middle of a run of characters with a replacing display spec

texts:
I'm implementing a minor mode that "folds" certain strings.  It does this by adding a font-lock keywords rule to the buffer, that applies display properties that make it look like it's a single character.  (For example, the six-character sequence \u00B6 might be displayed as ¶ when the mode is active.)
The documentation says that Emacs will not let point get into the middle of a run of text that's hidden this way, and that's mostly true, but I found a way to do it.  Start with point right before the visible ¶. Type C-d, which deletes the \; the font-lock rule no longer applies and the u00B6 reappears; point is now right before the u.  Then type a new \ .  The font-lock rule applies again, the \u00B6 disappears and ¶ reappears.  Point appears to be after the ¶, but it is actually in between the \ and the u.  Motion commands will remove point from the inside of the run, but if the very next thing you type is a self-inserting character, it will be inserted in between the \ and the u.  Depending on the details of the font-lock rule, it will either not appear at all, or it will make the rule cease to match.
What can I do from within my minor mode to prevent this from happening?  It seems like it might be a bug in Emacs, but I'd rather not wait for it to be fixed.
(All testing with Emacs 27.1. Adding the cursor-intangible property to the run of text, in the same way, does not help. Cut down version of the mode follows.)
(define-minor-mode fold-demo-mode
  "Folding bug demo"
  :init-value nil
  :lighter " FD"
  :keymap nil
  (make-variable-buffer-local 'font-lock-extra-managed-props)
  (let ((case-fold-search nil)
        (demo-fl-rule '(("\\\\u00[bB]6" 0
                         '(face font-lock-string-face
                           display "¶"))))
        (refontify
         (lambda ()
           (save-excursion
             (goto-char (point-min))
             (while (re-search-forward "\\\\u00[bB]6" nil t)
               (save-excursion
                 (font-lock-fontify-region
                  (match-beginning 0) (match-end 0))))))))

  (if fold-demo-mode
      (progn
        ;; When the mode is being turned on, refontify after
        ;; adding to font-lock-extra-managed-props and
        ;; adding the extra fontification rule.
        (push 'display font-lock-extra-managed-props)
        (font-lock-add-keywords nil demo-fl-rule)
        (funcall refontify))

    ;; But when the mode is being turned off, remove the extra
    ;; fontification rule, refontify, and only then remove 'display
    ;; from font-lock-extra-managed-props; otherwise the display
    ;; spec won't get cleared.
    (font-lock-remove-keywords nil demo-fl-rule)
    (funcall refontify)
    (setq font-lock-extra-managed-props
          (cl-remove 'display font-lock-extra-managed-props
                     :count 1)))))


texts:
I would like to highlight lines with a certain pattern whenever the file is opened.

Specifically when Journal.org is opened I want to run commands like M-s h l to highlight a set of patterns and assign them background colors.

What is the simplest way to go about doing this (without writing a lot of custom elisp code)?


texts:
Are there any packages to extract text from html in emacs?

What I would like to try is to extract relevant text from browse web so that I can read papers and articles without the visual clutter of links and similar.

Command line scripts I can use through emacs would also be accepted even though I would prefer an emacs package.


texts: search for strings and subheadings in org heading

texts:
As my org files keep growing, it is getting more complicated to find what I'm looking for. For now I'm using helm-occur to find strings and helm-org-in-buffer-headings to find headings in org files. However I want to be able to limit the scope of the search to the current heading including subheadings.

I have found helm-org-parent-headings, but I couldn't find "helm-org-child-headings".

EDIT

The command org-narrow-to-subtree mentioned by Tobias is a good solution, however I'm looking for a command that does not change the contents of the org buffer (I still can't figure out how to return to the "original" buffer without killing the buffer created by org-narrow-to-subtree).

helm-org-parent-headings displays headings like helm-org-in-buffer-headings WITHOUT changing the buffer, but as the name suggests it only displays parents.

So what I am looking for is a command that does the opposite and only displays children of the heading in a helm buffer.

Furthermore I want to modify helm-occur to search only for strings, that belong to children of the heading at point.


texts: Emacs on Windows 7 very slow when computer is outside company network

texts:
I'm using GNU Emacs 24.3 on Windows 7 and normally I don't have any problems with speed/responsiveness.

I'm launching Emacs with runemacs.exe

However, when I am travelling and try to connect to my company network via VPN (or just working offline without a connection to the company network), Emacs often becomes incredibly slow — it might take many minutes to open a buffer and it just does not respond to keyboard commands.

(I'm still highly interested in a solution)
All relevant text and configuration files are saved in my user directory C:\Users\myusername.domainname\Documents which is located on the local hard disk (so should not need accessing remote servers), but I wonder if Windows 7 might try to sync those files with a server

I'm also using the "offline files" feature for other directories and I wonder if this could have an effect on my problem.

The problem occurs not only when VPN is used, but also when the computer is just offline and not connected to the company network.


texts:
How to type S-LEFT during the transient mode after C-x <TAB> (indent-rigidly)?

Particularly, I am after this command

  C-x <TAB>

  This command is used to change the indentation of all lines that begin in the region, moving the affected lines as a rigid unit.
  If called with no argument, the command activates a transient mode for adjusting the indentation of the affected lines interactively. While this transient mode is active, typing <LEFT> or <RIGHT> indents leftward and rightward, respectively, by one space. You can also type S-<LEFT> or S-<RIGHT> to indent leftward or rightward to the next tab stop (see Tab Stops). Typing any other key disables the transient mode, and resumes normal editing.

In the above example is  S - <LEFT>  preceded by  C- x ?

Particularly, the steps I follow:

Select the text
Type C-X

Type Shift - left arrow (is it indifferent whether to type left or right shift?)

The result is some other window opened, e.g. scratch and no indentation done. The key combination thus obtained is C-x right


texts: Can I use org-latex-export-to-pdf to convert headlines to nested bullets?

texts:
I've been using headline levels in org-mode as essentially bullets. When I convert to PDF, I get a numbered list. Is there a way I can export those as nested bullets instead?
Thanks.


texts: Drag-and-drop file does not work anymore

texts:
Using Emacs 24.5 on a Gentoo/Kde workstation. Drag-and-drop of files used to work okay (as far as I remember), to open a new buffer on the dragged file.

Same behaviour when using emacs -Q.

It does not work anymore (FYI, I downgraded to emacs-23 (after reading Boregard's comment) and the drag-n-drop works perfectly.), or rather it sometimes works, but more often than not Emacs only displays "5 1" on the command line and adds "5 1" in the messages buffer.

This occurs for all users on the relevant computer. I guess it comes from some weird configuration on our side (otherwise other people would complain about this missing functionality). But how to pinpoint the source of this problem (and solve it, of course)?

Here is the output of M-x describe-variable x-dnd-types-alist requested by Nsukami _:

x-dnd-types-alist is a variable defined in `x-dnd.el'.
Value: (("text/uri-list" . x-dnd-handle-uri-list)
   ("text/x-moz-url" . x-dnd-handle-moz-url)
   ("_NETSCAPE_URL" . x-dnd-handle-uri-list)
   ("FILE_NAME" . x-dnd-handle-file-name)
   ("UTF8_STRING" . x-dnd-insert-utf8-text)
   ("text/plain;charset=UTF-8" . x-dnd-insert-utf8-text)
   ("text/plain;charset=utf-8" . x-dnd-insert-utf8-text)
   ("text/unicode" . x-dnd-insert-utf16-text)
   ("text/plain" . dnd-insert-text)
   ("COMPOUND_TEXT" . x-dnd-insert-ctext)
   ("STRING" . dnd-insert-text)
   ("TEXT" . dnd-insert-text))

EDIT: Sorry to be late in answering questions...

@Drew : same behaviour when using 'emacs -Q'

@Nsukami : here is the data

x-dnd-types-alist is a variable defined in `x-dnd.el'.
Value: (("text/uri-list" . x-dnd-handle-uri-list)
   ("text/x-moz-url" . x-dnd-handle-moz-url)
   ("_NETSCAPE_URL" . x-dnd-handle-uri-list)
   ("FILE_NAME" . x-dnd-handle-file-name)
   ("UTF8_STRING" . x-dnd-insert-utf8-text)
   ("text/plain;charset=UTF-8" . x-dnd-insert-utf8-text)
   ("text/plain;charset=utf-8" . x-dnd-insert-utf8-text)
   ("text/unicode" . x-dnd-insert-utf16-text)
   ("text/plain" . dnd-insert-text)
   ("COMPOUND_TEXT" . x-dnd-insert-ctext)
   ("STRING" . dnd-insert-text)
   ("TEXT" . dnd-insert-text))

FYI, I downgraded to emacs-23 (after reading Boregard's comment) and the drag-n-drop works perfectly.


texts: Delete similar lines in an Emacs Org-Agenda file

texts:
I would like to clean up entrees in my org-agenda files. I have had many duplicate lines which I have removed using delete-duplicate-lines. However, I also have many similar lines which I would also like to delete, which are not identical. For example, in the two entries below:
John Doe is %d years old today (Birthday) <1968-08-21>

John Doe (Birthday) <1968-08-21>

I would like to find these similar lines and then keep the 1st entry but delete the second. I would obviously like to check each entry and select which line must be removed.


texts:
I'm using org-reveal to make a presentation.

I want to have elements in tabular form appear sequentially but in column-major order.

I know you can put :frag property-markers for gradual appearance.  But I don't know how to do that inside tables.

Maybe tables are not the way to do this???

My basic question is how to make things appear  (reveal!) in reveal in the general case:

arbitrary order
2-d grid


texts: How to run custom scheme written in node.js using readline in emacs?

texts:
I have Scheme interpreter written in JavaScript that run on top of Node.js the problem is that when I run run-scheme and I enter something it give double echo:

lips> 10
10
10
lips>

if I run ansi-term it works normally. I have the same issue if I run from emacs -q. What may be the problem? My scheme use readline in Node.js, it works fine from real terminal emulator, outside of Emacs. It also works with other scheme interpreter like guile.

Anybody have idea what may went wrong, and why I have double echo?


texts: Generate a date tree from timestamps in org-mode

texts:
Since I was interested in doing my early capture-templates, I was tempted to go with this template below:

  ("j" "Reference type: Journal" entry (file+headline "~/Dropbox/orgfiles/gtd/ref.org" "Journal")
   "* %^{Heading} %^U %^G\n  :LOGBOOK:\n  Entered on: %U\n  %?\n  :END:\n %i" :empty-lines 1 :jump-to-captured t)

After using it I got this journal below which has now many entries like this:

My old journal

* Journal
  :PROPERTIES:
  :ARCHIVE: archive.org::
  :END:
** First journal heading. [1990-08-02 Thu 18:29]       :@home:tag1:tag2:tag3:
   :LOGBOOK:
   Entered on: [2018-05-11 Fri 18:28]
   First journal note [1991-02-28 Thu].
   :END:

** Second journal heading. [2003-03-20 Thu 18:21]         :@office:tag3:tag5:
   :LOGBOOK:
   Entered on: [2018-05-11 Fri 18:21]
   Second journal note.
   :END:

** Third journal . <2003-04-09 Wed 18:23>             :@shop:tag2:tag8:tag3:
   :LOGBOOK:
   Entered on: [2018-05-11 Fri 18:23]

   :END:

After using this template for a while, I leaned (hopefully not the hard way) that this template requires time sorting after introducing my entry: an unnecessary step compared to another template that exploits the datetree feature that automatically scans your file and inserts your note(s) to the date tree accordingly without the extra effort of sorting afterwards. So I see now the benefit of using a template with a datetree. However, one pros of my old template is that one can have an overview of all the entered headings instead of eyeballing a boring view of years, months and days. Besides, there is no entry for HH:MM in the datetree method, and I couldn't find a way to add HH:MM to the datetree structure. Sometimes, I want to record the time hour for an event.

The desired journal

* 1990
** 1990-08 August
*** 2018-08-01 Thursday
**** First journal heading.                            :@home:tag1:tag2:tag3:
     :LOGBOOK:
     Entered on: [2018-05-11 Fri 18:28]
     First journal note [1991-02-28 Thu].
     :END:
* 2003
** 2003-03 March
*** 2003-03-20 Thursday
**** Second journal heading.                              :@office:tag3:tag5:
     :LOGBOOK:
     Entered on: [2018-05-11 Fri 18:21]
     Second journal note.
     :END:
** 2003-04 April
*** 2003-04-09 Wednesday
**** Third journal heading.                            :@shop:tag2:tag8:tag3:
    :LOGBOOK:
    Entered on: [2018-05-11 Fri 18:23]

    :END:

Question

How can I convert the journal in my old org-file to the new date tree structure without losses? Also I am open to your suggestions of how to include the HH:MM of timestamps near the headings to the new date tree structure. It should be obvious that the new date tree structure should be based upon that timestamp that is sitting on the same line where the heading is (sometimes active sometimes not) so I have both [...] and <...> timestamps.

Note:

For the new journaling (or zournaling) method using the datetree I am using this template:

  ("z" "Zournal Entry" entry (file+datetree+prompt "~/Dropbox/orgfiles/gtd/zournal.org")
  "* %?" :prepend :empty-lines 1 :jump-to-captured t)

Is there a way to let it include the prompted HH:MM into the entry? I hope so. Till then, I am going to continue using the first template until someone provides the appreciated help.


texts: Could not load package flyspell with use-package

texts:
I have configured flyspell mode with use-package like this:

(use-package flyspell-mode
  :init
  (progn
    (flyspell-mode 1))
  :config
  (progn
    (setq ispell-program-name "aspell")
    (setq ispell-list-command "--list") ;; run flyspell with aspell, not ispell
    ))

But this gives me the following message while starting up Emacs in *Messages* buffer:

Could not load package flyspell-mode

Although if I manually give this command flyspell-mode, it works.


texts: Call Python from YaSnippet and insert result

texts:
I'm trying to build a comparable functionality as described here:
https://castel.dev/post/lecture-notes-1/#sympy-and-mathematica
Basically, he's using something comparable to yasnippet to send a dedicated region to yasnippet and sends it to python, printing it's return value.
I don't even know how to call python and just return it to the buffer in the first place, neither how to let yasnippet do it. Thanks in advance!


texts:
(How) can I include (or their resulting variables) in an org table?

* Inline code in table
src_R{1+1}
| src_R{1+1} |

when exported to, e.g. HTML, results in

Inline code in table
2
src_R{1+1}


texts:
When I look in the *Packages* buffer, I see this:
polymode           20200411.915  available  melpa      Extensible framework for multiple major modes

But, when I search for the same package on MELPA, I see that the available version is 20200606.1106
I tried (package-refresh-contents), but that doesn't solve the problem. Even worse, the package listed in *Packages* buffer was deleted from MELPA, thus installing it is no longer possible.
There doesn't seem to be a straight-forward way to request a particular version of the package either. One or the other would have solved the problem.
Also, deleting the file archive-contents in MELPAs archives directory doesn't help, as the file is being re-created with all the same information.

This is what my package initialization looks like:
(require 'package)

(setf package-archives
      '(("gnu" . "http://elpa.gnu.org/packages/")
        ("melpa" . "http://melpa.org/packages/")))

(package-initialize)


texts:
How to use Ansible layer in Spacemacs?

I am trying to understand how to write Ansible roles and test them using this layer. I added ansible to dotspacemacs-configuration-layers, restarted Spacemacs and checked Messages to see what is loaded.

Loading /home/anatoli/.emacs.d/layers/+tools/ansible/packages.el (source)...done
Loading /home/anatoli/.emacs.d/layers/+tools/ansible/layers.el (source)...
Loading /home/anatoli/.emacs.d/layers/+lang/yaml/packages.el (source)...done
Loading /home/anatoli/.emacs.d/layers/+tools/ansible/layers.el (source)...done
...
Loading /home/anatoli/.emacs.d/layers/+tools/ansible/funcs.el (source)...done
...
Loading /home/anatoli/.emacs.d/layers/+tools/ansible/config.el (source)...done

I still don't see anything. SPC m h a from documentation doesn't work - resulting in SPC m is undefined. Spacemacs shows /YAML\ at the bottom near the filename. I don't see that Spacemacs detected YAML file as an Ansible playbook - I don't get any hints or errors displayed on the screen. Perhaps I need to change mode from YAML to Ansible somehow. If so - how do I do this?


texts:
In sgml-mode, when I type quotes ", they are automatically replaced by &#34;. The culprit is the function sgml-name-self. Perhaps it is called automatically on characters in the variable sgml-specials (?); however, when I set sgml-specials to nil, the issue persists.
How to turn this automatic replacement off? Any help would be greatly appreciated, this automatic replacement drives me insane.


texts:
I am trying to assemble a list of features that work out of the box on Linux but will fail on a standard installation without addinng additional executables or DLLs, or are not implemented at all for Windows.

Specifically, I am interested in features supported directly by the emacs lisp API of a clean installation, potentially after updating packages from ELPA but not installing any new packages explicitly. Since there are inofficial binary releases like Emacs-w64, the official releases from gnu.org should be the relevant point of reference.

More explicitly, this includes the following groups:

Features lacking Windows-compatibility at the C-source level.

The one I ran into is ImageMagick support for transforming images without calling exeternal commands, which silently fails on Windows.
Libraries Emacs is normally linked against for binary Windows releases, whose corresponding DLL files are not shipped with Emacs (e.g. libpng or libjpeg).

dynamic-library-alist should give a complete list of such libraries. Unless it is incomplete, or it may include entries for libraries that the binary was not actually compiled against, nothing should have to be said about these.
Libraries which Emacs could be linked against, but isn't in the binary release (if there are any).
Ubiquitous Linux tools which are not present on Windows, which the standard emacs-lisp API and builtin interactive commands depend on.

The most important examples are probably find and grep.
Executables required by extensions that are wide-spread enough to be now bundled with Emacs releases.

An example would be org-mode, whose export feature requires a LaTeX distribution. It is also an example for the unimplemented ImageMagick dependence.


texts: org-mode and reftex giving this error: reftex-using-biblatex-p: Stack overflow in regexp matcher

texts:
I'm trying to set upt org-mode and reftex-mode but I'm getting some troubles. Here is my init.el file:

;; ORG-MODE
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(setq org-agenda-files '("~/.../"))
(global-set-key "\C-ca" 'org-agenda)
(add-hook 'org-mode-hook
      (lambda ()
        (reftex-mode)
        (visual-line-mode)
        (company-mode)))

I'm trying to load a .bib file with (setq reftex-default-bibliography '("path/to/bibfile.bib")) and it seems to work fine, but as I type C-c [ in order to add a new reference I got this error:

reftex-using-biblatex-p: Stack overflow in regexp matcher

Any hint? Thanks in advance.

P.S. couldn't tag with reftex-mode nor bibtex as I have no enough reputation score. If anyone could, I think thah would be good!


texts: Help needed to debug (very) slow markdown-mode

texts:
I come back to emacs after an eternity without using it. I used it before but now that I'm a grown up I'd like to understand what I do and how to do stuff.

I use emacs mainly for markdown edit at the moment. I have absolutely no problem with the markdown mode I use... until I create a link [foo](url). After that emacs becomes so slow that it's almost impossible to use. I think it may come from my .emacs configuration but I don't know what to do there. I tried to change the markdown mode I used and the result is the same (switching from poly-markdown to markdown-mode+).

Could please help me to learn how to investigate and (if possible) solve that kind of issue when it happens?

## Edit:

Thanks to @Stefan I learnt how to run the profiler and check what's taking all the resources. Obviously it's somehow due to markdown--first-displayable ... char-displayable-p. What can I do now? What are the options?

- ...                                                            1294  99%
 - jit-lock-fontify-now                                          1256  96%
  - jit-lock--run-functions                                      1256  96%
   - run-hook-wrapped                                            1256  96%
    - #<compiled 0x294f1c9>                                      1256  96%
     - font-lock-fontify-region                                  1256  96%
      - font-lock-default-fontify-region                         1256  96%
       - font-lock-fontify-keywords-region                       1256  96%
        - markdown-fontify-inline-links                          1256  96%
         - markdown--first-displayable                           1256  96%
          - cl-find-if                                           1256  96%
           - apply                                               1256  96%
            - cl-find                                            1256  96%
             - apply                                             1256  96%
              - cl-position                                      1256  96%
               - cl--position                                    1256  96%
                - char-displayable-p                             1256  96%


texts:
I wanted to have wc-mode (a minor mode) enabled when I edit any markdown file in a specific directory. So, I created a .dir-locals.el file and added the following to it:

((markdown . ((wc-mode . t))))

But when I open a markdown file, it still does not have wc-mode enabled.

What am I doing wrong? How do I set it right?


texts:
Is there a fast way of changing the case of the last searched pattern?

Inside Evil mode, I press # key to quickly search for keywords at point. And I want to change the case of all occurences of that keyword.


texts:
I don't understand the above error. When I try to start a drill session on my current buffer, the message org-drill: invalid match tag "" appears.

I tired to customize the variable org-drill-match in the customization menu:

I tired to set it to nil, to a tag string like this: tag or "tag" or ":tag:" or "\:tag\:" but it doesn't change anything, where <tag> is the tag I choose.

I also don't find the string "Invalid match tag" in the org-drill.el file.

How can I reset the org-drill-match variable so that the drill session works again. Or is there another reason for this error, maybe a badly formed tag?


texts: Sort agenda items by link's text and not link's url

texts: I use alpha-up as the org-agenda-sorting-strategy. I have many hyperlinks in my task titles. And these items seem to be sorted by the url first (as a hyperlink is [[url][title]]. How do I change this behavior to actually sort on text only?


texts:
I'm using spacemacs and currently I'm using the following in my user-config to switch to the scratch buffer when emacs starts:

(setq inhibit-splash-screen t)
(switch-to-buffer "*scratch*")

However, I want to adapt that code to open an org file instead. The issue is that I run the same config on 3 different computers and the location of the file is different for each:

~/Dropbox/myfile.org
C:\Dropbox\myfile.org
D:\Dropbox\myfile.org

How do I add some condition checking so that:

If I'm on OSX or Linux, load the org file from ~/Dropbox/myfile.org
If I'm on Windows and the file exists, load it from D:\Dropbox\myfile.org
If I'm on Windows and #2 doesn't exist, load it from C:\Dropbox\myfile.org

My issue is differentiating between case 2 and 3. Case 1 can be handled by checking system-type, but on my desktop I have multiple hard drives so I keep Dropbox on D:\, but on my laptop I only have 1 SSD so Dropbox is on C:\, and need a way to figure out the correct path to the file on both Windows systems


texts:
I am tryping out org-wiki.el to create a personal wiki in org-mode. The package offers a custom link type wiki:<page> which creates a link like wiki:myPage that matches up with myPage.org.

I'm wondering if there is any way to set the default description for this link type to hide the wiki: prefix, so that on completing the link, it converts to [[wiki:myPage][myPage]]?

Or better yet, typing [[wiki:My page]] which automatically displays as [[wiki:My page][My page]] so we can ditch the camelCase!

Any ideas?

thanks,


texts: construct an association list from two vectors

texts: I have two vectors, [apple orange] and [5 10]. How do I construct an association list ((apple 5) (orange 10)) from them?


texts:
I have repeating items that I would like to do every day but sometimes miss, e.g.:

** TODO That nasty habit
SCHEDULED: <2019-09-28 Sat 06:00 ++1d>
:PROPERTIES:...
:LOGBOOK:...

I can move point to the timestamp after SCHEDULED and do S-RIGHT, which shifts to the next day.

I could not find a relevant function M-x org-*delay, nor M-x org-*schedule.

How can I delay the item, while keeping the time and the repetition cookie, ideally with a key binding?


texts: unable to post out email from gnus - "make client process failed"

texts:
I have a major problem with gnus, running on debian testing in that I am now totally unable to send any email out, and it even survives a reboot! When I try to send an email the following comes up in the debugger -

Debugger entered--Lisp error: (file-error "make client process failed" "connection refused" :name "smtpmail" :buffer #<buffer *trace of SMTP session to london*> :host "london" :service 25)
  make-network-process(:name "smtpmail" :buffer #<buffer *trace of SMTP session to london*> :host "london" :service 25)
  network-stream-open-starttls("smtpmail" #<buffer *trace of SMTP session to london*> "london" 25 (:type plain :return-list t :capability-command "EHLO london.london
\n" :end-of-command "^[0-9]+ .*
\n" :success "^2.*\n" :always-query-capabilities t :starttls-function #[(capabilities) "\301\302\"\205

There is a lot more but I'm unable to post it all. I've tried also at http://paste.debian.net/163455/ but theres not a lot of difference.

How do I get round it please to stop me being locked out of sending emails?

This is part of my gnus-file -

(setq smtpmail-smtp-server "relay.plus.net")
(setq send-mail-function 'smtpmail-send-it)
(setq message-send-mail-function 'smtpmail-send-it)
(require 'smtpmail)
(require 'expiry-hack)

(setq smtpmail-auth-credentials "~/.authinfo")

(setq starttls-use-gnutls t
      starttls-gnutls-program "gnutls-cli")

And when checked gnutls-cli is provided by gnutils-bin which wasn't installed, but now is. So I'll reboot and see if that sorts the problem out.


texts:
When I start Emacs 24.4.1 for Windows with the -nw option, I am unable to start R via Meta+R.  Emacs becomes unrensponsive and I have to kill the process.

The problem seems connected with the call in (R):

(inferior-ess r-start-args cust-alist gdbp)

By debugging I see r-start-args is set to "--no-readline", but I am not able to debug inferior-ess. In fact  Edebug gives: Debugger entered: nil, without stepping through code.


texts:
If I select image files in a Dired buffer and do C-t C-t, a nice little thumbnail appears. But if I try this with PDF files, nothing happens. I would expect to see a thumbnail of the first page of the PDF.

Is this normal? Is there an easy way to get the behavior I want? (I am running Emacs 24.3.1 on Ubuntu 14.04 if that matters.)


texts: "Start ergoemacs command loop" is blocking Emacs

texts:
I use ergoemacs package from MELPA. I've added the following lines from
official manual to my configuration file:

(setq ergoemacs-theme nil)
(setq ergoemacs-keyboard-layout "us")
(require 'ergoemacs-mode)
(ergoemacs-mode 1)

I can work without problems all day, or every minute see the message

  Start ergoemacs command loop

which blocks Emacs (C-g has no effect and other keyboard
shortcuts too, the only shortcut that works is
Alt-F4).

Emacs built from source, version 24.5.1
OS — Ubuntu 12.04.3
Desktop environment — Cinnamon

How to fix the problem?

My latest .emacs here.


texts: emacs sometimes inserts tabs at weird places

texts:
Sometimes when I am typing in emacs, I type a space and emacs actually inserts a tab instead of the space. For example, while typing "Four score and seven years ago" emacs actually inserts this: "For score andseven yearsago". However, it only does this then the space falls on an 8 character boundary, at character position 7, 15, 23, etc. relative to the start of the line. Because of its positioning in the line, these tabs show up as only one space. However, if I copy/paste this line to another app, the tabs show up as 8 spaces; they are really tabs, not spaces.
Is there some way to shut off this behavior?
Note: I am on a mac and I'm using:
GNU Emacs 26.3 (build 1, x86_64-apple-darwin19.0.0) of 2019-11-08


texts: list-buffers gives a list of all buffers. But, I want only buffers where a specific minor mode (say aggressive-indent-mode) mode is enabled. How can I filter them?


texts:
I learnt . /path/to/file in bash is used to execute a file. Just out of curiosity, I eval something like the following in Emacs

(. 123)
     ⇒ 123

(read "(. 123)")
     ⇒ 123

It looks like Emacs simply reads (. 123) as 123, what happened?


texts: Simulate Vim's virtualedit and nostartofline

texts:
In my .vimrc I have set virtualedit=all and set nostartofline. I'd like to have these features in Emacs. Can it be done?

virtualedit allows the cursor to be positioned where there are no characters, not even whitespace. It allows you to scroll horizontally beyond any text. If you scroll vertically one row at a time then the cursor always goes up one row and does not change the column it is in, regardless of the contents of the row. If the cursor is beyond the characters in a row and you insert a character, spaces are filled in to the left of the inserted character.

With nostartofline also set, the cursor does not go to the start of the line if I use movements that jump by multiple rows, for example, jumping to the start or end of a file.

With both options set, I can place the cursor, possibly beyond any text in the file, and jump vertically without the column of the cursor changing. A command to move the cursor to the "end of the line" will jump to the last character. So if the cursor is way off in the middle of nowhere, $ will actually move the cursor left instead of right.

There is another question that mentions Vim's virtualedit but it is concerned with making rectangular selections. This question is concerned with the movement of the cursor and the behavior of inserting spaces to catch up to inserted characters.


texts:
OS: OS X 10.9.5, Mavericks

  GNU Emacs 24.3.1 (x86_64-apple-darwin13.1.0, Carbon Version 1.6.0
  AppKit 1265.19) of 2014-04-03 on Rainers-MacBook-Pro-3.local

I installed emacs via homebrew from railwaycat and it works nicely - no complaints. I do not use emacs in the termoinal, and I usually start it via the Application.

As I said - I am happy so far.

I just have one thing I did not manage to get right (which worked nicely under linux before), which is:

get emacs daemon starting upon login
using emacsclient to open
close emacsdaemon and save al files upon logoff

Any working recipes which could help me to set this up?

Added information

To start an emacs daemon upon login

I created an Automator Application executing the bash command

/usr/local/bin/emacs --daemon

and added it to the Login Items which works nicely.

Utilising daemon from terminal

I can utilise the emacs daemon by using

emacsclient .bashrc

which opens .bashrc in an emacs terminal session.

Utilising from GUI

Now remains the question: how can I utilise it from the GUI?

As I understand the emacsclient, I can not open an emacsclient unless I specify a file to open.

I would like to open an emacsclient GUI and open all files which were previously opened? Is this possible?

I found out that I can use

emacsclient -c

in a terminal to do what I want - but can I do the same for the GUI?


texts:
I'm having a problem with setting up colors in my xfce terminal.

(list-colors-display) shows only 8 colors, while both my $TERM variable and (tty-type) is xterm-256color. I've dug through the Internet, but couldn't find anything useful. Do you have any ideas?

EDIT: I'm using Emacs 26 with Xubuntu 18.04


texts: How can I get git-gutter:next-hunk to NOT loop around at buffer bottom?

texts: As per the title, I would like to stop processing at the end of a buffer and not loop around to the top. I find it easier to keep track of what I am doing that way. TIA.


texts:
I am using OrgMode to schedule appointments and tasks. For a simple scheduled event like a phone call, I usually add a simple timestamp by CTRL+.. Then the cursor is moved to the minibuffer and a calendar pops up in which I can easily move with Shift and the cursor keys. Also, since I add the line

%%(org-diary :timestamp :sexp)

in my diary file, the dates where I do have appointments are highlighted.

However, I found no way to open a buffer that shows me the scheduled appointments for that day when using the scheduling features of OrgMode (moving through the calendar by using the Shift key etc.). The usual command in the calendar which is invoked by pressing d does not work, because the cursor is in the minibuffer. How can I get this view, when using the OrgMode scheduling features?


texts: Can I create a yasnippet with a repeating variable length list

texts:
Javascript Angular has a peculiar pattern for creating controllers that looks like this:

myApp.controller('myController', ['$scope', 'foo', 'bar',
                 function($scope, foo, bar) {
                     //do stuff...
                 }]);

The '$scope', 'foo', 'bar' thing is repeated as the parameter list in the function inside the square-bracketed array.

I thought I could make doing this less error-prone by writing a yasnippet. It looks like this:

# -*- mode: snippet -*-
# name: angctl
# key: angctl
# --
$1.controller('$2', ['$3', function($3) {
$0;
}]);

This works fine, but only if there is one parameter (in the $3 position), like if I'm just using $scope. If I want to use more than one, it breaks down.

Is there some way of writing the snippet so it will make a comma delimited list of quoted strings and repeat a comma delimited list of unquoted strings somewhere else within the snippet?


texts:
If I get the function definition with
(setq wrapped-copy (symbol-function 'fn))

how can I make a copy such that I can redefine the same function with a wrapped version?
like
(fset 'fn #'(lambda () (wrapped-copy)))

I tried with copy-seq but I think it copies by reference, so the anon function looses the function definition in the wrapped copy


texts:
Suppose i have this line of code presenting a C function prototype:

int sum_Func(int a, int *b)

I want an Emacs lisp function that adds the function description (initialization) according to its elements:

    /**
    *sum_func-
    *@a:
    *@b:
    *Return:
    */
    int sum_Func(int a, int *b)

I'm new to Emacs.I tried to accomplish that with  recording a macro but the function 's number of  arguments is not fixed,which it makes a lisp function more suitable for the task.


texts: AUCTeX - removing an environment from auto-complete list

texts: I use the auto-complete feature of LaTeX-environment often.  I'd like to be able to remove entries from the auto-complete list.  I usually need to use the packages amsmath and amsthm, which introduce lots of environments I don't use. I'd prefer not to have them in my auto-complete list (so that I can type fewer characters to find the environment I want).  Is there a way to have this happen automatically after I open a file?


texts:
I deal with a two column table where I have to match data from two sources. The first column contains names of persons for whom, service is provided. The second, persons who are billed. My job is to match them at the end of day and find out descripancy, if any. Is there a way to automate this, so I just have a list of mismatched names with couple of clicks. Regards.

|column 1| column2|
|--------|--------|
| abc    | xyz    |
| xyz    | abc    |
| CSR    | CSR    |

Expected result:

|column 1| column2|
|--------|--------|
| abc    | xyz    |
| xyz    | abc    |


texts: Automatically download external packages

texts:
How can I configure my init.el download packages that are not in (M)Elpa and install them automatically (if not already installed)?

Something like doing it with wget or with git (as you do in vim) and then install them:

wget http://www.web.com/script.el
git clone https://github.com/user/package.git

And then install it with M-x package-install-file. Or something like that.
I don't know anything about lisp and I would like to do that from my init.el


texts: Emacs Shell/Makefile Command to Generate Org HTML for Org Journal Files

texts:
I'm using a Makefile to generate HTML for my org folder to turn into a website, but I'm just starting to use org-journal which doesn't put filename extensions on it's files. When trying to run a command on the file...
emacs -Q --batch journal/2021-05-27 -f org-html-export-to-html

Gives the output
Debugger entered--Lisp error: (void-function org-html-export-to-html)
  org-html-export-to-html()
  command-line-1(("journal/2021-05-27" "-f" "org-html-export-to-html"))
  command-line()
  normal-top-level()

I presume this is because it doesn't recognise the file as an org file, but I'm uncertain at what to do. I've thought of temporarily renaming all the files to org, but I was hoping to have a more... elegant solution just by a different emacs command.
I tried the following command but I also get a void-function error.
emacs -Q --batch journal/2021-05-27 -e "(progn (org-mode) (org-html-export-to-html))"

So... the question is: How can I use emacs to convert an org-journal file to html?


texts: Asynchronous version of shell-command-on-region?

texts: I have a problem which is very similar to this one. I have some text that I'd like to listen to with macOS's say utility. Unfortunately, Emacs locks up when I use shell-command-on-region because it is not asynchronous. In other words, Emacs waits for the shell process to finish before it does anything else. This is highly inconvenient and would be resolved with an asynchronous version of shell-command-on-region. Yet, it seems that no such function exists despite there being other asynchronous alternatives to shell- commands. Does anyone know of a simple way to solve this problem?


texts:
I'm trying to install emacs 26.3 on debian 10. After the download :

./configure
sudo make
sudo checkinstall

during the checkinstall, I have the following error :

 rm -f "/usr/local/share/emacs/26.3/lisp/subdirs.el"
 umask 022; ../build-aux/update-subdirs
 "/usr/local/share/emacs/26.3/lisp"
 subdir="/usr/local/share/emacs/26.3/site-lisp" ; \
   if [ -f "${subdir}/subdirs.el" ]; then true; else umask 022;
 /usr/bin/mkdir -p "${subdir}"; (echo "(if (fboundp 'normal-top-level-
 add-subdirs-to-load-path)"; echo "    (normal-top-level-add-subdirs-
 to-load-path))") > "${subdir}/subdirs.el"; fi
 subdir="/usr/local/share/emacs/site-lisp" ; \
   if [ -f "${subdir}/subdirs.el" ]; then true; else umask 022;
 /usr/bin/mkdir -p "${subdir}"; (echo "(if (fboundp 'normal-top-level-
 add-subdirs-to-load-path)"; echo "    (normal-top-level-add-subdirs-
 to-load-path))") > "${subdir}/subdirs.el"; fi || true
 [ -z "/usr/bin/gzip" ] || { \
   echo "Compressing *.el etc. ..." && \
   cd "/usr/local/share/emacs/26.3/lisp" && \
   for f in `find . -name "*.elc" -print | sed 's/.elc$/.el/'`; do \
     /usr/bin/gzip -9n "$f"; \
   done; \
   /usr/bin/gzip -9n "../etc/publicsuffix.txt"; \
 }
 Compressing *.el etc. ...
 gzip: ../etc/publicsuffix.txt: No such file or directory
 make: *** [Makefile:571: install-arch-indep] Error 1

 ****  Installation failed. Aborting package creation.

How can resolve this issue ?


texts: How to update TODO to DONE on children checkboxes marked?

texts:
I want to build files like this:

** TODO [1/2] Some group of things
   - [X] Easy thing
   - [ ] Difficult one

I would like to get TODO to change automatically to DONE once I mark the second checkbox.

** DONE [2/2] Some group of things
   - [X] Easy thing
   - [X] Difficult one

I checked the org-mode manual, and I found something very similar that enables the propagation of the DONE, but my emacs powers are not strong enough to adapt it to my needs:

(defun org-summary-todo (n-done n-not-done)
"Switch entry to DONE when all subentries are done, to TODO otherwise."
(let (org-log-done org-log-states)   ; turn off logging
(org-todo (if (= n-not-done 0) "DONE" "TODO"))))

(add-hook 'org-after-todo-statistics-hook 'org-summary-todo)

Thanks for your time.


texts: Cannot set the org-agenda to start my week on monday

texts:
In org-agenda I am trying to change the start of my week to monday by adding this to my .emacs file:
(setq org-agenda-start-on-weekday 1)
Without success. The week (in the mini calendar, when I try to schedule a task) always starts with sunday).
Also M-x customize-variable [return] org-agenda-start-on-weekday and setting it to 1 didn't help.
What am I missing?


texts: Transparent title-bar not really transparent on Emacs 26.1

texts:
I'm using the emacs-mac port installed via Homebrew in macOS 10.14.4. (I installed it with the flag --with-natural-title-bar). I enabled the transparent title bar feature with

defaults write org.gnu.Emacs TransparentTitleBar DARK

as indicated here.

However, I get the expected behavior with some themes but not others. Here, for example is what things look like using doom-spacegray (from doom-themes:

And here is how things look like when I use the nord theme for Emacs:

I'm using a fairly minimal configuration. In case it matters, this is all there is to it:

;; Package system and sources.
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
                 (not (gnutls-available-p))))
    (proto (if no-ssl "http" "https")))
    ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
    (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
    ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
    (when (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))

(package-initialize)

;; We will use 'use-package' to install and configure packages.
(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)

(setq
 inhibit-startup-message t         ; Don't show the startup message...
 inhibit-startup-screen t          ; ... or screen
 cursor-in-non-selected-windows t  ; Hide the cursor in inactive windows

 echo-keystrokes 0.1               ; Show keystrokes right away, don't show the message in the scratch buffer
 initial-scratch-message nil       ; Empty scratch buffer
 initial-major-mode 'org-mode      ; Org mode by default
 sentence-end-double-space nil     ; Sentences should end in one space, come on!
 confirm-kill-emacs 'y-or-n-p      ; y and n instead of yes and no when quitting
 help-window-select t              ; Select help window so it's easy to quit it with 'q'
)

(fset 'yes-or-no-p 'y-or-n-p)      ; y and n instead of yes and no everywhere else
(delete-selection-mode 1)          ; Delete selected text when typing
(global-unset-key (kbd "s-p"))     ; Don't print

;; Enable transparent title bar on macOS
;;(when (memq window-system '(mac ns))
;;  (add-to-list 'default-frame-alist '(ns-appearance . dark)) ;; {light, dark}
;;  (add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)))

;; Hide toolbar and scroll bar
(tool-bar-mode -1)
(scroll-bar-mode -1)

;; Always wrap lines
(global-visual-line-mode 1)

;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
; (package-initialize)

; (require 'package)
; (add-to-list 'package-archives
;              '("melpa-stable" . "https://stable.melpa.org/packages/"))
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(inhibit-startup-screen t)
 '(initial-scratch-message nil)
 '(package-selected-packages (quote (nord-theme doom-themes))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

I'm hoping someone might know where the source of the problem could be. Is there something about nord-theme that is overriding the transparent title bar option in emacs-mac? Is it possible to theme the title-bar in GUI Emacs? If so, what are the relevant variables?


texts: Printing tibbles in iESS with many columns extremely slow

texts:
When I print large tibbles from R it takes a very long time and the iESS buffer runs extremely slowly thereafter (huge lag moving the cursor throughout the buffer or typing).  The code below takes 5 minutes to finish printing whereas in Rstudio it takes a second.  I'm using ess-17.11 and the latest tidyverse installed using devtools: devtools::install_github("hadley/tidyverse")

library(tidyverse)
library(gapminder)

start_time <- Sys.time()

tst_tibble <- gapminder %>%
  # change the year filter to add or subtract columns
  # from the final tibble
  filter(year < 1975) %>%
  unite(loc_yr, continent, country, year) %>%
  select(loc_yr, lifeExp) %>%
  spread(loc_yr, lifeExp)

print(tst_tibble)
print(Sys.time() - start_time)

Any help?


texts: install dependencies for emacs package in a CI environment

texts:
I am testing an Emacs package on Travis CI with ert. A PR now requires the s package. This is how I currently make sure it's available in the test environment:

script:
  - $EMACS --version
  - $EMACS --batch --eval "(progn (package-initialize) (add-to-list 'package-archives (cons \"melpa\" \"https://melpa.org/packages/\") t) (package-refresh-contents) (package-install 's))"
  - $EMACS --batch -L . --eval "(progn (package-initialize) (setq byte-compile-error-on-warn t))" -f batch-byte-compile julia-repl.el
  - $EMACS --batch -L . -l ert --eval "(package-initialize)" -l julia-repl-tests.el -f ert-run-tests-batch-and-exit;

which is rather inelegant: I have to eval (package-initialize) every time, and manually install s. I have the

;; Package-Requires: ((emacs "25")(s "1.12"))

in the package header, is it possible to somehow grab and install all dependencies?


texts: Package `exec-path-from-shell` isn't setting PATH variables from `.zshenv` on MacOS

texts:
I'm running a GUI Emacs compiled from the master git branch on MacOS El Capitan. I'm using the package exec-path-from-shell to set several environment variables I have configured in my ~/.zshenv file. However, none of them inherited in Emacs. GOPATH and SHELL are not set and PATH is not the PATH I have configured in my `~/.zshenv Currently I have the package configured with

(use-package exec-path-from-shell
  :ensure t
  :defer f
  :config
  (exec-path-from-shell-copy-env "GOPATH")
  (exec-path-from-shell-copy-env "SHELL")
  (exec-path-from-shell-copy-env "PATH")
  (when (memq window-system '(mac ns x))
    (exec-path-from-shell-initialize)))

After launching Emacs, M-x getenv for PATH returns /usr/bin:/usr/sbin/:/bin/:/sbin

However, executing shell-command via M-! with zsh -l -i -c 'echo $PATHreturns the PATH as I have set it in my ~/.zshenv file.

The ~/.zshenv looks like

export PATH="/Users/idclark/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/Applications/Postgres.app/Contents/Versions/9.4/bin:/Users/idclark/Library/Android/sdk/tools:/Users/idclark/Library/Android/sdk/platform-tools"
export JAVA_HOME="$(/usr/libexec/java_home)"
export MANPATH="/usr/local/man:$MANPATH"
export NVM_DIR="~/.nvm"
export GOPATH="/Users/idclark/go/bin"

Is this a problem with my zsh config or how how I'm initializing the exec-path-from-shell package?


texts: How can I pass the NO-LINE-BREAK argument to base64-encode-region in M-x?

texts:
I'm editing YAML files where I have to frequently encode and decode base64 values in a buffer. base64-encode-region and base64-decode-region are perfect for this, but very long strings get encoded as multiline base64, breaking the YAML syntax.

According to the description of the command, one can somehow disable this behaviour:

base64-encode-region is an interactive built-in function in ‘C source
code’.

(base64-encode-region BEG END &optional NO-LINE-BREAK)

Base64-encode the region between BEG and END.
Return the length of the encoded text.
Optional third argument NO-LINE-BREAK means do not break long lines
into shorter lines.

How can I pass this argument when calling the function with (helm-)M-x?


texts: Eshell command in another window keeping focus in the working one

texts:
Ho can I run an eshell command in another window keeping focus in the working one?

Let's say I'm scanning a buffer searching for a regexp (to be precise an URL)  and every time I find it I want to run a command and see the output in another buffer but keeping the focus on the working one.

I'm working on this piece of code:

(while (search-forward-regexp "\\\\\\(?:href\\|url\\){\\([^}]+\\)}" nil t)
  (save-excursion
    (let ((URL (match-string 1))
      (kill-buffer-query-functions nil))

      (eshell-command
       (concat
    "lynx -cookies=1 -accept_all_cookies=1 -cookie_file=cookie.file "
    URL))
      ;; I need to kill the buffer opened by the previous command
      (kill-buffer "*lynx*")
      )))


texts: searching filtering comprehension in package table in Packages Menu

texts:
How can one search a specific name or a pattern for the name of a specific package on the package menu returned from M-x list-packages?

In documentation it says type f. but in my case it yields an empty table list of packages.

Same question generally for filtering this table based on package name, keywords, version(equality,  and optional inequality expressions) , status, archive, namely the column names.


texts:
How can I add tmsu tags as a source for helm-mini?

Edit

There doesn't seem to be such a source, so I am trying to define it by myself consider something like this:

(helm :sources (helm-build-async-source "test2"
                 :candidates-process
                 (lambda ()
                   (start-process "tmsu" nil "tmsu" "files" "tag1 tag2")))
      :buffer "*helm async source*")

However this doesn't work, since now it is hard coded to call tmsu for the tags tag1 and tag2. Instead helm should update the candidate list dynamically if I change the tmsu query.


texts: Whitespace-mode tab mark disturb my indentation

texts:
I encounter this issue when i set whitespace-style to (face tabs trailing tab-mark) and turn on whitespace-mode.
When whitespace-mode is turned off, everything looks well:

When whitespace-mode is turned on, it seems as if a tab mark » are actually inserted before tab char and the indentation looks strange:

Is this a bug of whitespace-mode? How can i solve it?


texts: How to set gud gdb -i=mi not to replace current buffer?

texts:
When using gdb -i=mi to debug a program, I typically split the window into two buffers vertically. But every time my program prints something gud automatically replaces my source code buffer with I/O buffer and pops up a new "frame" that contains my source code, and what's worse is that it creates a "dedicated window" that I can't switch back to source code. This behavior is obviously very very annoying, it should for example, open a new frame for the I/O buffer instead. How can I achieve that or just simply turn off auto replacing buffer for gud?
(gud-gdb doesn't seem to have such behaviors but it doesn't show where breakpoints are)


texts: Constructing a nested tree from an org heading hierarchy

texts:
I have a custom tangling function traverses an org file.

It matches the nearest heading or block.

If it matches a heading it collects a list that looks like (level header tags). If it matches a source block it records (switches body).

For example if this was the data...

* lion
** zebra :hi:
*** horse
#+begin_src elisp
(+ 1 1)
#+end_src
** cheetah
* dog

This would be what my matches would look like.

(1 "lion" "")
(2 "zebra" ":hi:")
(3 "horse" "")
("" "(+ 1 1)\n")
(2 "cheetah" "")
(1 "dog" "")

As I'm looping and collecting these matches. I'd like to build a representation of my org file as a nested list.

'((heading 1 "lion" ""
   (heading 2 "zebra" ":hi:"
    (heading 3 "horse" ""
     (block "" "(+ 1 1)\n")))
   (heading 2 "cheetah" ""))
  (heading 1 "dog" ""))

This is what the building of the result would look like at each iteration:

;; First iteration.
'((heading 1 "lion" ""))

;; Second iteration.
'((heading 1 "lion" ""
   (heading 2 "zebra" "hi")))

;; Third iteration
'((heading 1 "lion" ""
   (heading 2 "zebra" "hi"
    (heading 3 "horse" ""))))

;; and so on...

How could I achieve something like this?


texts: Adding diary entries in chronological order rather than appending to the file

texts:
I am using the diary both to save my calendar appointments and to write notes. Consequently I always read and write my diary file (on the same window, which means I open the real diary file), and I appreciate to have the entries chronologically ordered when I am about to write something.

I use the function that allows to write diary entries from Calendar (e.g. with i d) because it avoids mistakes when typing the date. But adding diary entries this way only appends the entry at the end of the diary file, and I would like them to be automatically put at the right chronological place in this file.

I did not find any solution in the manual. Is there a way to do this ?


texts: Change behaviour of "comment-region" in org-mode tangled source blocks?

texts:
I am experimenting with using org-mode for some of my startup config, and adding (org-babel-load-file (concat user-emacs-directory "config.org")) to my .emacs.

Then I use a structure like the following to embed elisp:

** Disable window clutter
#+begin_src emacs-lisp
(setq initial-scratch-message nil)
(setq inhibit-splash-screen t)

(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
#+end_src

Inside the source block, M-x comment-region uses a '#' as the comment character.  What is the best/easiest way to make comment-region adjust to the block it is in?


texts: Exporting the results of code evaluation in org-babel by default

texts:
I have these settings for evaluating emacs lisp code in babel:

ELISP> org-babel-default-header-args:emacs-lisp
((:eval . "never-export")
 (:exports . "both")
 (:hlines . "yes")
 (:colnames . "no"))

Here is an example document.

#+TITLE: Title

Here is some advanced math.

#+BEGIN_SRC elisp
 (+ 1 1)
#+END_SRC

#+RESULTS:
: 2

And here is some more.

#+BEGIN_SRC elisp
 (+ 2 2)
#+END_SRC

When I export this document to pdf, the results are not exported. Why not? org-version holds 8.2.10.


texts:
I have emacs 25.2.2 and installed through M-x list-packages AUCTeX 12.1.1.

Opening any LaTeX file gives the native latex mode, so it seems through C-h m:

LaTeX/P mode defined in ‘tex-mode.el’:
:override advice: ‘TeX-latex-mode’

Based on that, and the following, I would the say the activation did not go well:

  You can detect the successful activation of AUCTeX and preview-latex in the menus after loading a LaTeX file like 'preview/circ.tex':
  AUCTeX then gives you a 'Command' menu, and preview-latex gives you a
  'Preview' menu.

What should I do?


texts:
I have

(global-set-key (kbd "<C-x-right>") 'other-window)

in my .emacs file.

When I use this keymap, I am able to switch the window one time. When I hit the right arrow key again nothing happens.

How do I have to denote the keymap to that I can use it like this:

C-x *pressed and held*
*press right* to change window
*press right again* change window
*press right again* change window and so on


texts: Best ways of generating UML from within Emacs

texts:
There are a bunch of integration options between Emacs and UML tools, like org-mode's plantuml embedding, a plantuml major mode etc.  Of course I can try them out but I'm wondering what other people use for a UML workflow?

Embedding inside another document like org-mode does is a nice idea, or outputting the generated uml in another buffer live-updated would be nice too.  I'm sure people out there have some super-cute elisp functions to automate this kind of thing!


texts: helm-git-grep and helm-swoop at the same time

texts:
I heavily rely on helm-git-grep to find stuff.
When there are just too many results though, I'd like to narrow the results down with file name. (possibly with helm-swoop)

Here's what I do for the above situation.

I run helm-git-grep then,
save it to wgrep buffer using helm-get-grep-run-save-buffer,
isearch or helm-swoop on this buffer to narrow down.
helm-git-grep and find too many results.
quit helm-git-grep and run helm-browse-project to filter on files first,
then run helm-ls-git-run-grep on filtered files to narrow down.

I feel these two options are subpar and wonder if there's a better way.

If I do helm-git-grep then try to run helm-swoop I get helm: Error: Trying to run helm within a running helm session error.


texts: Indirect buffer in image mode (main buffer in text)?

texts:
Can I edit an svg file in a text mode (say, nxml-mode) while seeing live updates to the image in another window?

I can see SVG as images, or as text by using image-toggle-display, but it always toggles both buffers, even if I do clone-indirect-buffer.

I'm using a strange build of emacs for Windows... I've lost track of where I even got it:

GNU Emacs 24.4.1 (x86_64-w64-mingw32) of 2014-10-20 on KAEL


texts:
Is anyone successfully running a windowed emacs, (not terminal emacs), on one of the new Mac M1s?
Does this port work?  https://emacsformacosx.com
Is there another?


texts: How do you break a running program under gud?

texts:
In the vanilla gdb interface, I can hit C-c to break the running program, insert breakpoints, etc., and then run continue to resume execution of the program being debugged.  Is this possible with gud?  C-c C-c in gud actually sends SIGKILL to the program, rather than breaking in gdb...

More info and repro

I'm actually trying to debug emacs (from a separate emacs+gud instance, of course) to try to get to the bottom of this guy.  Here's what I'm doing:

$ cd path/to/emacs-24.5 # where I've built emacs with debugging symbols, etc
$ ./src/emacs -Q
M-x gdb
Run gdb (like this): gdb -i=mi ./src/emacs
run

At this point I'd like to break the execution of the new emacs process so that I can poke around, set breakpoints, etc.  My end game is to wait for the new emacs process to get into the bad state described in my bug report (sometimes takes days).  That's when I really want to break execution of emacs and set the breakpoints.


texts: Do not expand a given abbrev when followed by ":"

texts:
Let's say I use abbrev to expand eq into equation.

Now I want eq to always expand, except when followed by a colon (:).

The logic is that in LaTeX I do not want equation identifiers (e.g., eq:xyz) to be expanded.

Any ideas about how to selectively disable abbrev expansion?


texts: emacsclient opens a file and does eval simultaneously

texts:
I know that emacs can open a file while evaluating an expression:

emacs file --eval "(toggle-frame-maximized)"

However I failed to replicate this with emacsclient:

1.emacsclient can open a file:

emacsclient file

2.And it can also evaluate an expression:

emacsclient --eval "(toggle-frame-maximized)"

3.But a problem happens when the two are put together:

emacsclient file --eval "(toggle-frame-maximized)"

It starts to report error and does not open the file.
So is it possible to use emacsclient to open a file while still do eval?


texts: Export results of codeblock, then later export the source block (e.g. as for a code-listing in a document appendix)

texts:
I have a document in which I have named R source code blocks. These blocks are set to export the results only in the text narrative. However, I would like to include the code for these blocks in an appendix. Is there a way of subsequently re-using that code block, but with an alternate :exports flag that includes just source code?

For example, my source block might look like:

#+NAME: src:tablemaker
#+BEGIN_SRC R :exports results :colnames yes
   # Do some stuff that barfs up a dataframe / table
   ...
#+END_SRC

My results block then looks like:

#+NAME: tab:mytable
#+CAPTION: A pretty cool table
#+RESULTS[9d127a66c2787f0520a8c5140b24328357ee2ff8]: src:tablemaker

...org-table representation of my table

Then, way down in my document, I'd like to include the source of my code block, but not the results. Thank you, org-mode Jedi!


texts: How to do case sensitive searches using evil's evil-search?

texts:
Unlike isearch, evil-search mode ignores case-fold-search option.

Using evil-search like this for eg:

(setq-default evil-search-module 'evil-search)

Is it possible to make evil-search case sensitive?


texts: Sending email with attachment and using 'recipient-filename'

texts:
I am using message-send-and-exit (with mu4e) to send an email with an attachment. I would like to rename the file so that in the email it appears with a different name than my local file.
According to the docs, I should be able to do that with recipient-filename. I also tried setting name.

<#part type="application/pdf" filename="old-name.pdf" recipient-filename="new-name.pdf" name="new-name.pdf" disposition=attachment>
<#/part>

However, upon testing, this doesn't seem to work. When I receive the email I get in the header

Content-Type: application/pdf; name="old-name.pdf"
Content-Description: old-name.pdf
Content-Disposition: attachment; filename="old-name.pdf"

What is the way to achieve this?


texts: Automatically turn on hl-line-mode inside org-mode tables

texts:
Based on this answer my question is whether there is a (simple) way to automatically turn on hl-line-mode whenever the cursor is within an org-mode table in an org-mode file.

I tried to find a hook for entering or leaving an org-mode table but I was not successful.


texts: Restore welcome screen buffer when closed

texts: How do I open startup/splash/welcome screen/message buffer (*GNU Emacs*) when it's not listed in list-buffers ?


texts: How to find information about a function?

texts: To be able to learn about functions on my own I would like to know where I can find information about them (within emacs or otherwise).


texts: What is the name of the package for quickly switching between windows by using some key and then a, b, c or d?

texts: I remember using a package to quickly switch between windows, it was a key like C-something and then on each window a letter appeared for example if you have 4 windows then you have a, b, c and d. Depending on the letter you pressed you moved to its corresponding window. I don't remember the name of the package, I think I've installed it together with some starter kit but don't remember which. Now I use C-x o or S-arrows but I don't like it.


texts:
I want to add a Tramp method for opening files from Docker containers. Here's what I've got so far (but it doesn't work):
(add-to-list 'tramp-methods
             '("docker"
               (tramp-login-program "docker")
               (tramp-login-args
                (("run" "-ti" "%h" "bash")))))
(setq tramp-debug-buffer t)
(setq tramp-verbose 10)

The output this produces:
Tramp: Opening connection for test-newapi using docker...failed
Tramp: Opening connection for test-newapi using docker...failed
Tramp: Opening connection for test-newapi using docker...failed
Tramp: Opening connection for test-newapi using docker...failed
Tramp: Opening connection for test-newapi using docker...failed
byte-code: Host `test' looks like a remote host, `docker' can only use the local host

When trying to open /docker:test:/.
Question
How can I see what exactly Tramp was doing (what command did it feed to Docker?)
PS
I found this, but it gives the same result.
PPS
Nevermind, it had to be (tramp-login-args (("run" "-ti") ("%h") ("bash"))). But I'd still want to know how to debug a problem like this.


texts: org-roam and persp-mode.el: persp-def-auto-persp has nil (buffer-file-name)

texts:
I would like all org-roam buffers to automatically go into a persp-mode.el perspective.
org-roam-mode is a global minor mode, so I can't use that as a way to detect whether a new buffer is for org-roam.
I tried this:
(defun my/roam-buffer (_buffer state)
  (let ((name (buffer-file-name)))
    (when (and name (s-contains-p "/org-roam/" name))
      (if (null state)
          't
        state))))

(with-eval-after-load 'org-roam
  (setq org-roam-db-location (expand-file-name "~/.org-roam.sqlite"))
  (persp-def-auto-persp "org-roam"
                        :parameters '((dont-save-to-file . t))
                        :predicate 'my/roam-buffer
                        :dyn-env '(after-switch-to-buffer-functions ;; prevent recursion
                                    (persp-add-buffer-on-find-file nil)
                                    persp-add-buffer-on-after-change-major-mode)
                        :hooks '(after-switch-to-buffer-functions)
                        :switch 'frame))

However, (buffer-file-name) in my/roam-buffer is nil.  I'm guessing that's because initially when the buffer is created (again I'm guessing persp is hooking into that), it's not linked to a file yet?
How can I achieve what I want?


texts: org-babel-tangle-file multiple files into a single output

texts: Is there a way to tangle an org file with #+INCLUDE: statements? Or other ways to tangle multiple org files into a single output?


texts: Smartparens and web-mode conflict to add extra angular bracket

texts:
I am fairly new to customizing my emacs, so please be gentle.  I did try to find a solution for this, but all I found was a page on git where someone asked a similar question but (as far as I can tell) never received an answer.

I have both smartparens and web-mode installed and am trying to work in .html.erb files.

The issue I am having is that whenever I type <%space I end up with <%  %>> (notice the extra angular bracket).

Does anyone have any suggestions for how to deal with this, and how I would go about it?  I don't really want to disable either of the packages.


texts: How do I filter for IPython prompt characters on Mac OS?

texts:
I've debugged to this point:

OS X El Capitan (10.11.5)
Emacs 24.5.1 with Cocoa (installed from homebrew)
python.el 0.24.5
Python 3.5.1
IPython 5.0.0

I've configured IPython to use NoColor mode in the default config file.  I start Emacs with this command:

open -a /Applications/Emacs.app --args -Q

Change the initial buffer to python-mode and say run-python.  After some boilerplate I get to the prompt I expect:

>>>

From here I launch IPython with

>>> import IPython
>>> IPython.terminal.ipapp.launch_new_instance()

after some more boilerplate I get to this prompt:

^[[?12l^[[?25h

I do have ansi-color-for-comint-mode set to t.

I don't get this prompt when I launch IPython from Terminal.app, so I'm thinking it's an issue with comint processing some IPython-specific control codes.  But I'm not sure how to dig into that.  Any advice?


texts: Constructing an advice around org-html--wrap-image

texts:
This is a follow-up question from a previous thread

The function org-html--wrap-image adds a
 tag around its contents, as you can see here:

ELISP> (org-html--wrap-image "bla" t)
"\n
\n
bla
\n
"

I want to remove those
 tags around "bla". My current workaround consists of redefining the function org-html--wrap-image completely, removing the tags, but this seems to be a bit of an overkill.

I acknowledge that if I wrap the function with a call to replace-regexp-in-string, I can achieve the same effect.

ELISP> (replace-regexp-in-string
        (rx (or "
" "
"))
        ""
        (org-html--wrap-image "bla" t))

"\n
\nbla\n
"

How can I write an "advice" to do that? I've never written one before, and the documentation for "advices" is kind of harsh on Elisp beginners.

For completeness, here's the function code:

(defun org-html--wrap-image (contents info &optional caption label)
  "Wrap CONTENTS string within an appropriate environment for images.
INFO is a plist used as a communication channel.  When optional
arguments CAPTION and LABEL are given, use them for caption and
\"id\" attribute."
  (let ((html5-fancy (org-html--html5-fancy-p info)))
    (format (if html5-fancy "\n
%s%s\n
"
          "\n
%s%s\n
")
        ;; ID.
        (if (org-string-nw-p label) (format " id=\"%s\"" label) "")
        ;; Contents.
        (format "\n
%s
" contents)
        ;; Caption.
        (if (not (org-string-nw-p caption)) ""
          (format (if html5-fancy "\n
%s
"
            "\n
%s
")
              caption)))))


texts: How to properly generate a concat'd function name with defmacro?

texts:
I have a macro like this:
(defmacro my-fun-generator (x)
  `(defun ,(intern (concat "fun-" x)) ()
     ,(concat "Print " x)
     (interactive)
     (print ,x)))

This works (found an example online):
(dolist (str '("foo" "bar" "baz"))
  (eval `(my-fun-generator ,str)))

But this errors with (wrong-type-argument sequencep str) on the first concat:
(dolist (str '("foo" "bar" "baz"))
  (my-fun-generator str))

Is it saying the str is not of type sequence? Wouldn't str be of type string? Is a string a sequence? Just, why doesn't the second version work?


texts: How to interactivelly pass a `listp arg` to `yank`

texts:
Is it possible to interactively pass an argument that matches listp to the function yank so that current-kill receives an argument of 0?  If so, how please can that be achieved?

Background:

I am using multiple-cursors ( https://github.com/magnars/multiple-cursors.el ) and frequently find the need to block and copy information from another Emacs buffer while multiple-cursors remains active.  Then, I switch back to the buffer where multiple-cursors is active, and I try to paste the same information to every cursor.  Unless current-kill (within the yank function) receives an argument of 0, the first cursor receives the paste and then an error message is generated by current-kill -- i.e., The kill-ring is empty.  The error message is caused due to the failure of passing a listp arg to yank when interactively using same -- i.e., from a kebboard shortcut.  The default argument within yank (when no argument is given) is (1- arg) -- and that is what causes the error message.  If yank had been called with a listp arg, then current-kill would have received a 0 and everything would have worked as expected.

I do not understand when the default of (1- arg) would be helpful, but changing that to 0 (i.e., hacking yank) avoids the error message and achieves the desired effect.  If possible, I would prefer to avoid hacking yank.

Although not essential to this question, it sure would be nice to know an example where (1- arg) could be useful.

P.S.

The issue is now resolved, but I wanted to add the explanation of (1- arg) within the function yank.  (1- arg) is the nth entry in the kill-ring, which can be accessed when the arg is not a list or -.  There is an apparent bug in the yank function in the October 1, 2014 build of Emacs Trunk (which may be present in other versions) -- i.e., at the outset of yank, there should be (unless arg (setq arg 1)) [which is missing].  I'll make a note on my todo-list to check a current version of Emacs Trunk and then file a bug-report if it is missing in the latest build also.

With respect to copying and pasting the same entry at multiple active cursors, additional code is needed when copying from within Emacs versus copying from an external program.  The author of multiple-cursors has already included a revision of current-kill through an advice for the external kill-ring -- similar code is needed for copying from within Emacs -- however, that is beyond the scope of this particular question.


texts:
On windows 7 version of spacemacs, with git layer, magit fails when trying to add a remote repository. After I enter the remote name, I get the following error:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("\\([^:/]+\\)/[^/]+\\(\\.git\\)?\\'" nil)
  byte-code("\300\301!\302\303!\211\304\305\306\307\006\006\"\205\031\0\310\004\311\211\006\010\312%\"\313\314!E\207" [magit-get "remote.origin.url" magit-read-string-ns "Remote name" magit-read-url "Remote url" string-match "\\([^:/]+\\)/[^/]+\\(\\.git\\)?\\'" replace-match t 1 transient-args magit-remote] 11)
  call-interactively(magit-remote-add nil nil)
  command-execute(magit-remote-add)

git 2.9.3.windows.1, Emacs 26.3, dev branch of Spacemacs 0.300.0


texts: Does grepping via helm support searching for multiple words in any order like other helm completions?

texts:
When searching multiple terms with Helm separated with spaces then Helm returns the results which mach the terms in any order. This is good.

Sometimes I try grep via helm. E.g. I use helm-recentf to select some files and run grep  on them. If I use a single term then it works fine. But if type two terms separated with space then I get no results.

My question is: does grep invoked via Helm support helm style out of order matching?

I'd like to determine if this feature is not supported or there is some problem with my config.


texts:
For a number of reasons (one of them my lameness) I get extremely confused when it comes to whitespace and newlines in regexps.

Say for example that I want to search for an equal sign (=) followed by any number of whitespace and newline characters.

At certain points in time I have done the following in the belief that these regexps are equivalent:

"=[\s\n]*"
"=[\s-\n]*"
"=[\s]*"
"=[\s-]*"
"=\s*"
"=\s-*"

They are not.

The Emacs regexp docs just manage to confuse me on this one. :-(


texts: Variable-pitch font has stopped rendering correctly

texts:
For some reason, variable-pitch fonts have stopped rendering correctly.  They previously worked fine, but something seems to have changed (though nothing in my .emacs has changed).

I am using OS X 10.10.3 and Emacs installed thru homebrew.  From the startup screen:

  This is GNU Emacs 24.5.1 (x86_64-apple-darwin14.3.0, NS apple-appkit-1347.57).

Question: how do I fix this to make variable-pitch work again?

Here are a couple pictures to explain:

The Emacs startup screen uses both fixed-width and variable-width fonts, and the ones that inherit from variable-pitch are rendered incorrectly.

I found a script on EmacsWiki to test several fonts at once.  Again, fixed-width fonts render correctly, but variable-width fonts do not.


texts: Recover/undo discarded changes in git/magit on unstaged files

texts: I accidentally pressed "k" (a magit command) and discarded some unstaged changes.  Is there a way to undo this?  Or did I discover one of the few ways to actually lose work while using git?


texts: How can I use an interactive function in a script?

texts:
I'm using virtualenvwrapper.el to load Python virtualenvs during emacs sessions. I would like emacs to start with a default one, so I don't have to load it manually every time.

To load it manually, I use

  M-x venv-workon RET

  Virtualenv to swich to: myvirtualenv RET

How can I do this through init.el?


texts: in term-mode, how do I run regular emacs commands?

texts:
Upon starting term-mode, Emacs delegates all keypresses to the terminal you're running.

That's great for compatibility purposes, but leaves Emacs functionality behind. How do I get back to Emacs features (for example, to switch a buffer).


texts:
In OSX' iTerm, you can instantly show/hide the window by the (default) alt-space keys.

How can I configure emacs to have similar functionality? I want to run GUI emacs, and be able to show/hide it on whim.


texts: How to change email address in org-mode publish postamble?

texts:
When I publish a project, the sitemap postamble looks like this. How can I change this email address?

                Email: douhua@joseichous-MacBook-Pro.local


texts: Functions print outputs twice the expected output

texts:
Running a function, for example:

(print '"Hello World")

"Hello World"
"Hello World"

... outputs twice the expected result.

I suppose one is the real printing, and the second is the value returned. However, I still want an alternative to this.

What is the equivalent of the Python python -c "print 'Hello World'"


texts:
I used to launch yasnippet just with c-mode with a hook in my .emacs but after adding some code to use CEDET and ECB yasnippet doesn't run automatically. I guess some modes may have been overwritten by CEDET, so how do I launch yasnippet mode automatically on c-mode now ?

(yas-reload-all)
(add-hook 'c-mode-hook (lambda ()
                     (#'yas-minor-mode)))
(global-ede-mode 1)  ; Enable the Project   management system
(semantic-mode 1)
(require 'semantic/bovine/gcc)
(require 'semantic/sb)

I haven't understood the full CEDET configuration process so I may have done something wrong.

Thank you


texts: How do I replace a block of text with another block of text in elisp?

texts:
I'm working with an org-mode file that might contain headlines and text, like

* Headline 1
  :PROPERTIES:
  :ID: h1
  :END:
  This is some text.
** Subheading A
   :PROPERTIES:
   :ID: s1
   :END:
   The subheading can also have text.

Suppose I have a string bound to the symbol mytext that looks like

:PROPERTIES:
:ID: h1
:END:
This is some UPDATED text.

As you can see, it can
be multlined.

I want to replace h1's "body" text with the stuff in mytext (including the Properties drawer and all), but leave any subtrees alone. So the end result should look like

* Headline 1
  :PROPERTIES:
  :ID: h1
  :END:
  This is some UPDATED text.

  As you can see, it can
  be multlined.
** Subheading A
   :PROPERTIES:
   :ID: s1
   :END:
   The subheading can also have text.

What's the fastest / easiest way to do this with elisp?


texts: How can I disable a specific lint error for Emacs Lisp using Flycheck?

texts:
In Python with flake8 we can do that with #noqa in the end of line. How the same can be done with Emacs Lisp?

My ambition is to disable a particular lint error by just make a annotation with a comment like is provided in the above picture. This is possible in Emacs Lisp or there is a better way for it?


texts: How to increase the size of the mode-line

texts: I was watching this video on someone's emacs configuration, and I noticed that his mode line seemed a lot better to look at than mine, but he didn't explain it in the video.  Is there a way to replicate the mode line in the video, or to remove the parentheses around the mode and increase the size of the status line?  Or is it some plugin.  Ive already tried all the themes in the powerline and smart mode line plugins, and I can't seem to find a way to replicate it.  Any help is appreciated, thanks.


texts: How to find a file recursively on Microsoft Windows with findutils (gnu find) installed?

texts:
I'm trying to find file recursively from default-directory with helm-find (C-x c /). It works out of box in linux.
I tried setting find-program like (I have git bash installed)
(setq find-program "c:/Program\ Files/Git/usr/bin/find.exe")

It didn't work.
Then I tried installing findutils (gnu find) from chocolatey and then tried.
(setq find-program "C:/ProgramData/chocolatey/bin/find.exe")

This did not work either. What am I doing wrong?


texts: How to call xref-find-definitions without being prompted?

texts:
Is it possible to call xref-find-definitions to find the definition at  the current point without being prompted to select the default?

I'd like to bind this to a key, so it immediately jumps to a definition. Currently it's prompting to select the default.

This command is prompting me for input every time:

(call-interactively 'xref-find-definitions)


texts: Can I have a different dictionary for flyspell in different headings?

texts:
I have an org-mode file where I use different languages. I was hoping to be able to have flyspell checking them. Something like:

* Title 1
:PROPERTIES:
:Language: Italian
:END:
This is italian text spell checked.

* Title 2
:PROPERTIES:
:Language: American
:END:
This is english text spell checked.


texts: How can I drag-and-drop an `org-mode` header onto the Mac desktop?

texts:
John Kitchin has a terrific video on modifying the default drag-n-drop behavior, going from the Mac Finder onto an Emacs buffer.

I would like to implement the opposite behavior: dragging an org-mode header onto another mac app (specifically the Apple Calendar).

Specifically, I want to use the mouse to drag an org-mode headline onto the calendar so that, and in doing so, create a calendar event that looks something like:

[ ] item to do

which includes a link back to the task in org-mode in the calendar event’s note field.

How can I do that?


texts: Emacs org export shell script from txt file

texts:
I have a .txt file which is an org file but not with the .org file extension.
I want to export the file to html on the command line, but it does not work if the file extension is .txt, only if the file extension is .org.
$ emacs alspac_data_guide.txt --batch -f org-html-export-to-html --kill

Symbol’s function definition is void: org-html-export-to-html

I think this might be because it is not loading in org-mode? How do I modify the shell command to work correctly?


texts:
how can I change the cursor color depending on insert or overwrite mode?

I looked at this page

https://www.emacswiki.org/emacs/ChangingCursorDynamically

and put as recommended 3 lines in the Emacs init file at the end of the custom-set-variables block as well at the end of the custom-set-faces block. In both cases the color of the cursor was black both in insert and overwrite mode.

This is my Emacs init file

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(blink-cursor-mode nil) ; Cursor nicht blinken lassen
 '(inhibit-startup-screen t) ; Keinen startup screen für Emacs anzeigen
 '(x-stretch-cursor t) ; Cursor bei Tabulatoren breit machen
 '(show-trailing-whitespace t) ; Leerzeichen am Zeilenende anzeigen
 '(sentence-end-double-space nil) ; Keine zwei Leerzeichen nach einem Punkt
 '(require-final-newline (quote ask)) ; Zeilenende an letzter Zeile erzwingen
 '(column-number-mode t) ; Zeilennummer und Spalte in Statuszeile anzeigen
 '(show-paren-mode t) ; show matching parantheses
 '(transient-mark-mode t) ; show marked region (fails; work around see below)
 '(require 'cursor-chg)  ; Load the library
 '(toggle-cursor-type-when-idle 1) ; Turn on cursor change when Emacs is idle
 '(change-cursor-mode 1)) ; Turn on change for overwrite, read-only, and input mode
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(region ((t (:background "light gray" :distant-foreground"gtk_selection_fg_color")))))


texts: How can I ask for a web server to serve their "mobile friendly" version of their web pages with eww?

texts: I'm using eww lately for browsing the web looking for documentation and things like that. I dislike that eww receives the same web page as it were Firefox or Google Chrome, it cannot render web pages as those web browsers do. Then, what I want to achieve is to make eww tell the web sites that it visits that send the mobile friendly version of their web pages, thus, I would have a simpler layout rendered by eww (or at least that's my assumption).


texts:
I set part settings of my EMACS with cusomize, and part with manually editing .emacs-file in my home directory. Not all settings from my .emacs applyed at EMACS startup.

For example, not working web-beautify before save, not enable js2-highlight-unused-variables on js2-mode and more. But if I select these lines and call command eval-region, she begin works!

Also someone settings from .emacs works on startup.

What I do wrong?

EMACS version: 24.5.1, builded from source

EMACS repos: ELPA, GNU, ORG

OS version: Ubuntu 14.04 x64

Link to my .emacs: http://pastebin.com/NJup9cDP


texts: When using recentf with tramp, recentf would clean up its file list including all remote files, which takes a lot of time when the Internet is bad. How can I ask recentf to not cleanup remote files, without disabling recent file list auto cleanup for local files?


texts:
I've just installed Emacs 26.2 on a Windows 7 machine.  This is a clean install, with no previous version of Emacs installed.  Editing an Org file, I want to insert a new TODO item using "M-S-return".  Typing that key sequence results in an error "ESC <return> is undefined."

Since I'm not running in a terminal, the issue doesn't seem to be the terminal eating my keys, as discussed here.  Also, C-h l (view-lossage) results in the following:

 F [org-self-insert-command]
 o [org-self-insert-command]
 o [org-self-insert-command]
 <escape> <S-return> [nil]
 C-h l [view-lossage]

So it appears that the "Shift-return" is making it to emacs.

C-h m lists <M-S-return> as bound to org-insert-todo-heading, as expected.  C-h k says ESC <S-return> (translated from <escape> <S-return>) is undefined.

What am I doing wrong here?


texts:
Is it possible to display a text file in two or more columns without changing the text file itself?

I sometimes deal with a text file that contains a long list each of whose items are short. By default, if I had a list like below:

* a
* b
* c
* d

and if I have vertically extremely limited space on the screen, it'll be displayed like this:

* a
* b

I'd like to make it displayed like this:

window1 window2
* a     * c
* b     * d

And if I inserted a new org heading at the end of my list, it should be like this:

window1 window2
* b     * d
* c     * _

(_ is the point)

And the whole text file should be like this:

* a
* b
* c
* d
*

Is this possible?


texts: How to add a CREATED field to any TODO/task?

texts:
Is there a way to have any TODO (whether entered by org-capture or manually) to get a CREATED timestamp added like SCHEDULED and DEADLINE ?

i.e. today I have entries like:

* TODO call mom
  SCHEDULED: <2017-09-26 Tue>
* TODO walk the dog
* TODO buy milk

and over time the list grows and I often find myself wanting to clear out old entries or review if still relevant - but without any info on when entries was added that is hard. I would love if I could tell org-mode to add CREATED:  so the above would be:

* TODO call mom
  SCHEDULED: <2017-09-26 Tue> CREATED: [2015-09-26]
* TODO walk the dog
  CREATED: [2017-09-21]
* TODO buy milk
  CREATED: [2017-01-26]

Any ideas/suggestions?

I'm thinking an on-save action or similar would be best but not sure how to about it.


texts: In Magit, what is the difference between a 'stash' and a 'snapshot'?

texts:
The Magit user manual includes two sets of "stashing" commands: lower-case commands save a stash, and upper-case commands save a snapshot.  After consulting Google and Stack Overflow and the git-stash(1) man page, I still don't know what the difference is.

What's the difference?


texts: How to disable org-mode 9.4.4 from indenting

texts:
After upgrading to org-mode 9.4.4 when I create a simple org file with a list (though it could be a heading) like below:
- test

And hit return, then it automatically indents. This doesn't make any sense because there is no hierarchy. How can I disable this?