[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62808] dir_encoding: clarify docs about delet
From: |
Colin Macdonald |
Subject: |
[Octave-bug-tracker] [bug #62808] dir_encoding: clarify docs about deleting and global encoding |
Date: |
Sun, 24 Jul 2022 19:31:01 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62808>
Summary: dir_encoding: clarify docs about deleting and global
encoding
Project: GNU Octave
Submitter: cbm
Submitted: Sun 24 Jul 2022 11:31:00 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Documentation
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 24 Jul 2022 11:31:00 PM UTC By: Colin Macdonald <cbm>
"help dir_encoding":
> The NEW_ENCODING input must be a valid encoding identifier or
> "delete". In the latter case, any per-directory encoding is
> removed and the (globally set) m-file encoding will be used for the
> given DIR.
1. perhaps this should reference how to query that default globally set
encoding. Is that "@pref{__mfile_encoding__}"? Am I right there is not yet a
no public way to query this? (Well, ...
`dir_encoding("/hello_Im_not_a_real_path")` ... but ick?)
2. Does this adequately explain that deleting is "temporary" in the sense
that revisiting a directory can change the encoding?
>> d = "/home/cbm/src/octave-doctest.git/test_extra/test_encoding"
d = /home/cbm/src/octave-doctest.git/test_extra/test_encoding
>> s = dir_encoding (d)
s = utf-8
>> cd (d)
>> cd ..
>> s = dir_encoding (d)
s = windows-1252
>> dir_encoding(d, "delete")
>> s = dir_encoding (d)
s = utf-8
>> cd (d)
>> cd ..
>> s = dir_encoding (d)
s = windows-1252
-vertabim-
Similarly one can chance the encoding in the DB and have it reset by changing
to the directory:
>> dir_encoding (d, "windows-1253")
>> s = dir_encoding (d)
s = windows-1253
>> cd (d) # <--- note this resets it
>> s = dir_encoding (d) # back to windows-1252
s = windows-1252
Maybe we can say:
> Note that changing or deleting the encoding is transient and may be
refreshed by the contents of a @code{.oct-config} file if DIR is added to the
load path (e.g., by changing the current working directory or manipulating the
path).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62808>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #62808] dir_encoding: clarify docs about deleting and global encoding,
Colin Macdonald <=