Re: control character file names

2008-12-15 Thread Noah



Sorry for being to briefly.

1.

The Midnight Commander is a curses based file manager that might
be a workaround for the problem you can't solve using Emacs at
the moment. It can be installed via ports or (more simple) from
packages using "pkg_add -r mc". The command to run it is "mc".



2.

PF6 (or F6) refers to the programmable function key number 6
which has the function to move or rename files (in the Midnight
Commander).

By the way, for deleting a directory, PF8 (or F8) - Delete - can
be useful. I'm not sure if the MC can be troubled by control
characters in filenames, but up to this point, I found nothing
the MC couldn't delete anyway. :-)



I hope I didn't explain too stupidly, I don't want to sound
impolite. Of course I cannot assume anyone to know what a
Midnight Commander is or what PF keys (IBM and robotron
terminology) are...






cool - that worked.  thanks for the verbosity :)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: control character file names

2008-12-15 Thread Polytropon
On Mon, 15 Dec 2008 06:14:32 -0800, Noah  wrote:
> Polytropon wrote:
> > On Mon, 15 Dec 2008 05:59:02 -0800, Noah  wrote:
> >> I am 
> >> unable to rename a directory that has nine '?'.
> > 
> > Maybe Midnight Commander - PF6: Rename - will do the job?
> > (Workaround)
> > 
> > 
> 
> okay I dont quite understand.  what is midnight commander - PF6: Rename?

Sorry for being to briefly.

1.

The Midnight Commander is a curses based file manager that might
be a workaround for the problem you can't solve using Emacs at
the moment. It can be installed via ports or (more simple) from
packages using "pkg_add -r mc". The command to run it is "mc".



2.

PF6 (or F6) refers to the programmable function key number 6
which has the function to move or rename files (in the Midnight
Commander).

By the way, for deleting a directory, PF8 (or F8) - Delete - can
be useful. I'm not sure if the MC can be troubled by control
characters in filenames, but up to this point, I found nothing
the MC couldn't delete anyway. :-)



I hope I didn't explain too stupidly, I don't want to sound
impolite. Of course I cannot assume anyone to know what a
Midnight Commander is or what PF keys (IBM and robotron
terminology) are...




-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Renaming files with strange characters in dired-mode [was: Re: control character file names]

2008-12-15 Thread Noah

Giorgos Keramidas wrote:

On Mon, 15 Dec 2008 05:59:02 -0800, Noah  wrote:

If you have customized `dired-listing-switches' try reverting it to a
simpler set of options, like:

(setq-default dired-listing-switches "-lFa")

The -b and -B options tend to confuse dired about what the *real*
filename is, and may trigger this sort of error.

thanks I placed that setq option in my .emacs and that works for
renaming files and directories containing control character.  I am
unable to rename a directory that has nine '?'.

What setq modification will allow emacs to change those type filenames?


This seems like a dired problem.  Are the characters _really_ the
question mark character, or are they merely characters that are
un-displayable in the current coding system?

What do you see when you move the point on that filename and then type
`C-u C-x ='?  If the characters are really the question mark, then the
informational buffer that pops up should include something like this:


n...@tsunami:/mnt/mybook-music$ ls -lB | less
total 1778688
drwxr-xr-x   3 noah noah 0 2005-01-09 15:26 ?
-rwx--   1 noah noah   1841776 2007-12-13 19:57 
00_arditi-standards_of_triumph-2006-cd-amrc.jpg
-rwx--   1 noah noah   3223290 2007-12-13 20:02 
00_arditi-standards_of_triumph-2006-front-amrc.jpg
-rwx--   1 noah noah   2989502 2007-12-13 20:07 
00_arditi-standards_of_triumph-2006-inlay1-amrc.jpg



