emacs - Distinguish between single (*.gz) and double (*.tar.gz) file type extensions -


I'm looking for some help, please differentiate the difference between a file extension ( E.g., * .gz ) and a double file extension (for example, *. Tar.gz ).

The fraction of the function that selects the following is to open one or more files - for example, in MACS, start a process and open it externally or compressed / decondress Please. I basically wrote this function (excerpt from dired-do-create-files borrowed from dired-aux.el ), only single file type extensions Keeping in mind, and now it will like to include potential double file type extensions to extend your functionality.

  (defun test-for-tar-gz-extension () (interactive) * ((FN-list (fear-out-mark- Make-file)) (RFN-list) (FRESH DEEER-MAK-RISTAL) FN-LIST) (Dear-One-File (and (CONSOP FN-LIST) (NULL (CDR FN-LIST)) (Car FN (List-one-file-fear-one-file FN-list) (ANST (CNSP (stripping input-filename) (file -name-extension-input-filename)) ((listp Input-filename (file-name-exte (Path) (path (if string-input-filename) (file-name-directory input- (dir-buffer-name (buffer-name)) (msward-reggaex '("doctor" "DOCX") (DIAR-TR '("tar.gz")) (condom;; http: //www.emacswiki.org/emacs/DiredTar ((extension ".tar.gz" is equal) (Third -tra-pack-unpack) ((The extension is equal to ".gz" (but not .tar.gz)) (tired-do-compress) ((regexp-match-p msword-regexp ext) ( Start-up "MS-Word" Zero "Open" "A" "Microsoft Word" Input-filename) (T (Message "Go Fish"))))) ) ;; Https://github.com/kentaro/auto-save-buffers-enhanced ;; `Regexp-match-p` work modified by @sds on stxoverflow ;; Http://stackoverflow.com/a/20343715/2112489 (defun regexp-match-p (regexps string) (and string ('has been matched to capture) () (small-to-more optimization (Dolist) ( Regexp regexps) (when string match regexp string) ('match'))))))    

Not sure IIUC, here's how to do that part in a draft question:

  The files listed in the list are tired buffer at the end Listed '.gz', but does not end with `.tar.gz '(interactive) ((Flist (trust-dot-mark-file-file) erg) (Doctor (Eli Flist) (and (string-match ".gz $" ele) (no (string-match "\ .tar \ .gz $ "Ele") (Add-To-List 'ERG AL)) (when (Interactive-P) (message "% s" erg)))    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -