Author Topic: 2 dired-*.trid.xml for ls-like directory listing; Emacs *.dired  (Read 3734 times)

jenderek

  • Sr. Member
  • ****
  • Posts: 361
Hello,

often i use Emacs editor with lisp package "dired" as file manager. See
also URL https://en.wikipedia.org/wiki/Dired .

Some days ago i do not need only simple file operations like copy and delete
files, but i need additional features. This "extra" features for Emacs's
Dired Mode are provided by lisp package "dired-x". The ls-like directory
listing used by dired mode can be also handled as virtual dired modes. That
means content of buffer can be saved/read as file with name extension
".dired". These files are described by trid as "Unknown!".

So i create trid definitions for such examples. After running tridscan
on many different examples i get only 1 pattern like:
   <Bytes>2020</Bytes>
   <Pos>0</Pos>

This is maybe to unspecific. Instead of creating dired.trid.xml i look
for distinguishing features. On first examples directory listing contain
a summary line which looks like:
  total used in directory 10207 available 35079376

This gives in first trid definition in global string section XML pattern
like:
   <String>TOTAL USED IN DIRECTORY</String>

But when i changed language from English to German like in example
test6-dired-de.dired the summary line contains now German words and
line now looks like:
  insgesamt 40

So such patterns can not be used in general. So i mention fact concerning
language in remark line. Furthermore i use URL of "dired-x" manual as
reference by XML construct:
<RefURL>
https://www.gnu.org/software/emacs/manual/html_mono/dired-x.html#Virtual-Dired
</RefURL>

When running on Windows systems directory names always contain drive
letter and colon character at the beginning like line:
  C:/WINDOWS/TEMP:

This is expressed in dired-doswin.trid.xml by additional XML construct:
   <Bytes>3A2F</Bytes>
   <ASCII> : /</ASCII>
   <Pos>3</Pos>

When running on UNIX like operating system directory name starts with
root ( "/" character) at beginning like example:
  /tmp:
This is expressed in dired-unix.trid.xml by additional XML construct:
   <Bytes>2F</Bytes>
   <ASCII> /</ASCII>
   <Pos>2</Pos>

With new 2 trid definition files all inspected *.dired examples are now
recognized (see appended output/trid-new.txt). TrID definitions, some
examples and output are stored in archive dired.zip. I hope that the two
XML files can be used in future version of triddefs.

With best wishes
J?rg Jenderek

Mark0

  • Administrator
  • Hero Member
  • *****
  • Posts: 2667
    • Mark0's Home Page
Re: 2 dired-*.trid.xml for ls-like directory listing; Emacs *.dired
« Reply #1 on: March 26, 2018, 08:03:37 PM »
Thanks!