Arc Forumnew | comments | leaders | submitlogin
1 point by nex3 6103 days ago | link | parent

I'm on Emacs 23.0.60.2, and I haven't seen anything like this. Could you be a little more specific, so I can run tests? Are you saying that you have text in a .arc buffer, you kill it, and you can't yank it into other buffers?


1 point by lojic 6103 days ago | link

No, I'm simply selecting text with the mouse in an Arc buffer and trying to paste with the middle-button in a non-emacs window such as this text area.

I've narrowed the problem down to the filename extension. Here's the test:

  brian@airstream:~/temp$ cat > temp.arc
  hello, world
  <ctrl>-d
  emacs temp.arc
Then select some text with the mouse and try and paste in a non-emacs window using the middle button. I can do this with everything but files ending in .arc !

  brian@airstream:~/temp$ emacs --version
  GNU Emacs 23.0.60.2
I just killed my .emacs file as a test and I get the same results, so you should be able to duplicate that if you're on Linux.

With no .emacs file, I see the following message when loading temp.arc:

File mode specification error: (error "Buffer format not recognized")

I expect that's related. Maybe we can get pg to use another extension like .arclisp :)

-----

2 points by nex3 6103 days ago | link

Okay, now I'm seeing the problem. I'll poke around with it.

Edit:

Looks like you're right: .arc is recognized as an archive-mode file. This snippet should fix it:

  (let* ((mode (rassoc 'archive-mode auto-mode-alist))
         (str (car mode)))
    (string-match "[Aa][Rr][Cc]\\\\|" str)
    (setcar mode (replace-match "" nil nil str)))
I've added this to arc.el.

-----

1 point by lojic 6103 days ago | link

So it's not sufficient to add the new arc.el, you have to remove the existing association also? I would think that once a match is found in the auto-mode-alist, it wouldn't consider the other entries.

BTW I started a thread on gnu.emacs.help, but if the above fixes it, it's moot.

http://groups.google.com/group/gnu.emacs.help/browse_frm/thr...

-----

1 point by nex3 6103 days ago | link

Well, I added the above code to arc.el, so it should automatically disassociate *.arc with archive-mode.

-----

1 point by nex3 6103 days ago | link

Okay, this didn't actually solve it. This should, though: http://arclanguage.org/item?id=4548.

-----

1 point by lojic 6103 days ago | link

Yay, I'm not crazy! :)

-----