Arc Forumnew | comments | leaders | submitlogin
1 point by lojic 5864 days ago | link | parent

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 5864 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 5864 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 5864 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 5864 days ago | link

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

-----

1 point by lojic 5864 days ago | link

Yay, I'm not crazy! :)

-----