* how to set file coding system but using per directory variables
@ 2014-03-01 12:54 Paul K
2014-03-04 6:49 ` Andreas Röhler
2014-03-04 20:21 ` Peter Dyballa
0 siblings, 2 replies; 5+ messages in thread
From: Paul K @ 2014-03-01 12:54 UTC (permalink / raw)
To: help-gnu-emacs
when I add following as first llne in a buffer it is properly interpretted
-*- coding: windows-1250-dos -*-
I don't want to add any headers to files though, so I created
.dir-locals.el file with following content:
((nil . ((buffer-file-coding-system . windows-1250-dos)
(coding-system-for-read . windows-1250-dos)
(coding-system-for-write . windows-1250-dos))))
then when I open file coding system is not automatically converted, I need
to do extra buffer reverting for declared coding system to be applied.
do You have any ideas?
best regards,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to set file coding system but using per directory variables
2014-03-01 12:54 how to set file coding system but using per directory variables Paul K
@ 2014-03-04 6:49 ` Andreas Röhler
2014-03-04 7:04 ` Andreas Röhler
2014-03-04 20:21 ` Peter Dyballa
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Röhler @ 2014-03-04 6:49 UTC (permalink / raw)
To: help-gnu-emacs
Am 01.03.2014 13:54, schrieb Paul K:
> when I add following as first llne in a buffer it is properly interpretted
>
> -*- coding: windows-1250-dos -*-
>
>
> I don't want to add any headers to files though, so I created
> .dir-locals.el file with following content:
> ((nil . ((buffer-file-coding-system . windows-1250-dos)
> (coding-system-for-read . windows-1250-dos)
> (coding-system-for-write . windows-1250-dos))))
>
>
> then when I open file coding system is not automatically converted, I need
> to do extra buffer reverting for declared coding system to be applied.
>
> do You have any ideas?
>
> best regards,
>
Maybe needs a string - "windows-1250-dos" ?
Alternatively - Would it help to define it at the end of buffer instead?
;; Local Variables:
;; coding: windows-1250-dos
;; End:
Also employing tweaked find-file command seems possible:
(defun find-file-windows-1250-dos (filename &optional wildcards)
"Edit file FILENAME using coding-system windows-1250-dos.
See find-file for documentation"
(interactive
(find-file-read-args "Find file: "
(confirm-nonexistent-file-or-buffer)))
(let ((coding-system-for-read 'windows-1250-dos)
(coding-system-for-write 'windows-1250-dos)
(value (find-file-noselect filename nil nil wildcards)))
(if (listp value)
(mapcar 'switch-to-buffer (nreverse value))
(switch-to-buffer value))))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to set file coding system but using per directory variables
2014-03-04 6:49 ` Andreas Röhler
@ 2014-03-04 7:04 ` Andreas Röhler
0 siblings, 0 replies; 5+ messages in thread
From: Andreas Röhler @ 2014-03-04 7:04 UTC (permalink / raw)
To: help-gnu-emacs
Am 04.03.2014 07:49, schrieb Andreas Röhler:
> Am 01.03.2014 13:54, schrieb Paul K:
>> when I add following as first llne in a buffer it is properly interpretted
>>
>> -*- coding: windows-1250-dos -*-
>>
>>
>> I don't want to add any headers to files though, so I created
>> .dir-locals.el file with following content:
>> ((nil . ((buffer-file-coding-system . windows-1250-dos)
>> (coding-system-for-read . windows-1250-dos)
>> (coding-system-for-write . windows-1250-dos))))
>>
>>
>> then when I open file coding system is not automatically converted, I need
>> to do extra buffer reverting for declared coding system to be applied.
>>
>> do You have any ideas?
>>
>> best regards,
>>
>
> Maybe needs a string - "windows-1250-dos" ?
>
>
or being quoted?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to set file coding system but using per directory variables
2014-03-01 12:54 how to set file coding system but using per directory variables Paul K
2014-03-04 6:49 ` Andreas Röhler
@ 2014-03-04 20:21 ` Peter Dyballa
2014-05-05 19:04 ` Paul K
1 sibling, 1 reply; 5+ messages in thread
From: Peter Dyballa @ 2014-03-04 20:21 UTC (permalink / raw)
To: Paul K; +Cc: help-gnu-emacs
Am 01.03.2014 um 13:54 schrieb Paul K:
> -*- coding: windows-1250-dos -*-
To work, I think, it needs to be:
-*- coding: windows-1250-dos; -*-
--
Greetings
Pete
Perl—the only language that looks the same before and after RSA encryption.
- Keith Bostic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: how to set file coding system but using per directory variables
2014-03-04 20:21 ` Peter Dyballa
@ 2014-05-05 19:04 ` Paul K
0 siblings, 0 replies; 5+ messages in thread
From: Paul K @ 2014-05-05 19:04 UTC (permalink / raw)
To: Peter Dyballa; +Cc: help-gnu-emacs
Peter, thank You for the help.
Regards,
On Tue, Mar 4, 2014 at 9:21 PM, Peter Dyballa <Peter_Dyballa@web.de> wrote:
>
> Am 01.03.2014 um 13:54 schrieb Paul K:
>
> > -*- coding: windows-1250-dos -*-
>
> To work, I think, it needs to be:
>
> -*- coding: windows-1250-dos; -*-
>
> --
> Greetings
>
> Pete
>
> Perl—the only language that looks the same before and after RSA encryption.
> - Keith Bostic
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-05-05 19:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-01 12:54 how to set file coding system but using per directory variables Paul K
2014-03-04 6:49 ` Andreas Röhler
2014-03-04 7:04 ` Andreas Röhler
2014-03-04 20:21 ` Peter Dyballa
2014-05-05 19:04 ` Paul K
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.