adding a hook to minibuffer-setup-hook breaks key-bindings - emacs

i have a few keys that i prefer to force-bind to keys i'm familiar with, and so i have used this SO Solution .
but i have found recently that it breaks for me.
the circumstances: it works fine when running 24.2.1 in window mode as build 2012-08-27 on bob.parkland.org (i.e. the pre-build emacs-for-mac solution found at http://emacsformacosx.com/).
but then it will not work when run in terminal on lion, which is 22.1.1 (mac-apple-darwin) of 2012-01-12 on b1006.apple.com .
if i comment out the call to add the hook, it works fine.

the problem is partly that i byte-compiled the code found at the other link above into a separate loadable .elc file … and did so with the newer version of emacs.
when i go back to the 22.1.1 version of emacs and byte-compile it with that version, it works in both versions of emacs without problems.

Related

Emacs OSX 10.13 configuration issue

Recently I pass to Emacs org because is really convenient to me to write note there.
So I installed all packages I needed (principally ORG and EVIL) but I didn't understand how to setup everything.
I installed emacs from brew without using cask, I linked it, and I'm sure that I'm using the version that I installed (26.1).
So in my ~/ folder I have a .emacs file in which I set up evil mode, and I have a /.emacs.d/ in which I have a lot of file. The problem is: whatever I wrote in a ~/.emacs.d/init.el seems doesn't effect emacs.
So I said "whatever, I'm going on github and I installed some complete configurations and then I customized them myself". I tried to install these two configurations.
https://github.com/hrs/dotfiles
https://github.com/larstvei/dot-emacs?files=1
But for some reason, after doing exactly what they say on README.org
nothing happens.
In particular the second link, after install and open emacs said I need to have ~/.cask/.cask.el but I don't have it.
Advice?

Projectile Using Out of date version of svn

I'm using the projectile library. When I invoke projectile-find-file I get the following error:
[svn: E155021: This client is too old to work with the working copy at foo/bar` (format 31). You need to get a newer Subversion client. For more details, see http://subversion.apache.org/faq.html#working-copy-format-change
From the command line, everything is fine (I'm using version 1.8.13).
Is there anyway that emacs can be using an out of date version? Or even how do I find out what version it is using/how it is invoking svn?
Projectile uses whatever svn binary it finds in your path. Try running which svn from Emacs (e.g. via shell-command / M-!) and from your terminal and comparing the paths you get. A difference will indicate that Emacs and your terminal are using different path variables.
Since you are on OSX, and since your terminal uses the expected svn, something like exec-path-from-shell might be helpful:
Ever find that a command works in your shell, but not in Emacs?
This happens a lot on OS X, where an Emacs instance started from the GUI inherits a default set of environment variables.
This library works solves this problem by copying important environment variables from the user's shell: it works by asking your shell to print out the variables of interest, then copying them into the Emacs environment.
exec-path-from-shell is available on MELPA.

org mode refile error

Since some time (but I didn't change anything in .emacs), I have some errors with emacs's behaviour :
Remember mode will not kill the temporary buffer on "Ctl-C Ctl-C"
Orgmode will not refile any entry
Both operations complain with error "Not bookmark format"
I restored an old .emacs to make sure that I didn't mess it up but the error persists.
Where can I investigate to find out the problem ?
I have Emacs 24.2.1 since end of august.
The built in orgmode version is 7.8.11 (I see 7.9.2 is out ...)
It's always best to start debugging problems such as this by seeing if the problem still happens when you ignore your init file altogether - try starting emacs with --no-init-file and seeing if you still get the problem. If you don't then it's clearly something in your init file.
You can also get odd behaviour if you've got a local install of Org-mode in addition to the one bundled with Emacs itself - eg if you pull in a newer one through ELPA. If you have a local install through ELPA then you can try uninstalling the Org-mode package and trying again using the built-in Org-mode.
I have something similar to the following in my init file to make it switch to the ELPA-installed Org-mode to avoid such problems (this variant is untested so forgive me if it's not quite right):
(package-initialize) ; load and initialise ELPA-installed packages
(org-reload) ; restart Org-mode with the ELPA package
I filed a bug to the emacs team and they found out that the error comes from a corrupted bookmark file.
I removed my ~/.emacs.d/bookmark file (it was empty) and everything is fine now.

Using clipboard/ copy paste results in chinese looking characters (debian sid)

Using Emacs on my linux box (wheezy, awesome,gnome and kde) I run into big trouble using clipboard even from one emacs instance to another.
Everything I put into the clipboard is converted into chinese looking characters in emacs. Only solution is to copy paste into some other editor (e.g. nano, vi) save it and open it in emacs.
I use the same .emacs on my other (ubuntu) computer and on windows 7 with out any trouble. I erased all my previous encoding settings I had without any success.
http://stackoverflow.com/questions/ask
after copy paste gets
栊瑴㩰⼯瑳捡潫敶晲潬⹷潣⽭畱獥楴湯⽳獡k
I run into the same problem today, with a little different environment tho. I've been using Emacs 24.3.1 on Windows 7, then switched to the same version running under Cygwin+XWin with the same .emacs.d config. While clipboard under Windows worked fine, with the config I had under Cygwin/XWin I had the same problem as in the question.
Under terminal it worked fine, with XWin the -Q worked too, so after a little digging, it turned out to be:
;; MS Windows clipboard is UTF-16LE
(set-clipboard-coding-system 'utf-16le-dos)
I don't remember why I added this. I must have copied it from some Emacs Wiki in early days. When I googled it now, it seems like a popular setting in people configs. It turns out, under Windows I don't need this line for clipboard to work properly with Emacs (quick check with some polish diacritical characters), and under Cygwin/XWin it finally started to work.
(sorry, I haven't the reputation to comment, so I leave a clarification request here)
Are you using emacs in a terminal ? if so, which one (konsole, lxterm, xterm...) ?
Are you cut'n'pasting with mouse (middle click) or keyboard ?
Have you any clipboard manager running (eg glipper) ?
Do you get the same behavior if you start without an init file (~/.emacs), that is, using emacs -Q?
If you can come up with a reproducible recipe starting from emacs -Q then, unless you get some solution proposed here, consider filing an Emacs bug report: M-x report-emacs-bug.

gud-gdb emacs 24 not working

I'm having difficulties with gdb under emacs 24.
I compiled my c code with the -g switch, and the symbol table loads in gdb.
The problem I'm having is that no source code is shown when I load my application, no breakpoints are visible. I guess there appears to be no connection between the source code buffer and gdb buffer.
I have used gdb under emacs before (emacs 22, and 23) and it worked well and now it doesn't.
I also tried it under emacs -q so no plugins are loaded in case my .emacs was at fault, no joy.
Just to recap (so I don't get "compile with -g" answers):
I compiled with -g I loaded emacs with no plugins
I used annotate=3with gud-gdb
I even tried gdb-mi (doesn't work at all, didn't pursue
this road any further)
Gdb ain't working with source code showing (with breakpoints).
What can I do to fix it, or at least how can I find out what's wrong?
M-x gud-gdb is not for use with annotate=3 but with --fullname (aka --annotate=1, IIRC).
Try M-x gdb with -i=mi instead of --annotate=3.
Then it worked for me, but it's damn slow in my case :/
When did you build Emacs 24? There's been a lot of churn in the gdb/gud area from emacs-devel. If you repro problems in the latest (i.e. today's) build, report bugs ASAP. The pretest is coming to an end very soon.