Can't paste from files with .arc extension
  Home FAQ Contact Sign in
gnu.emacs.help only
 
Advanced search
POPULAR GROUPS

more...

gnu.emacs.help Profile…
 Up
Can't paste from files with .arc extension         


Author: Brian Adkins
Date: Mar 7, 2008 06:00

This seems like a strange problem to me. For some reason, I can't
select portions of a file with the mouse and paste it in another
window, if the file in question has a .arc extension.

I've been experimenting with Paul Graham's Arc language which as .arc
extensions. I originally thought it might have something to do with
the arc-mode.el major mode file I've been using for Arc code, but I've
turned that off, so the files are loaded in Fundamental mode.

I also thought it could be a file encoding issue, but if I copy the
file to a file with a different extension (.scm for example), I can
open the file and copy/paste with the mouse just fine. If I then copy
the file to a different file with a .arc extension, copy/paste is
broken again.

I can copy/paste within emacs fine, I just can't paste into another
application.

Can anyone think of why emacs might disable pasting to another window
for files with .arc extensions?
25 Comments
Re: Can't paste from files with .arc extension         


Author: Brian Adkins
Date: Mar 7, 2008 06:07

On Mar 7, 9:00 am, Brian Adkins gmail.com> wrote:
> This seems like a strange problem to me. For some reason, I can't
> select portions of a file with the mouse and paste it in another
> window, if the file in question has a .arc extension.
>
> I've been experimenting with Paul Graham's Arc language which as .arc
> extensions. I originally thought it might have something to do with
> the arc-mode.el major mode file I've been using for Arc code, but I've
> turned that off, so the files are loaded in Fundamental mode.
>
> I also thought it could be a file encoding issue, but if I copy the
> file to a file with a different extension (.scm for example), I can
> open the file and copy/paste with the mouse just fine. If I then copy
> the file to a different file with a .arc extension, copy/paste is
> broken again.
>
> I can copy/paste within emacs fine, I just can't paste into another
> application.
>
> Can anyone think of why emacs might disable pasting to another window ...
Show full article (1.09Kb)
no comments
Re: Can't paste from files with .arc extension         


Author: Brian Adkins
Date: Mar 7, 2008 06:26

On Mar 7, 9:07 am, Brian Adkins gmail.com> wrote:
> On Mar 7, 9:00 am, Brian Adkins gmail.com> wrote:
>
>
>
>> This seems like a strange problem to me. For some reason, I can't
>> select portions of a file with the mouse and paste it in another
>> window, if the file in question has a .arc extension.
>
>> I've been experimenting with Paul Graham's Arc language which as .arc
>> extensions. I originally thought it might have something to do with
>> the arc-mode.el major mode file I've been using for Arc code, but I've
>> turned that off, so the files are loaded in Fundamental mode.
>
>> I also thought it could be a file encoding issue, but if I copy the
>> file to a file with a different extension (.scm for example), I can
>> open the file and copy/paste with the mouse just fine. If I then copy
>> the file to a different file with a .arc extension, copy/paste is
>> broken again.
> ...
Show full article (1.47Kb)
no comments
Re: Can't paste from files with .arc extension         


Author: Peter Dyballa
Date: Mar 7, 2008 07:10

Am 07.03.2008 um 15:26 schrieb Brian Adkins:
> "File mode specification error: (error "Autoloading failed to define
> function archive-mode")

You'll need to adjust auto-mode-alist.

--
Greetings

Pete

November, n.:
The eleventh twelfth of a weariness.
– Ambrose Bierce, "The Devil's Dictionary"
no comments
Re: Can't paste from files with .arc extension         


Author: Brian Adkins
Date: Mar 7, 2008 07:32

On Mar 7, 10:10 am, Peter Dyballa wrote:
> Am 07.03.2008 um 15:26 schrieb Brian Adkins:
>
>> "File mode specification error: (error "Autoloading failed to define
>> function archive-mode")
>
> You'll need to adjust auto-mode-alist.

Thanks, but I think the error message is a red herring as far as the
copy/paste problem is concerned. I had turned off the Arc code major
mode to eliminate it as a factor. I just did the following to
eliminate the above error:

(add-to-list 'auto-mode-alist '("\\.arc$" . ruby-mode))

