Stefan Monnier | 8 Feb 04:33
Picon

Re: Inner workings of `pcomplete'

> 1. emacs -Q
> 2. M-: (boundp 'pcomplete-stub) RET ==> nil
> 3. M-x shell
> 4. M-: (boundp 'pcomplete-stub) RET ==> t
> 5. M-: (special-variable-p 'pcomplete-stub) RET ==> nil
> 6. Open the file `pcomplete.el' (for example, by looking up the variable
> `pcomplete-stub') and M-x eval-buffer.  Now (special-variable-p
> 'pcomplete-stub) evaluates to t.

> What is going on here?

Duh!  Thanks for catching this.  Please M-x report-emacs-bug!

> prompt and M-: (pcomplete-completions)).  However, it is also passed as
> a table argument to the function `complete-with-action', whose
> documentation says that this argument should not be a function.

The docstring is wrong, as the first line of the code indicates ;-)

        Stefan

Oleksandr Manzyuk | 8 Feb 00:31
Picon
Gravatar

Inner workings of `pcomplete'

Dear all,

I'm working on a small package aiming at providing basic completion for
GHCi commands in `inferior-haskell-mode':

https://github.com/manzyuk/ghci-completion

The package uses a combination of the standard completion UI (for GHCi
commands) with `pcomplete' (for arguments to particular commands).

I've been experimenting recently with identifier completion and I've
stumbled upon the following issue.  I'm not sure whether it is a bug in
the code or in my understanding of it.  Everything below refers to the
latest Emacs 24 (24.0.93.1).

To enable `pcomplete' in `inferior-haskell-mode', I add the function
`pcomplete-completions-at-point' to `comint-dynamic-complete-functions'.
Experimenting with identifier completion, I started to receive the
errors "Wrong type argument: stringp, nil", which I traced back to the
call

(pcomplete--common-quoted-suffix pcomplete-stub buftext)

in the body of `pcomplete-completions-at-point'.  Now, `pcomplete-stub'
is bound to nil at the beginning of the function using let* and it is
expected that the function `pcomplete-completions', which is called
later, will change the value of `pcomplete-stub' by side-effects.
Apparently, this doesn't happen and `pcomplete--common-quoted-suffix'
receives nil as its first argument, which triggers the error.

(Continue reading)

Alex Sparrow | 6 Feb 15:33
Picon
Picon
Gravatar

display-buffer-reuse-frames in a tiling WM

Hi all,

I have a question about the behaviour of display-buffer-reuse-frames
when using a tiling window manager (Xmonad in my case). The
documentation says:

"In addition, if the value of display-buffer-reuse-frames is non-nil, and
the buffer you want to switch to is already displayed in some frame,
Emacs will just raise that frame."

As I understand it, this just calls XRaiseWindow on the frame in
question. On XMonad (and presumably other tiling WMs) this has no
apparent effect when the frame is on a different workspace. This throws
me into confusion for a few seconds wondering why the buffer hasn't
opened. Is there any way to improve this behaviour? Even being able to
optionally set an URGENT hint on the window would be very useful I
think.

Thanks
Alex

jpkotta | 6 Feb 17:20
Picon
Gravatar

Re: multiple async-shell-command?

