| 
					
				 | 
			
			
				@@ -2852,9 +2852,13 @@ Return PDF file name or an error if it couldn't be produced." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  ;; Else remove log files, when specified, and signal end of 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  ;; process to user, along with any error encountered. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  (when (and (not snippet) org-latex-remove-logfiles) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	    (dolist (ext org-latex-logfiles-extensions) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	      (let ((file (concat out-dir base-name "." ext))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		(when (file-exists-p file) (delete-file file))))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	    (dolist (file (directory-files 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			   out-dir t 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			   (concat (regexp-quote base-name) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				   "\\(?:\\.[0-9]+\\)?" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				   "\\." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				   (regexp-opt org-latex-logfiles-extensions)))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	      (delete-file file))) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	  (message (concat "Process completed" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			   (if (not errors) "." 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			     (concat " with errors: " errors))))) 
			 |