The file loads fine w/o errors now, but I still can't paste into a non-
emacs window. I don't fully understand the X windows copy/paste
mechanism, but I think the source app is involved when pasting into a
destination app, so apparently emacs is doing something different when
the file has a .arc extension regardless of the major mode in effect.
no comments
Re: Can't paste from files with .arc extension         


Author: Peter Dyballa
Date: Mar 7, 2008 08:05

Am 07.03.2008 um 16:32 schrieb Brian Adkins:
> I think the source app is involved when pasting

M-x describe-mode RET RET could reveal something. Also C-u C-x = on
characters.

--
Greetings

Pete

A morning without coffee is like something without something else.
no comments
Re: Can't paste from files with .arc extension         


Author: Brian Adkins
Date: Mar 7, 2008 08:18

On Mar 7, 11:05 am, Peter Dyballa wrote:
> Am 07.03.2008 um 16:32 schrieb Brian Adkins:
>
>> I think the source app is involved when pasting
>
> M-x describe-mode RET RET could reveal something. Also C-u C-x = on
> characters.

I've blown away my .emacs file temporarily for a clean test, and I get
identical results. I'm running "GNU Emacs 23.0.60.2".

The major mode is Fundamental and the results of describe-mode are:

"Enabled minor modes: Auto-Compression Blink-Cursor File-Name-Shadow
Font-Lock Global-Auto-Composition Global-Font-Lock Line-Number
Menu-Bar Mouse-Wheel Tool-Bar Tooltip Transient-Mark"

If I rename the file from temp.arc to temp.txt, the major mode is Text
and the describe-mode command shows:

"Enabled minor modes: Auto-Composition Auto-Compression Blink-Cursor
File-Name-Shadow Font-Lock Global-Auto-Composition Global-Font-Lock
Line-Number Menu-Bar Mouse-Wheel Tool-Bar Tooltip Transient-Mark"
Show full article (1.19Kb)
no comments
Re: Can't paste from files with .arc extension         


Author: Brian Adkins
Date: Mar 7, 2008 08:22

On Mar 7, 11:18 am, Brian Adkins gmail.com> wrote:
> On Mar 7, 11:05 am, Peter Dyballa wrote:
>
>> Am 07.03.2008 um 16:32 schrieb Brian Adkins:
>
>>> I think the source app is involved when pasting
>
>> M-x describe-mode RET RET could reveal something. Also C-u C-x = on
>> characters.

Oh, I also tried C-u C-x = and the results are identical, except
temp.txt shows "There are text properties here:
auto-composed t"

and temp.arc doesn't have that. I don't think the content matters,
because if I simply rename a .arc file to .txt or some other
extension, it works fine. The problem only occurs when the file ends
in .arc
no comments
Re: Can't paste from files with .arc extension         


Author: Peter Dyballa
Date: Mar 7, 2008 09:02

Am 07.03.2008 um 17:18 schrieb Brian Adkins:
> Given that I'm running without a .emacs file, I would think this would
> be easy to duplicate. Just load a text file with a .arc extension and
> try and select test in emacs and middle-button paste in a non-emacs
> window. When I do that, I get nothing.

In that case you might run into an error: auto-mode-alist will have

("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|ARC\\|
ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\)\\'" . archive-mode)

Copying a text file to name.arc and opening it in 'emacs -Q' gives me
a Fundamental View and no problems with copy and paste. Problems
start when the "ARC" file contains control characters or characters
that cannot be displayed in the buffer's encoding and therefore are
printed as \.

Having set LC_CTYPE to _.UTF-8 I don't get
autocomposed characters ...

--
Greetings
Show full article (1.08Kb)
no comments
Re: Can't paste from files with .arc extension         


Author: Brian Adkins
Date: Mar 7, 2008 09:27

On Mar 7, 12:02 pm, Peter Dyballa wrote:
> Am 07.03.2008 um 17:18 schrieb Brian Adkins:
>
>> Given that I'm running without a .emacs file, I would think this would
>> be easy to duplicate. Just load a text file with a .arc extension and
>> try and select test in emacs and middle-button paste in a non-emacs
>> window. When I do that, I get nothing.
>
> In that case you might run into an error: auto-mode-alist will have
>
> ("\\.\\(arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|ARC\\|
> ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\)\\'" . archive-mode)

I can set the file to whatever mode I want after loading and it
exhibits the same "can't paste to non-emacs window" problem.
Show full article (2.48Kb)
no comments
1 2 3