I use openwith (http://www.emacswiki.org/emacs/OpenWith), which works with dired.  Maybe it's not
quite what you're looking for, but it can certainly open more than one file with an external application. 
The version in the wiki causes the external programs to close when Emacs closes, because they're
subprocesses of Emacs.  I've modified it to disown the processes so they stay up even after Emacs closes.  I
just submitted a patch; you can get my version here: http://pastebin.com/F5kxd6sm.

jpkotta | 6 Feb 17:44
Picon
Gravatar

Re: Remote editing using emacsclient.

I wanted to do this as well, and I could never get it working.  As far as I could tell, it connected to the
emacsserver without issue, but then wanted to create the emacsclient on the server machine.  IIRC, if I
played with the DISPLAY variable, it would create an emacsclient window on the server machine, which
seemed profoundly useless.  So the best thing is probably to run emacsclient through ssh -- that's what I do
anyway.  There was a discussion on reddit.com/r/emacs about this several months ago, but I can't find it.

Dmitriy Igrishin | 6 Feb 14:18
Picon

Remote editing using emacsclient.

Hey all,

I have a problem with remote editing via emacsclient.
The Emacs 23.3.1 runs in server mode on the remote machine
(Debian) and the emacsclient is also runs on Debian and
on Mac OS X.

Trying:
$ emacsclient -nw -f ./server my_file
emacsclient: connected to remote socket at 192.168.0.50
*ERROR*: Could not open file: /dev/pts/0

The same problem when trying to run emacsclient on Mac.

Is it possible to make it works?

--
// Dmitriy.


Subhasis Ray | 6 Feb 07:53
Picon
Gravatar

Strange error messages in Chinese

Hello,
  I am using Emacs 23.1.1 (x86_64-pc-linux-gnu, GTK+ Version 2.20.1) of 2011-03-04 on allspice, modified by Debian. I have auto-save desktop and save-place enabled and  once in a while I get a strange error message apparently in Chinese  (google translate autodetects it as such):

save-place-to-alist: Wrong type argument: listp, 㬻㬠⴪ⴠ捯摩湧㨠畴昭㠠⴪ⴊਨ⠢⽤慴愯獵扨愯捯牴楣慬⽰礯捵獴潭⹩湩∠⸠㌸㤩
∯摡瑡⽳畢桡⽣潲瑩捡氯摡瑡癩稯慮慬祺敲⹰礢‮‱〳㜱⤠⠢⽤慴愯獵扨愯捯牴楣慬⽎佔䕓∠⸠ㄳ㈹㜱⤠⠢⽤慴愯獵扨愯捯牴楣慬⽤慴慶楺⽮楴業敟晩汴敲彴敳琮灹∠⸠ㄸ㘵⤠⠢⽤慴愯獵扨愯捯牴楣慬⽤慴慶楺⽤慴慴慢汥⹰礢‮′〷ㄩ
∯摡瑡⽳畢桡⽣潲瑩捡氯摡瑡癩稯獣物灴⹰礢‮‱㜰㠩
∯摡瑡⽳畢桡⽣潲瑩捡氯摡瑡癩稯瑲扟捯牲敬慴攮灹∠⸠㘸㠵⤠⠢⽤慴愯獵扨愯捯牴楣慬⽤慴慶楺⼲〱ㄲ〱ㄷ弱ㄴ㠰㕟㘳〲⹰礢‮″㈵⤠⠢⽨潭支獵扨愯⹥汩獰⽣畳瑯洭㈳⹥氢‮‷㘹⤠⠢⽨潭支獵扨愯⹥汩獰⽩湩琭㈳⹥氢‮‱㔵㌱⤠⠢⽨潭支獵扨愯晲慮捥彦汩杨瑟潰瑩潮献瑸琢‮‷㠳⤠⠢⽨潭支獵扨愯扩港捯浰楬敮捯灹⹳栢‮‵㈱⤠⠢⽨潭支獵扨愯牰浢畩汤⽮潨異⹯畴∠⸠㈸㔱㠳⤠⠢⽨潭支獵扨愯牰浢畩汤⽓偅䍓⽭潯獥ⵢ整愭ㄮ㌮〮獰散∠⸠㐷㠷⤠⠢⽨潭支獵扨愯⹣畳瑯洭㈱⸴⹥氢‮‶㔴⤠⠢⽨潭支獵扨愯⹥汩獰⽩湩琭㈱⸴⹥氢‮‱㈸㠳⤠⠢⽨潭支獵扨愯⹥浡捳∠⸠㐱⤠⠢⽨潭支獵扨愯条敬⽦楬敳⽴敳瑓楧乥畲卩浰汥䍡ㄮ灹∠⸠㠵㤴⤠⠢⽨潭支獵扨愯条敬⽦楬敳⽥硰琮朢‮‹㤹㐩
∯桯浥⽳畢桡⽧慥氯晩汥猯浯摥氮灹∠⸠㈲㜶⤠⠢⽨潭支獵扨愯捯牴楣慬⽰礯捯湦楧⹰礢‮′㘲㤩
∯桯浥⽳畢桡⽧慥氯晩汥猯摥湤彶㈷⹧∠⸠ㄶㄳ⤠⠢⽨潭支獵扨愯条敬⽦楬敳⽳灩湥彶㘰⹧∠⸠ㄴ㈲㔩
∯桯浥⽳畢桡⽧慥氯晩汥猯獵扨愮潵琢‮‹㤵〩
∯桯浥⽳畢桡⽧慥氯晩汥猯来湥獩猯灲潴漱㘮朢‮′㌷㠵⤠⠢⽨潭支獵扨愯灩湮楟浯潳支灹浯潳攮灹∠⸠㌸㈳⤠⠢⽨潭支獵扨愯捯牴楣慬⽰礯灹浯潳攮灹∠⸠㄰〶⤠⠢⽨潭支獵扨愯条敬⽦楬敳⽧敮敳楳⽳業灬散愱⹰∠⸠㈲〳⤠⠢⽨潭支獵扨愯条敬⽦楬敳⽲畮䝥湥獩獐牯瑯ㄶ⹧∠⸠㔳⤠⠢⽨潭支獵扨愯条敬⽦楬敳⽳扭氯灳搱㈮硭氢‮‱ㄸ⤠⠢⽨潭支獵扨愯条敬⽦楬敳⽳扭氯歩湡獥彬潯瀮硭氢‮‹㠱㘩
∯桯浥⽳畢桡⼮獵扶敲獩潮⽳敲癥牳∠⸠㌰㠹⤠⠢⽨潭支獵扨愯⹥汩獰⽧潯杬攭挭獴祬攮敬∠⸠㈵㤩
∯桯浥⽳畢桡⼮敬楳瀯摶振汩獰⽤癣⵵湩晩敤⹥氢‮‹㘹㔩
∯桯浥⽳畢桡⼮敬楳瀯摶振睷眯楮摥砮桴浬∠⸠ㄷㄳ⤠⠢⽨潭支獵扨愯⹢慺慡爯楧湯牥∠⸠㄰ㄩ
∯桯浥⽳畢桡⼮敬楳瀯摶振摯捳⽂䥎䑉乇匢‮‱㔱⤠⠢⽨潭支獵扨愯⹥汩獰⽤癣⽉乓呁䱌∠⸠ㄴ㘸⤠⠢⽨潭支獵扨愯灡摲慩术牡湤潭獰楫支䵯潳敄敭漮朢‮‱㐴㠩⤊

The translation in google does not make much sense beyond first few sentences. Any idea if some of the emacs goodies are loaded with malicious code? Any help to get rid of this thing will be much appreciated.

rays

Aaron Meurer | 5 Feb 00:00
Picon
Gravatar

Make find file case insensitive

Is there a way to make tab completion in find file (C-x C-f) case
insensitive?  I'm on Mac OS X with hsf+, so the filesystem is case
insensitive.  I didn't find any options in M-x customize for this.

Aaron Meurer

Jules Colding | 3 Feb 22:49
Picon
Gravatar

How do I make emacs indent treat #ifdef and #endif as if they were { and }?

Hi,

I've tried to figure out how to make emacs indent #ifdef blocks just like it would curly brace blocks. With a
twist though… I'd prefer if I could convince emacs to indent include statement half the amount of
whitespace that normal code would be indented. 

My preference is to indent code with 8 spaces (or one tab of that size) and then use 4 spaces for include
statements. Within code my preference would be if "#ifdef" was treated exactly as a "{" and "#endif" like a
"}", indentation wise.

Like this:

#include <ifaddrs.h>
#ifdef __linux__
    #include <sys/socket.h>
#endif

int 
func(void)
{
        int foo = 0;

        #ifdef DO_STUFF
                foo = do_stuff();
        #endif

        return foo;
}

instead of the current affair:

#include <ifaddrs.h>
#ifdef __linux__
#include <sys/socket.h>
#endif

int 
func(void)
{
        int foo = 0;

#ifdef DO_STUFF
        foo = do_stuff();
#endif

        return foo;
}

Messing around with the indentation functions in emacs seems like a black art. Likely because I don't do
lisp well... 

Would anyone have code that solves this or pointers to something that is close to what I want?

Thanks a lot,
  jules

Tom Roche | 3 Feb 18:12
Picon
Favicon

multiple async-shell-command?


I'm running

me <at> it:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	LinuxMint
Description:	Linux Mint Debian Edition
Release:	1
Codename:	debian
me <at> it:~$ uname -a
Linux it 3.0.0-1-amd64 #1 SMP Sun Jul 24 02:24:44 UTC 2011 x86_64 GNU/Linux
me <at> it:~$ emacs-snapshot --version
GNU Emacs 24.0.92.1

I was just dired-ing a folder of PDFs, where I did

> & evince

to display one. I then tried to display another in the same way, but got

> A command is running. Kill it? (yes or no)

How can I run multiple simultaneous async-shell-command?
Or is there another/better way to do what I want?

TIA, Tom Roche <Tom_Roche <at> pobox.com>

Picon

Border around selected window

Hello.

Is it possible to have a border around the selected window?

Is it possible to have a single border around the selected
window, its header-line and its mode-line?

If so, how to enable them?

Romildo


Gmane