Here is what is shown in emacs:

 character: ? (63, #o77, #x3f, U+003F)
charset: ascii (ASCII (ISO646 IRV))
 code point: #x3F
 syntax: .  which means: punctuation
   category: a:ASCII graphic characters 32-126 (ISO646 IRV:1983[4/0]) 
l:Latin

buffer code: #x3F
  file code: #x3F (encoded by coding system mule-utf-8)
display: by this font (glyph code)
 -Adobe-Courier-Medium-R-Normal--12-120-75-75-M-70-ISO8859-1 (#x3F)

There are text properties here:
  dired-filename   t
  face dired-directory
  fontifiedt
  help-echo"mouse-2: visit this file in other window"
  mouse-face   highlight





,---
| character: ? (63, #o77, #x3f)
| preferred charset: ascii (ASCII (ISO646 IRV))
|code point: 0x3F
|syntax: .  which means: punctuation
|  category: a:ASCII
| ASCII graphic characters 32-126 (ISO646 IRV:1983[4/0]) l:Latin r:Roman
| Japanese roman
|   buffer code: #x3F
| file code: #x3F (encoded by coding system utf-8-emacs-unix)
|   display: terminal code #x3F
|
| Character code properties: customize what to show
|   name: QUESTION MARK
|   general-category: Po (Punctuation, Other)
|
| There are text properties here:
|   fontifiedt
|
`---

ASCII code 63 (octal #o77, hex #x3f) in this case is the question-mark
character.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: control character file names

2008-12-15 Thread Noah

Polytropon wrote:

On Mon, 15 Dec 2008 05:59:02 -0800, Noah  wrote:
I am 
unable to rename a directory that has nine '?'.


Maybe Midnight Commander - PF6: Rename - will do the job?
(Workaround)




okay I dont quite understand.  what is midnight commander - PF6: Rename?


Cheers,

Noah
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: control character file names

2008-12-15 Thread Polytropon
On Mon, 15 Dec 2008 05:59:02 -0800, Noah  wrote:
> I am 
> unable to rename a directory that has nine '?'.

Maybe Midnight Commander - PF6: Rename - will do the job?
(Workaround)


-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Renaming files with strange characters in dired-mode [was: Re: control character file names]

2008-12-15 Thread Giorgos Keramidas
On Mon, 15 Dec 2008 05:59:02 -0800, Noah  wrote:
>> If you have customized `dired-listing-switches' try reverting it to a
>> simpler set of options, like:
>>
>> (setq-default dired-listing-switches "-lFa")
>>
>> The -b and -B options tend to confuse dired about what the *real*
>> filename is, and may trigger this sort of error.
>
> thanks I placed that setq option in my .emacs and that works for
> renaming files and directories containing control character.  I am
> unable to rename a directory that has nine '?'.
>
> What setq modification will allow emacs to change those type filenames?

This seems like a dired problem.  Are the characters _really_ the
question mark character, or are they merely characters that are
un-displayable in the current coding system?

What do you see when you move the point on that filename and then type
`C-u C-x ='?  If the characters are really the question mark, then the
informational buffer that pops up should include something like this:

,---
| character: ? (63, #o77, #x3f)
| preferred charset: ascii (ASCII (ISO646 IRV))
|code point: 0x3F
|syntax: .  which means: punctuation
|  category: a:ASCII
| ASCII graphic characters 32-126 (ISO646 IRV:1983[4/0]) l:Latin r:Roman
| Japanese roman
|   buffer code: #x3F
| file code: #x3F (encoded by coding system utf-8-emacs-unix)
|   display: terminal code #x3F
|
| Character code properties: customize what to show
|   name: QUESTION MARK
|   general-category: Po (Punctuation, Other)
|
| There are text properties here:
|   fontifiedt
|
`---

ASCII code 63 (octal #o77, hex #x3f) in this case is the question-mark
character.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: control character file names

2008-12-15 Thread Noah

Hi there,

Giorgos Keramidas wrote:

On Sun, 14 Dec 2008 19:52:01 -0800, Noah  wrote:

  *   Use a file manager.

  I often use `dired-mode' inside an Emacs session to move around,
  copy, re-organize, rename or delete files.  Any file manager that
  can display several character sets at once will do fine :)

Hey there Giorgos,

I'd love to use emacs but I go into 'dired-mode' and I try to rename the
^M' directory and receive an error from emacs.  The error claims
"file-error Renaming no such file or directory /mnt/mybook-music/^M
/mnt/mybook-music/Music2

What do I do?


If you have customized `dired-listing-switches' try reverting it to a
simpler set of options, like:

(setq-default dired-listing-switches "-lFa")

The -b and -B options tend to confuse dired about what the *real*
filename is, and may trigger this sort of error.


thanks I placed that setq option in my .emacs and that works for 
renaming files and directories containing control character.  I am 
unable to rename a directory that has nine '?'.


What setq modification will allow emacs to change those type filenames?

Cheers,

Noah


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: control character file names

2008-12-15 Thread Giorgos Keramidas
On Sun, 14 Dec 2008 19:52:01 -0800, Noah  wrote:
>>
>>   *   Use a file manager.
>>
>>   I often use `dired-mode' inside an Emacs session to move around,
>>   copy, re-organize, rename or delete files.  Any file manager that
>>   can display several character sets at once will do fine :)
>
> Hey there Giorgos,
>
> I'd love to use emacs but I go into 'dired-mode' and I try to rename the
> ^M' directory and receive an error from emacs.  The error claims
> "file-error Renaming no such file or directory /mnt/mybook-music/^M
> /mnt/mybook-music/Music2
>
> What do I do?

If you have customized `dired-listing-switches' try reverting it to a
simpler set of options, like:

(setq-default dired-listing-switches "-lFa")

The -b and -B options tend to confuse dired about what the *real*
filename is, and may trigger this sort of error.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: control character file names

2008-12-14 Thread Noah




  *   Use a file manager.

  I often use `dired-mode' inside an Emacs session to move around,
  copy, re-organize, rename or delete files.  Any file manager that
  can display several character sets at once will do fine :)



Hey there Giorgos,

I'd love to use emacs but I go into 'dired-mode' and I try to rename the 
'^M' directory and receive an error from emacs.  The error claims 
"file-error Renaming no such file or directory /mnt/mybook-music/^M 
/mnt/mybook-music/Music2


What do I do?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: control character file names

2008-12-14 Thread Bill Campbell
On Sun, Dec 14, 2008, Noah wrote:
> Hi there,
>
> there is a blank directory that I cant seem to view.  I believe the  
> directory is a '^M'.  can somebody please explain how I can see  
> filenames and directories containing control characters.  Also how do I  
> rename the directory with 'mv'?

There are various ways to handle this.

# this will show the file with special characters escaped
ls | cat -v 

# this will put the output of ls into a file that can then be
# edited with vim so one could insert ``mv '' before the funny
# file name, and `` newname'' after it.
ls > tmpfile

As others have mentioned, using a graphical file manager can make
it easy as well.

Bill
-- 
INTERNET:   b...@celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:  (206) 236-1676  Mercer Island, WA 98040-0820
Fax:(206) 232-9186

The end move in politics is always to pick up a gun.  -- Buckminster Fuller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: control character file names

2008-12-14 Thread Giorgos Keramidas
On Sun, 14 Dec 2008 18:21:22 -0800, Noah  wrote:
> Hi there,
>
> there is a blank directory that I cant seem to view.  I believe the
> directory is a '^M'.  can somebody please explain how I can see
> filenames and directories containing control characters.  Also how do
> I rename the directory with 'mv'?

There are quite a couple of options:

  *   Use the -B option of the `ls' utility.

  This should print the non-printable characters using octal
  numbers, i.e.:

$ touch 'foo^Mbar'
$ /bin/ls -lB foo*
-rw-rw-r--  1 keramida  users  0 Dec 15 04:27 foo\015bar
$

  *   Use a file manager.

  I often use `dired-mode' inside an Emacs session to move around,
  copy, re-organize, rename or delete files.  Any file manager that
  can display several character sets at once will do fine :)

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


control character file names

2008-12-14 Thread Noah

Hi there,

there is a blank directory that I cant seem to view.  I believe the 
directory is a '^M'.  can somebody please explain how I can see 
filenames and directories containing control characters.  Also how do I 
rename the directory with 'mv'?


Cheers,

Noah

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"