update packages

This commit is contained in:
2025-12-25 11:44:13 +01:00
parent 059fa06572
commit 1dab1fe4ab
144 changed files with 19985 additions and 1331 deletions

View File

@@ -0,0 +1,552 @@
;;; apdl-initialise.el --- Initialisation code for APDL-Mode -*- lexical-binding: t -*-
;; Copyright (C) 2016 - 2025 H. Dieter Wilhelm
;; Author: H. Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
;; Package-Requires: ((emacs "25.1"))
;; Keywords: languages, convenience, extensions
;; URL: https://github.com/dieter-wilhelm/apdl-mode
;; Maintainer: H. Dieter Wilhelm
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Initialisation code:
;; Read the Ansys installation dependent parameters mainly from
;; environment variables.
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; constants
(defconst apdl-mode-version "20.7.0"
"The APDL-Mode version string.")
(defconst apdl-mode-update "2021-10-23"
"APDL-Mode packaging date string in yyyy-mm-dd format.
This is for the APDL-Mode development versions to check the time
of packaging.")
;; safer way to get the installation directory? -TODO-
;; (defconst superfrobnicator-base (file-name-directory load-file-name))
;; (defun superfrobnicator-fetch-image (file)
;; (expand-file-name file superfrobnicator-base))
(defconst apdl-mode-install-directory
(file-name-directory
(or (locate-library "apdl-mode")
buffer-file-name)) ;use this file location
"The installation directory string of APDL-Mode.
The string contains the directory where the APDL-Mode Elisp files
reside.")
(defconst apdl-ansys-version "v201"
"Ansys version string on which APDL-Mode is based upon.
With respect to keywords and documentation, like deprecated
elements, command names, etc.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; defcustoms
(defgroup APDL-initialise nil
"Initialisation subgroup for APDL-Mode."
:group 'APDL)
(defcustom apdl-username nil
"Regex string representing the user name or user ID.
This variable is a regular expression used to display only the
user's license(s) from the license pool. Please see the function
`apdl-user-license-status'."
:type 'string
:group 'APDL-initialise)
;; -TODO-: are environment variables also set under GNU-Linux?
(defcustom apdl-ansys-install-directory nil
"This is the path where the MAPDL solver (Ansys) has been installed.
Which is to say the path up to (and including) the Ansys version
number, for example \"/ansys_inc/v201/\". The Ansys installation
routine sets for this path an environment variable, for the
former versioning example: \"AWP_ROOT201\". With other words:
this customisation variable includes besides the installation
root directory also the information which Ansys version is
currently in use."
:type 'directory
:group 'APDL-initialise)
;; TODO: the following defcustoms can actually be variables, can't
;; they?
(defcustom apdl-ansys-program nil
"This string variable stores the Ansys executable.
Under GNU-Linux this should be the solver, under Windows just the
launcher. When the respective executable is not in your search
path, you have to specify the full qualified file name and not
only executable's name. For example:
\"/ansys_inc/v201/ansys/bin/ansys195\" and not only \"ansys195\".
You might customise this variable or use the function
`apdl-ansys-program' to do this for the current session only."
:type '(file :must-match t)
:group 'APDL-initialise)
(defcustom apdl-ansys-launcher nil
"This string variable stores the Ansys launcher executable.
When the respective executable is not in your search path, you
have to specify the full qualified file name and not only
executable's name. For example:
\"/ansys_inc/v162/ansys/bin/launcher162\". You might customise this
variable permanently or use the function `apdl-ansys-launcher' to do
this for the current session only."
:type '(file :must-match t)
:group 'APDL-initialise)
(defcustom apdl-ansys-wb nil
"This string variable stores the Ansys WorkBench executable.
When the respective executable is not in your search path, you
have to specify the full qualified file name, not only
executable's name. For example:
\"/ansys_inc/v201/Framework/bin/Linux64/runwb2\". You might
customise this variable permanently or use the function
`apdl-ansys-wb' to do this for the current session only."
:type '(file :must-match t)
:group 'APDL-initialise)
(defcustom apdl-ansys-help-program nil
"The Ansys help viewer executable.
It is called with
\\[apdl-start-ansys-help] (`apdl-start-ansys-help'). When the
executable is not in the search path, you have to complement the
executable with its complete path. For example the default
locations are \"/ansys_inc/v162/ansys/bin/anshelp162\" on
GNU-Linux and \"c:/Program Files/Ansys
Inc/v162/commonfiles/help/HelpViewer/AnsysHelpViewer.exe\" on
Windows (Windows 10)."
:type '(file :must-match t)
:group 'APDL-initialise)
(defcustom apdl-ansys-help-path nil
"The Ansys help path."
:type 'directory
:group 'APDL-initialise)
(defcustom apdl-lmutil-program nil
"A FlexLM license manager monitoring executable.
For example: \"/ansys_inc/shared_files/licensing/linx64/lmutil\"
or in case of a Windows OS \"c:/Program Files/Ansys Inc/Shared
Files/Licensing/anslic_admin.exe\". The lmutil program is used
for displaying the license status."
:type '(file :must-match t)
:group 'APDL-initialise)
(defcustom apdl-license-file nil
"The FlexLM license file name or license server specification(s).
The license server specification(s) should include the port
number even if it's the default port 1055 because the lmutil tool
needs it in the following way: port_number@server_name, use the
colon for multiple servers, for example
\"27005@rbgs421x:27005@rbgs422x\".
Setting this variable skips the effect of previously set
environment variables, which have the following order of
precedence: 1. AnsysLMD_LICENSE_FILE environment variable, 2.)
The FLEXlm resource file: ~/.flexlmrc on GNU-Linux or somewhere in the
Windows registry. 3.) The LM_LICENSE_FILE variable. 4.) The
ansyslmd.ini file in the licensing directory (This is what
anslic_admin is doing in an Ansys recommended installation). 5.)
The license file itself."
:type 'string
:group 'APDL-initialise)
(defcustom apdl-ansysli-servers nil
"Used to identify the server machine for the Licensing Interconnect.
Set it to port@host. The default port is 2325."
:type 'string
:group 'APDL-initialise)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; declaring functions
(declare-function apdl-is-unix-system-p "apdl-mode")
(declare-function apdl-classics-p "apdl-process")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; defining variables
(defvar apdl-initialised-flag nil
"Non-nil means that APDL-Mode is already initialised.")
(defvar apdl-current-ansys-version nil
"String of the currently used MAPDL solver version.
This variable is used by the `apdl-skeleton-header' template and
for setting up variables defaults with Ansys path specifications,
like in the variable `apdl-ansys-program'. The content looks
like: \"v201\"")
;; from -mode.el
(defvar apdl-is-unix-system-flag)
;; from -process.el
(defvar apdl-classics-flag)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; functions
(defun apdl-read-ansyslmd-ini (type)
"Read the Ansys license server configuration file for license TYPE.
If TYPE is nil return the license servers, if non-nil the
ansysli_servers. When there are no license servers readable,
return nil."
(let* ((idir
(if apdl-ansys-install-directory
(file-name-directory
(directory-file-name apdl-ansys-install-directory))
nil))
ini)
(if apdl-is-unix-system-flag
(setq ini (concat idir "shared_files/licensing/ansyslmd.ini"))
(setq ini (concat idir "Shared Files/Licensing/ansyslmd.ini")))
(message "Checking license file: %s" ini)
(if (file-readable-p ini)
(with-temp-buffer
(insert-file-contents ini)
(if type ;ansli_server or not
;; I think word search doesn't distinct capitalisation
;; word search is not working with "=" for Emacs-24!!
(word-search-forward "AnsysLI_SERVERS=" nil t)
(word-search-forward "SERVER=" nil t))
(search-forward-regexp ".*" nil t)
(match-string-no-properties 0)) ; TODO: there's no check
;; against empty ini!
(message "File %s not readable" ini)
nil)))
(defun apdl-find-path-environment-value ()
"Find the latest AWP_ROOTXXX environment value.
Which is to say find the Ansys root path with the largest
installed versioning number and check the accessibility of the
content."
(let ((dir
(car
(reverse
(sort
(remove nil
(mapcar (lambda (str)
(when
(string-match
"AWP_ROOT[0-9][0-9][0-9]=\\(.*\\)"
str)
(match-string 1 str)))
process-environment))
'string<)))))
(if (null dir)
(progn
(message "No AWP_ROOTXXX environment variable")
nil)
(if (file-readable-p dir)
(progn
(message "Found Ansys root directory in environment: %s" dir)
dir)
(message "Environment AWP_ROOTXXX set but value is not readable")
nil))))
;;;###autoload
(defun apdl-initialise ( &optional force)
"Initialise the customisation variables.
When argument FORCE is non-nil overwrite some of the already set
customisation variables."
(message "Initialising Ansys installation dependent parameters ...")
;; 0) -unix-system-flag, system environment
(setq apdl-is-unix-system-flag (apdl-is-unix-system-p))
(unless apdl-username
(setq apdl-username (or (getenv "USERNAME")
;; centos 7.9
(getenv "USER"))))
;; 1) -install-directory
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; !!!! with Ansys version information!!!!
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; if apdl-ansys-install-directory is set we need a way to get
;; apdl-current-ansys-version!
(when apdl-ansys-install-directory ;set by user
(let((subdir
(file-name-nondirectory
(directory-file-name apdl-ansys-install-directory))))
(setq apdl-current-ansys-version subdir) ; (remove ?v subdir))
(message "Current Ansys version: %s" apdl-current-ansys-version)))
(unless apdl-ansys-install-directory
(let* ((cdir "/appl/ansys_inc/") ; this is a corporate path
;; from environment variable below, I think only under
;; Windows!?
(path (apdl-find-path-environment-value))
(dir (if (null path)
nil
(file-name-as-directory path)))
subdir)
(cond
(dir ; from environment
(setq apdl-ansys-install-directory dir)
(message
"apdl-ansys-install-directory set from environment variable AWP_ROOTXXX")
(message "apdl-ansys-install-directory = %s" dir)
(setq subdir
(file-name-nondirectory (directory-file-name dir)))
(setq apdl-current-ansys-version subdir) ; (remove ?v subdir))
(message "Current Ansys version: %s" apdl-current-ansys-version))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; from company Linux installation path
((file-readable-p cdir)
(setq subdir
(car
(reverse
(directory-files cdir nil "[0-9][0-9]\.[0-9]"))))
(setq apdl-current-ansys-version (remove ?. (substring subdir 0 4)))
(setq dir (concat cdir subdir apdl-current-ansys-version "/")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; default installation path on Linux "/" or rather "/usr"
;; /ansys_i..nc is a symlink to /usr/ansys_inc!
((apdl-is-unix-system-p)
(message "Checking the default path under a Unix system.")
(setq cdir "/ansys_inc/")
(when (file-readable-p cdir)
(setq subdir
(car
(reverse
(directory-files cdir nil "v[0-9][0-9][0-9]"))))
(setq apdl-current-ansys-version (substring subdir 0 4))
(message "Current Ansys version: %s" apdl-current-ansys-version)
(setq dir (concat cdir subdir "/"))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; default installation path on windows
(t
(setq cdir "C:/Program Files/Ansys Inc/")
;; search for the latest version
(when (file-readable-p cdir)
(setq subdir
(car
(reverse
(directory-files cdir nil "v[0-9][0-9][0-9]" 'string<))))
(setq apdl-current-ansys-version (substring subdir 0 4))
;; (remove ?v (substring subdir 0 4)))
(message "Current Ansys version: %s" apdl-current-ansys-version)
(setq dir (concat cdir subdir "/")))))
(if dir
(setq apdl-ansys-install-directory dir)
(message "No Ansys installation directory found"))))
;; ;; 1a) -classics-flag ; not supported any longer 2020-03
;; (let* ()
;; (if (and apdl-is-unix-system-flag (apdl-classics-p))
;; (setq apdl-classics-flag t)))
;; ;; 2) -current-apdl-version: is in the -ansys-install-directory
;; ;; included
;; 3) -ansys-program under Win10 seems to be case sensitive! Since
;; at least v191 there is also an MAPDL.exe
(when (and apdl-ansys-install-directory
(or (null apdl-ansys-program) force))
(let* ((version1 (remove ?v apdl-current-ansys-version))
(idir (file-name-directory apdl-ansys-install-directory))
(exe (if apdl-is-unix-system-flag
(concat idir "ansys/bin/ansys" version1)
(concat idir "ansys/bin/winx64/MAPDL.exe"))))
(if (file-executable-p exe)
(progn
(setq apdl-ansys-program exe)
(message (concat "apdl-ansys-program set to " apdl-ansys-program)))
(message "Couldn't find an executable for apdl-ansys-program."))))
;; 4) -wb
(when (and apdl-ansys-install-directory (or (null apdl-ansys-wb) force))
(let* ((idir apdl-ansys-install-directory)
(exe
(if apdl-is-unix-system-flag
(concat idir "Framework/bin/Linux64/runwb2") ; 150, 161
(concat idir "Framework/bin/Win64/RunWB2.exe" )))) ; 195
(when (file-executable-p exe)
(setq apdl-ansys-wb exe))
(if apdl-ansys-wb
(message (concat "apdl-ansys-wb set to " apdl-ansys-wb))
(message "Couldn't find an executable for apdl-ansys-wb."))))
;; 5) -launcher
(when (and apdl-ansys-install-directory (or (null apdl-ansys-launcher) force))
(let* ( (idir (when apdl-ansys-install-directory
(file-name-directory apdl-ansys-install-directory)))
(exe
;; since v191 there is no launcher191.exe, only
;; launcher.exe...
(if apdl-is-unix-system-flag
(concat idir "ansys/bin/launcher")
(concat idir "ansys/bin/winx64/launcher.exe"))))
(when (file-executable-p exe)
(setq apdl-ansys-launcher exe))
(if apdl-ansys-launcher
(message "apdl-ansys-launcher is set to %s" apdl-ansys-launcher)
(message "Couldn't find an executable for apdl-ansys-launcher (%s)."
exe))))
;; 6) -help-path; the local help path
(when (and apdl-ansys-install-directory (or (null apdl-ansys-help-path)
force))
(let* ((idir apdl-ansys-install-directory)
(path (concat idir "commonfiles/help/en-us/help/")))
(if (file-readable-p path) ; path must be a string, not nil
(progn
(setq apdl-ansys-help-path path)
(message "Set apdl-ansys-help-path to %s" path))
(message "%s" "Couldn't find the apdl-ansys-help-path"))))
;; 7) -help-program, checked v201, linux as well
(when (and apdl-ansys-install-directory (or (null apdl-ansys-help-program)
force))
(let* ((idir apdl-ansys-install-directory)
(version1 (remove ?v apdl-current-ansys-version))
(exe
(if apdl-is-unix-system-flag
(concat idir "ansys/bin/anshelp" version1)
;; cygwin distincts capitalisation of execs (v201:
;; ANSYSHelpViewer)
(concat idir "commonfiles/help/HelpViewer/ANSYSHelpViewer.exe"))))
(if (file-executable-p exe)
(progn
(message "apdl-ansys-help-program = %s" exe)
(setq apdl-ansys-help-program exe))
(message
"%s"
"Couldn't find an executable for apdl-ansys-help-program."))))
;; 8) -lmutil-program
(when (and apdl-ansys-install-directory (or (null apdl-lmutil-program) force))
(let* ((idir (file-name-directory
(directory-file-name
apdl-ansys-install-directory)))
(exe
(if apdl-is-unix-system-flag
(concat idir "shared_files/licensing/linx64/lmutil")
;; probably the linux path has also changed for lmutil.exe since Ansys21.1!
(if (version< (substring apdl-current-ansys-version 1) "211")
(concat idir "shared files/licensing/winx64/lmutil.exe")
(concat idir apdl-current-ansys-version
"/licensingclient/winx64/lmutil.exe")))))
(if (file-executable-p exe)
(progn
(setq apdl-lmutil-program exe)
(message "apdl-lmutil-program = %s" exe))
(message "%s" "Couldn't find an executable for apdl-lmutil-program"))))
;; 9) -license-file
(unless apdl-license-file
(let* (
(lfile "AnsysLMD_LICENSE_FILE")
(lic (apdl-read-ansyslmd-ini nil))
(lic1 (getenv lfile)) ; Ansys doesn't use LM_LICENSE_FILE
;; corporate stuff
(lic2 (if (file-readable-p "/appl/ansys_inc")
"32002@ls_fr_ansyslmd_ww_1.conti.de")))
(cond
(lic
(setq apdl-license-file lic)
(message "%s" "Read content of ansyslmd.ini")
(message "apdl-license-file=%s" lic))
(lic1
(setq apdl-license-file lic1)
(message "Read environment variable %s" lfile)
(message "apdl-license-file=%s" lic1))
(lic2
(setq apdl-license-file lic2)
(message "Conti server: apdl-license-file=%s" lic2)
(setenv lfile lic2))
(t
(message
"%s"
"Found no default apdl-license-file from environment or ini file")))))
;; 10) -ansysli-servers, the Interconnect license server(s)
(unless apdl-ansysli-servers
(let* (
(lfile "AnsysLI_SERVERS")
(lic (apdl-read-ansyslmd-ini t))
(lic1 (getenv lfile))
(lic2 (if (file-readable-p "/appl/ansys_inc")
"2325@ls_fr_ansyslmd_ww_1.conti.de")))
(cond
(lic
(setq apdl-ansysli-servers lic)
(message "%s" "Read content of ansyslmd.ini")
(message "apdl-ansysli-servers=%s" lic))
(lic1
(setq apdl-ansysli-servers lic1)
(message "Read environment variable %s" lfile)
(message "apdl-ansysli-servers=%s" lic1))
(lic2
(setq apdl-ansysli-servers lic2)
(message "Conti server: apdl-ansysli-servers=%s" lic2)
(setenv lfile lic2))
(apdl-license-file ; Ansys assumes the following as the last
; resort as well
;; FIXME: but only in anslic_admin I think
(setq apdl-ansysli-servers
(replace-regexp-in-string "[0-9]*@" "2325@" apdl-license-file))
(message
"%s" "Assuming the same servers for Interconnect with default port")
(message "apdl-ansysli-servers=%s" apdl-ansysli-servers))
(t
(message
"%s" "Found no apdl-ansyslic-servers from environment or ini file")))))
;; ------------------------------------------------------------
(setq apdl-initialised-flag t)
(message "%s" "\nAPDL-Mode: Initialised system dependent variables."))
;; end of init function
(defun apdl-ansys-install-directory ()
"Change the Ansys installation directory.
Which is to say the path up to (and including) the Ansys version
number, for example \"/ansys_inc/v201/\". The path is stored in
the variable `apdl-ansys-install-directory'"
(interactive)
(let* ((idir apdl-ansys-install-directory)
(ndir
(expand-file-name ; in case it was written ~
(file-name-as-directory ; in case the slash is forgotten
(read-directory-name
(concat "Specify the Ansys installation directory ["
idir "]:")
idir idir))))
(length (length ndir))
(version (substring (directory-file-name ndir)
(- length 5) (- length 1))))
(message "a-i-d: %s" ndir)
(if (file-readable-p ndir)
(progn
(setq apdl-ansys-install-directory
(file-name-as-directory ndir)) ; ensure final slash
(message "Set apdl-ansys-install-directory to \"%s\"." ndir))
(error "Ansys directory \"%s\" is not readable" ndir))
(apdl-initialise 'force)
(setq apdl-current-ansys-version version)))
(provide 'apdl-initialise)
;;; apdl-initialise.el ends here
;; Local Variables:
;; indicate-empty-lines: t
;; show-trailing-whitespace: t
;; End:

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "apdl-mode" "20250508.908"
"Major mode for the APDL programming language."
'((emacs "25.1"))
:url "https://github.com/dieter-wilhelm/apdl-mode"
:commit "4883ab085811b85cc75c44b5af478ab8f7e98386"
:revdesc "4883ab085811"
:keywords '("languages" "convenience" "tools" "ansys" "apdl")
:authors '(("H. Dieter Wilhelm" . "dieter@duenenhof-wilhelm.de")))

3639
lisp/apdl-mode/apdl-mode.el Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,226 @@
;;; apdl-wb-template.el --- APDL WorkBench/AIM templates for the APDL-Mode -*- lexical-binding: t -*-
;; Time-stamp: <2021-10-01>
;; Copyright (C) 2020 - 2021 H. Dieter Wilhelm GPL V3
;; Author: H. Dieter Wilhelm <dieter@duenenhof-wilhelm.de>
;; Maintainer: H. Dieter Wilhelm
;; Package-Requires: ((emacs "25.1"))
;; Keywords: languages, convenience, Ansys, tools, APDL
;; URL: https://github.com/dieter-wilhelm/apdl-mode
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This code is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published
;; by the Free Software Foundation; either version 3, or (at your
;; option) any later version.
;;
;; This lisp script is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
;;
;; Permission is granted to distribute copies of this lisp script
;; provided the copyright notice and this permission are preserved in
;; all copies.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 675 Massachusetts Avenue; Cambridge, MA 02139, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Commentary:
;; Collection of templates for WorkBench and AIM Command (APDL)
;; objects
;; Convention used for outlining
;; !@ is surrounded by 30 equal signs ==============================
;; !@@ by 30 dashes ------------------------------
;; !@@@ by 30 dots ..............................
;; and empty lines
;;; Code:
(defvar apdl-last-skeleton)
(defvar apdl-skeleton-overlay)
(defvar apdl-mode-install-directory)
(defconst apdl-wb-default-template-directory
(concat apdl-mode-install-directory "template/")
"Directory where the APDL-Mode Workbench template macro files reside.")
(defgroup APDL-template nil
"Customisation 'template' subgroup"
:group 'APDL)
(defcustom apdl-wb-custom-template-directory
apdl-mode-install-directory
"Directory where your Worbench / Discovery Aim templates are residing.
You should customise this variable to your needs and apply it for
your own templates."
:type '(directory)
:group 'APDL-template)
(declare-function apdl-mode "apdl-mode")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; --- functions ---
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun apdl-display-wb-skeleton (&optional arg)
"Display or insert WorkBench Command (APDL) templates.
With an argument ARG not equal to 1 insert the template into the
current buffer instead of previewing it in a separate window.
You might trigger a completion of templates with the <TAB> or <?>
key and choose with the mouse 2 button."
(interactive "p")
(let* (
(old-buffer (buffer-name))
(new-buffer-name "*APDL-skeleton*")
(skeleton-buffer
(get-buffer-create new-buffer-name))
s ; yellow indicator line in the preview buffer above content
;; if skeleton window is visible in selected frame
(visible (get-buffer-window new-buffer-name nil))
(skel-string
;; we might want to insert it while previewing...
(if (and (not (= arg 1)) apdl-last-skeleton visible)
apdl-last-skeleton
"apdl-wbt-"))
(skel
(if (= arg 1)
(completing-read "Preview template [TAB to complete]: "
obarray 'commandp t skel-string nil)
(completing-read "Insert template [TAB to complete]: "
obarray 'commandp t skel-string nil))))
(setq apdl-last-skeleton skel)
(cond ((= arg 1)
(switch-to-buffer-other-window skeleton-buffer)
(setq buffer-read-only nil)
(remove-overlays) ; from beginnin and end of buffer
(setq apdl-skeleton-overlay (make-overlay 1 1))
(kill-region (point-min) (point-max))
(funcall (intern-soft skel))
;; (apdl-skeleton-numbering-controls)
;; (insert "bla\n")
(goto-char (point-min))
(unless (eq major-mode 'apdl-mode)
(apdl-mode))
(setq s (propertize
(concat "-*- APDL template: "
skel " -*-\n") 'face 'match))
(overlay-put apdl-skeleton-overlay 'before-string s)
(set-buffer-modified-p nil)
(setq buffer-read-only t)
(switch-to-buffer-other-window old-buffer))
(t
(funcall (intern-soft skel))))))
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; wbt workbench templates:
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; test interregion templates!
;; ;; skeleton-insert
;; ;; docu string
;; ;; interactor string or nil
;; ;; strings "here comes\n" str | "default" " again."
;; ;; default values
;; (define-skeleton apdl-wbt-test
;; "Write greetings"
;; "Type name of idiot: "
;; "hello, " str | "Otto von Bernstein" "!\n"
;; "Here it goes.\n")
;; ;; skeleton in skeleton
;; ;; _ interesting / cursor region
;; (define-skeleton apdl-wbt-test2
;; "Write greetings"
;; "Type name of idiot: "
;; ("Put a name in: " "hello, " str "!\n")
;; "Here "_ "it goes.\n")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; "./" seems to be extracted to the Emacs folder ~/.emacs.d/ !!!
;; There are the following Command types in WorkBench:
;; 1. Prep (/prep7) items, without geometry objects available, only selections
;; 2. Solu (/solu) items, before solve
;; 3. Post (/post) items, after solve
(define-skeleton apdl-wbt-harmonic-acceleration-result
"/post26 harmonic acceleration results.
Visualisation and file output of frequency and vector sum
aplitude."
nil
"/com,==============================================================\n"
"/com, Inserted: "(current-time-string)", APDL-Mode: "apdl-mode-version"\n"
"/com,==============================================================\n"
(insert-file
(concat apdl-wb-default-template-directory
"harmonic_acceleration_results.mac")))
(define-skeleton apdl-wbt-post26-output
"/post26 workbench output template."
nil
"/com,==============================================================\n"
"/com, Inserted: "(current-time-string)", APDL-Mode: "apdl-mode-version"\n"
"/com,==============================================================\n"
(insert-file
(concat apdl-wb-default-template-directory
"post26_output.mac")))
(define-skeleton apdl-wbt-post-2d-press-fit_calcs
"Calculate the transmissible torque from contact results.
And other parameters from a plane stress press-fit simulation."
nil
"/com,==============================================================\n"
"/com, Inserted: "(current-time-string)", APDL-Mode: "apdl-mode-version"\n"
"/com,==============================================================\n"
(insert-file
(concat apdl-wb-default-template-directory
"plane_stress_press-fit_torque_calculations.mac")))
(define-skeleton apdl-wbt-post-3d-press-fit_calcs
"Calculate the transmissible torque from contact results.
And other parameters from a 3d stress press-fit simulation."
nil
"/com,==============================================================\n"
"/com, Inserted: "(current-time-string)", APDL-Mode: "apdl-mode-version"\n"
"/com,==============================================================\n"
(insert-file
(concat apdl-wb-default-template-directory
"3d_stress-press-fit_torque_calculations.mac")))
(define-skeleton apdl-wbt-do
"Insert a *do .. *enddo loop."
nil
"*do,I,1,10,1" > \n
- \n
"!! *cycle ! bypass below commands in *do loop" > \n
"*enddo" > \n)
(define-skeleton apdl-wbt-if
"Insert an *if .. *endif construct."
nil
"*if,I,eq,J,then" > \n
- \n
"!! *elseif,K,gt,L" > \n
"!! *else" > \n
"*endif" >)
(provide 'apdl-wb-template)
;;; apdl-wb-template.el ends here
;; Local Variables:
;; mode: outline-minor
;; indicate-empty-lines: t
;; show-trailing-whitespace: t
;; word-wrap: t
;; time-stamp-active: t
;; time-stamp-format: "%:y-%02m-%02d"
;; End:

19
lisp/apdl-mode/dir Normal file
View File

@@ -0,0 +1,19 @@
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.

File: dir, Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "q" exits, "?" lists all Info commands, "d" returns here,
"h" gives a primer for first-timers,
"mEmacs<Return>" visits the Emacs manual, etc.
In Emacs, you can click mouse button 2 on a menu item or cross reference
to select it.
* Menu:
Development
* APDL Mode: (apdl-mode). The major mode for the scripting language APDL

View File

@@ -0,0 +1,24 @@
/COM,ANSYS RELEASE 15.0 UP20131014 10:18:20 07/10/2014
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 5, 1, -100.000000 , 0.00000000 , 20.0000000
MPTEMP,R5.0, 5, 4, 100.000000 , 200.000000 ,
MPDATA,R5.0, 5,EX ,_MATL , 1, 21700.0000 , 21300.0000 , 21200.0000
MPDATA,R5.0, 5,EX ,_MATL , 4, 20700.0000 , 19900.0000 ,
MPTEMP,R5.0, 5, 1, -100.000000 , 0.00000000 , 20.0000000
MPTEMP,R5.0, 5, 4, 100.000000 , 200.000000 ,
MPDATA,R5.0, 5,NUXY,_MATL , 1, 0.300000000 , 0.300000000 , 0.300000000
MPDATA,R5.0, 5,NUXY,_MATL , 4, 0.300000000 , 0.300000000 ,
MPTEMP,R5.0, 5, 1, -100.000000 , 0.00000000 , 20.0000000
MPTEMP,R5.0, 5, 4, 100.000000 , 200.000000 ,
MPDATA,R5.0, 5,ALPX,_MATL , 1, 1.050000000E-05, 1.140000000E-05, 1.150000000E-05
MPDATA,R5.0, 5,ALPX,_MATL , 4, 1.210000000E-05, 1.270000000E-05,
MPTEMP,R5.0, 5, 1, -100.000000 , 0.00000000 , 20.0000000
MPTEMP,R5.0, 5, 4, 100.000000 , 200.000000 ,
MPDATA,R5.0, 5,DENS,_MATL , 1, 7.850000000E-09, 7.850000000E-09, 7.850000000E-09
MPDATA,R5.0, 5,DENS,_MATL , 4, 7.850000000E-09, 7.850000000E-09,
/GO
/NOP
/GO

View File

@@ -0,0 +1,19 @@
/com,AlSi9Cu3(Fe) DIN EN 1706: 1998-06
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 75000.0000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 21.00000000E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 2750.000000E-06,
TB,BISO,_MATL , 1
TBTEM, 0.00000000 , 1
TBDAT, 1, 160.000000 , 5615.02961 ,
/GO
mplist
tblist

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Al_a2024-T3.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 7.300000000E+10,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.330000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 2.270000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 2770.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 190.000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 963.000000 ,
/GO

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Al_a6061-T6.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 7.300000000E+10,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.330000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 2.430000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 2700.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 156.000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 963.000000 ,
/GO

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Al_a7079-T6.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 7.170000000E+10,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.330000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 2.470000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 2740.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 121.000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 963.000000 ,
/GO

View File

@@ -0,0 +1,28 @@
/COM,C75s hardened 0.5 mm sheet metal
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 216666.667 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 1.200000000E-05,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 60.5000000 ,
TB,KINH,_MATL , 1, 8,
TBTEMP,20.000000
TBPT,, 6.00000e-03, 1.30000e+03,
TBPT,, 7.50000e-03, 1.43000e+03,
TBPT,, 1.00000e-02, 1.50000e+03,
TBPT,, 1.50000e-02, 1.55000e+03,
TBPT,, 2.00000e-02, 1.58000e+03,
TBPT,, 4.00000e-02, 1.64500e+03,
TBPT,, 5.00000e-02, 1.64000e+03,
TBPT,, 5.40000e-02, 1.60000e+03,
/GO
/NOP
/GO

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Cu_pure.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 1.170000000E+11,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 1.660000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 8900.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 393.000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 385.200000 ,
/GO

View File

@@ -0,0 +1,23 @@
/COM,ANSYS RELEASE 15.0 UP20131014 13:19:48 07/07/2014
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 185000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EY ,_MATL , 1, 200000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
TB,ANIS,_MATL
TBDAT, 1, 430.000000 , 451.500000 , 0.00000000
TBDAT, 4, 1086.00000 , 1140.00000 , 0.00000000
TBDAT, 7, 0.00000000 , 0.00000000 , 0.00000000
TBDAT, 10, 0.00000000 , 0.00000000 , 0.00000000
TBDAT, 13, 0.00000000 , 0.00000000 , 0.00000000
TBDAT, 16, 0.00000000 , 0.00000000 , 0.00000000
/GO
/NOP
/GO

View File

@@ -0,0 +1,17 @@
/COM,M250-35 electrical steel
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 192500.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
TB,BISO,_MATL , 1
TBTEM, 0.00000000 , 1
TBDAT, 1, 430.000000 , 1086.27599 ,
/GO
mplist
tblist

View File

@@ -0,0 +1,21 @@
/COM,ANSYS RELEASE 15.0 UP20131014 14:53:04 07/07/2014
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 185000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EY ,_MATL , 1, 200000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,GXY ,_MATL , 1, 74038.0000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
TB,BISO,_MATL , 1
TBTEM, 0.00000000 , 1
TBDAT, 1, 430.000000 , 1086.27599 ,
/GO
/NOP
/GO

View File

@@ -0,0 +1,18 @@
/COM,M800-65 1.081 electrical steel Thyssen Krupp
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 200000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
TB,BISO,_MATL , 1
TBTEM, 0.00000000 , 1
TBDAT, 1, 317.000000 , 884.497284 ,
/GO
/NOP
/GO
tblist,all,all

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Mg_AZ31B-H24.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 4.480000000E+10,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.350000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 2.610000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 1770.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 95.2000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 1047.00000 ,
/GO

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Mg_HK31A-H24.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 4.410000000E+10,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.350000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 2.520000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 1790.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 114.000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 544.000000 ,
/GO

View File

@@ -0,0 +1,20 @@
/COM,ANSYS RELEASE 15.0 UP20131014 14:05:41 07/09/2014
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 150000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1,-2.000000000E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPY,_MATL , 1, 7.000000000E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPZ,_MATL , 1, 7.000000000E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.600000000E-09,
/GO
/NOP
/GO

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Ni_pure.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 2.210000000E+11,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 1.300000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 8900.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 91.7000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 461.000000 ,
/GO

View File

@@ -0,0 +1,22 @@
/com, PPS 40% glass fibre here: Celanese Fortron 1140L4
/com, Young's modulus 80 % reduced to tensile test specimen
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 1.2E4,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.4,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 1.65E-09,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 30E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,C,_MATL , 1, 1500e3,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,KXX,_MATL , 1, 0.2E-3,
/GO
/NOP
/GO
mplist,all

View File

@@ -0,0 +1,24 @@
/COM,/COM,PPS Fortron 1140L4 @ 70 °C, ca. 2014 Campus data from Celanese
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 70.0000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 11570.0000 ,
MPTEMP,R5.0, 1, 1, 70.0000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.400000000 ,
TB,KINH,_MATL , 1, 10,
TBTEMP,70.000000
TBPT,, 1.80000e-03, 2.08240e+01,
TBPT,, 3.60000e-03, 4.08560e+01,
TBPT,, 5.40000e-03, 5.88560e+01,
TBPT,, 7.30000e-03, 7.44480e+01,
TBPT,, 9.10000e-03, 8.75680e+01,
TBPT,, 1.09000e-02, 9.84160e+01,
TBPT,, 1.27000e-02, 1.07240e+02,
TBPT,, 1.45000e-02, 1.14304e+02,
TBPT,, 1.63000e-02, 1.19784e+02,
TBPT,, 1.82000e-02, 1.23824e+02,
/GO
/NOP
/GO

View File

@@ -0,0 +1,105 @@
#+DATE: Time-stamp: <2020-02-28>
#+bind: org-html-preamble-format (("en" "%d"))
#+OPTIONS: ':nil *:t -:t ::t <:t H:3 \n:nil ^:{} arch:headline
#+OPTIONS: author:t c:nil creator:comment d:(not "LOGBOOK") date:t
#+OPTIONS: e:t email:nil f:t inline:t num:t p:nil pri:nil prop:nil
#+OPTIONS: stat:t tags:t tasks:t tex:t timestamp:t toc:t todo:t |:t
#+AUTHOR: H. Dieter Wilhelm
#+EMAIL: dieter@duenenhof-wilhelm.de
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+OPTIONS: html-link-use-abs-url:nil html-postamble:t html-preamble:t
#+OPTIONS: html-scripts:t html-style:t html5-fancy:nil tex:t
#+HTML_DOCTYPE: xhtml-strict
#+HTML_CONTAINER: div
#+HTML_LINK_HOME: https://github.com/dieter-wilhelm/apdl-mode
#+HTML_LINK_UP: ../index.html
#+HTML_HEAD:
#+HTML_HEAD_EXTRA:
#+HTML_MATHJAX:
#+INFOJS_OPT:
#+LATEX_HEADER:
#+STARTUP: showall
#+TITLE: This Apdl-Mode's README.org for the matlib/ directory
Its text is best read in Emacs' Org mode.
Copyright (C) 2015 - 2020 H. Dieter Wilhelm, GPL V3
If not indicated otherwise in the file name, material properties are
linear and for room temperature.
* Usage in an APDL file
Specify the material library to read from:
#+BEGIN_SRC emacs-lisp
/mplib,read,/HOME/uidg1626/a-m/matlib
/mplib,stat !show the material directories
!! which materials are acutally in the material library?
/sys,ls ~/a-m/matlib
#+END_SRC
You have to indicate the unit system.
- SI — International system (m, kg, s, K).
- MKS — MKS system (m, kg, s, °C).
- uMKS — μMKS system (μm, kg, s, °C).
- CGS — CGS system (cm, g, s, °C).
- MPA — MPA system (mm, Mg, s, °C).
- BFT — U. S. Customary system using feet (ft, slug, s, °F).
- BIN — U. S. Customary system using inches (in, lbf*s2/in, s, °F).
For example:
#+BEGIN_SRC emacs-lisp
/units,mpa !indicate MPA system for subsequent material definitions
mpread,St37,,,lib
#+END_SRC
The following block is writing a material definition into the
library.
#+BEGIN_SRC emacs-lisp
/mplib,write,/HOME/uidg1626/a-m/matlib
!! --- It is advisable to make the material files which are commented read only!
/units,mpa !default extension for mpread/write is now MPA_MPL
mat,Steel ! set the appropriate material number
mpwrite
mplist ! Check
#+END_SRC
* Materials defined in Apdl-Mode's library
- 42CrMo4_biso_Rp850.MPA_MPL ::
- AlSi9Cu3_biso.MPA_MPL ::
- C75s_hardened_kinh.MPA_MPL ::
- construction_steel.MPA_MPL ::
- copper.MPA_MPL ::
- M250-35A_aniso.MPA_MPL ::
- M250-35A_biso.MPA_MPL ::
- M250-35A_orthotropic_elastic.MPA_MPL ::
- M800-65A_biso.MPA_MPL ::
- NdFeB_magnet.MPA_MPL ::
- PPS_Fortron1140L4_70degC_kinh.MPA_MPL ::
- PPS.MPA_MPL :: Celanese Fortron 1140L4 40 % glass fibre, Young's
modulus 80 % reduced compared to test specimen to
replicate a random fibre orientation.
- St37_elastic.MPA_MPL ::
- St37.MPA_MPL ::
- St70_biso.MPA_MPL ::
- X46Cr13.MPA_MPL ::
* Other material data
- creep_curves_PPS_Fortron1140l4_120degC.csv :: A 40 % short glas
fibre filled PPS. The stress - creep strain curves are scaled
with a factor of 0.8 from test specimen to account for a random
fibre orientation in thick walled parts. They might be used as
an example for data fitting with the TBFT command.
-----
* COMMENT Restrictions of the material models
# LOCAL variables:
# word-wrap: t
# show-trailing-whitespace: t
# indicate-empty-lines: t
# time-stamp-active: t
# time-stamp-format: "%:y-%02m-%02d"
# end:

View File

@@ -0,0 +1,21 @@
/com,St37 DIN 1629
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 210000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 12E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,C,_MATL , 1, 434E-3,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,KXX,_MATL , 1, 60.5E-3,
/GO
/NOP
/GO
mplist,all

View File

@@ -0,0 +1,21 @@
/com,St37 DIN 1629
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 210000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 12E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,C,_MATL , 1, 434E3,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,KXX,_MATL , 1, 60.5E-3,
/GO
/NOP
/GO
mplist,all

View File

@@ -0,0 +1,17 @@
/COM,St 70, according to WIAM: DIN 17100 1980-01
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 192500.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
TB,BISO,_MATL , 1
TBTEM, 0.00000000 , 1
TBDAT, 1, 365.000000 , 4091 ,
/GO
mplist
tblist

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Stl_AISI-304.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 1.930000000E+11,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.290000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 1.780000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 8030.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 16.3000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 502.000000 ,
/GO

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Stl_AISI-C1020.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 2.070000000E+11,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.290000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 1.510000000E-05,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7850.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 46.7000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 419.000000 ,
/GO

View File

@@ -0,0 +1,21 @@
! ANSYS $RCSfile: Ti_B-120VCA.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/COM,Typical material properties for DEMO purposes only
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,EX ,_MATL , 1, 1.020000000E+11,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 9.360000000E-06,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,DENS,_MATL , 1, 4850.00000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,KXX ,_MATL , 1, 7.44000000 ,
MPTEMP,R5.0, 1, 1, 0.000000000E+00,
MPDATA,R5.0, 1,C ,_MATL , 1, 544.000000 ,
/GO

View File

@@ -0,0 +1,15 @@
/com,X46Cr13 DIN EN 10088-1
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 215000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7850E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 10.5E-06,
/GO
mplist

View File

@@ -0,0 +1,14 @@
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 200000.000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.300000000 ,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 7.850000000E-09,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 12E-06,
/GO
mplist,all

View File

@@ -0,0 +1,22 @@
/com,copper alloy from Ansys WB
/NOP
/COM,Internal UNITS set at file creation time = MPA
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,EX ,_MATL , 1, 1.1E5,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,NUXY,_MATL , 1, 0.34,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,DENS,_MATL , 1, 8.3E-09,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,ALPX,_MATL , 1, 18E-06,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,C,_MATL , 1, 385E3,
MPTEMP,R5.0, 1, 1, 0.00000000 ,
MPDATA,R5.0, 1,KXX,_MATL , 1, 401E-3,
/GO
/NOP
/GO
mplist,all

View File

@@ -0,0 +1,54 @@
/temp,120
/1,time
/2,seqv
/3,creq
1 1.8 1e-04
1 3.6 3e-04
1 5.4 4e-04
1 7.2 6e-04
1 9 9e-04
1 10.8 0.0011
1 12.6 0.0015
1 14.4 0.0019
1 16.2 0.0024
1 18 0.0031
10 1.8 1e-04
10 3.6 3e-04
10 5.4 5e-04
10 7.2 7e-04
10 9 9e-04
10 10.8 0.0013
10 12.6 0.0017
10 14.4 0.0023
10 16.2 0.0031
10 18 0.0041
100 1.8 2e-04
100 3.6 3e-04
100 5.4 5e-04
100 7.2 8e-04
100 9 0.0012
100 10.8 0.0016
100 12.6 0.0022
100 14.4 0.003
100 16.2 0.0041
100 18 0.0055
1000 1.8 3e-04
1000 3.6 7e-04
1000 5.4 0.001
1000 7.2 0.0015
1000 9 0.002
1000 10.8 0.0027
1000 12.6 0.0035
1000 14.4 0.0045
1000 16.2 0.0058
1000 18 0.0075
10000 1.8 7e-04
10000 3.6 0.0013
10000 5.4 0.002
10000 7.2 0.0028
10000 9 0.0036
10000 10.8 0.0045
10000 12.6 0.0055
10000 14.4 0.0067
10000 16.2 0.008
10000 18 0.0094
1 /temp,120
2 /1,time
3 /2,seqv
4 /3,creq
5 1 1.8 1e-04
6 1 3.6 3e-04
7 1 5.4 4e-04
8 1 7.2 6e-04
9 1 9 9e-04
10 1 10.8 0.0011
11 1 12.6 0.0015
12 1 14.4 0.0019
13 1 16.2 0.0024
14 1 18 0.0031
15 10 1.8 1e-04
16 10 3.6 3e-04
17 10 5.4 5e-04
18 10 7.2 7e-04
19 10 9 9e-04
20 10 10.8 0.0013
21 10 12.6 0.0017
22 10 14.4 0.0023
23 10 16.2 0.0031
24 10 18 0.0041
25 100 1.8 2e-04
26 100 3.6 3e-04
27 100 5.4 5e-04
28 100 7.2 8e-04
29 100 9 0.0012
30 100 10.8 0.0016
31 100 12.6 0.0022
32 100 14.4 0.003
33 100 16.2 0.0041
34 100 18 0.0055
35 1000 1.8 3e-04
36 1000 3.6 7e-04
37 1000 5.4 0.001
38 1000 7.2 0.0015
39 1000 9 0.002
40 1000 10.8 0.0027
41 1000 12.6 0.0035
42 1000 14.4 0.0045
43 1000 16.2 0.0058
44 1000 18 0.0075
45 10000 1.8 7e-04
46 10000 3.6 0.0013
47 10000 5.4 0.002
48 10000 7.2 0.0028
49 10000 9 0.0036
50 10000 10.8 0.0045
51 10000 12.6 0.0055
52 10000 14.4 0.0067
53 10000 16.2 0.008
54 10000 18 0.0094

View File

@@ -0,0 +1,23 @@
! ANSYS $RCSfile: emagCopper.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
/COM,Copper
/COM,********* Typical properties for demo purposes *********
/com,********* Use with TUNIF or body temperature loads *********
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
MPTEMP,R5.0, 7, 1, 0.000000000E+00, 20.0000000 , 50.0000000
MPTEMP,R5.0, 7, 4, 75.0000000 , 150.000000 , 200.000000
MPTEMP,R5.0, 7, 7, 300.000000 ,
MPDATA,R5.0, 7,RSVX,_MATL , 1, 1.588774356E-08, 1.724137931E-08, 1.927272447E-08
MPDATA,R5.0, 7,RSVX,_MATL , 4, 2.096981186E-08, 2.573340196E-08, 2.842766580E-08
MPDATA,R5.0, 7,RSVX,_MATL , 7, 3.448275862E-08,
MPTEMP,R5.0, 7, 1, 0.000000000E+00, 20.0000000 , 50.0000000
MPTEMP,R5.0, 7, 4, 75.0000000 , 150.000000 , 200.000000
MPTEMP,R5.0, 7, 7, 300.000000 ,
MPDATA,R5.0, 7,MURX,_MATL , 1, 1.00000000 , 1.00000000 , 1.00000000
MPDATA,R5.0, 7,MURX,_MATL , 4, 1.00000000 , 1.00000000 , 1.00000000
MPDATA,R5.0, 7,MURX,_MATL , 7, 1.00000000 ,
/GO

View File

@@ -0,0 +1,39 @@
! ANSYS $RCSfile: emagM3.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
/COM, M3 Steel
/COM,********* Typical B-H properties for demo purposes *********
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
TB,BH ,_MATL , 1, 30
TBTEM, 0.000000000E+00, 1
TBPT,, 11.5300000 , 0.100000000
TBPT,, 20.8500000 , 0.200000000
TBPT,, 28.4100000 , 0.300000000
TBPT,, 35.2500000 , 0.400000000
TBPT,, 41.3800000 , 0.500000000
TBPT,, 46.9500000 , 0.600000000
TBPT,, 52.1200000 , 0.700000000
TBPT,, 57.0600000 , 0.800000000
TBPT,, 61.8300000 , 0.900000000
TBPT,, 66.0500000 , 1.00000000
TBPT,, 71.0300000 , 1.10000000
TBPT,, 76.4000000 , 1.20000000
TBPT,, 82.4400000 , 1.30000000
TBPT,, 90.1600000 , 1.40000000
TBPT,, 99.5500000 , 1.50000000
TBPT,, 109.580000 , 1.60000000
TBPT,, 130.910000 , 1.70000000
TBPT,, 324.766000 , 1.80000000
TBPT,, 1358.00000 , 1.90000000
TBPT,, 3581.00000 , 2.02000000
TBPT,, 6525.00000 , 2.08000000
TBPT,, 13052.0000 , 2.12500000
TBPT,, 26104.0000 , 2.15000000
TBPT,, 52208.0000 , 2.18300000
TBPT,, 104416.000 , 2.24900000
TBPT,, 208832.000 , 2.38000000
TBPT,, 417664.000 , 2.64300000
/GO

View File

@@ -0,0 +1,34 @@
! ANSYS $RCSfile: emagM54.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
/COM,M54 Steel
/COM,********* Typical B-H properties for demo purposes *********
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
TB,BH ,_MATL , 1, 40
TBTEM, 0.000000000E+00, 1
TBPT,, 91.9036000 , 0.400000000
TBPT,, 104.384800 , 0.500000000
TBPT,, 116.799300 , 0.600000000
TBPT,, 129.866300 , 0.700000000
TBPT,, 143.689300 , 0.800000000
TBPT,, 159.143700 , 0.900000000
TBPT,, 175.839600 , 1.00000000
TBPT,, 194.373700 , 1.10000000
TBPT,, 215.947800 , 1.20000000
TBPT,, 242.965100 , 1.30000000
TBPT,, 281.792100 , 1.40000000
TBPT,, 369.099200 , 1.50000000
TBPT,, 788.214200 , 1.60000000
TBPT,, 2136.65450 , 1.70000000
TBPT,, 4509.73260 , 1.80000000
TBPT,, 7977.87680 , 1.90000000
TBPT,, 15000.0000 , 1.97500000
TBPT,, 30000.0000 , 2.05500000
TBPT,, 60000.0000 , 2.14500000
TBPT,, 120000.000 , 2.23500000
TBPT,, 240000.000 , 2.37900000
TBPT,, 480000.000 , 2.68100000
/GO

View File

@@ -0,0 +1,38 @@
! ANSYS $RCSfile: emagSa1010.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
/COM,SA1010 Steel
/COM,********* Typical B-H properties for demo purposes *********
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
TB,BH ,_MATL , 1, 40
TBTEM, 0.000000000E+00, 1
TBPT,, 90.0000000 , 0.500000000
TBPT,, 270.000000 , 1.00000000
TBPT,, 318.250000 , 1.10000000
TBPT,, 384.500000 , 1.20000000
TBPT,, 479.500000 , 1.30000000
TBPT,, 608.562000 , 1.38750000
TBPT,, 755.437000 , 1.45000000
TBPT,, 939.185000 , 1.50000000
TBPT,, 1188.93000 , 1.54500000
TBPT,, 1407.93000 , 1.57500000
TBPT,, 2077.31000 , 1.62750000
TBPT,, 3117.93000 , 1.67375000
TBPT,, 3969.37000 , 1.70225000
TBPT,, 4843.66000 , 1.72750000
TBPT,, 6081.34000 , 1.75825000
TBPT,, 8581.09000 , 1.80875000
TBPT,, 11066.4000 , 1.85000000
TBPT,, 14985.7000 , 1.90250000
TBPT,, 33003.3000 , 2.05000000
TBPT,, 59203.3000 , 2.15000000
TBPT,, 93214.9000 , 2.22625000
TBPT,, 118884.000 , 2.27000000
TBPT,, 163558.000 , 2.33375000
TBPT,, 220788.000 , 2.40750000
TBPT,, 373973.000 , 2.60000000
TBPT,, 692281.000 , 3.00000000
/GO

View File

@@ -0,0 +1,28 @@
! ANSYS $RCSfile: emagSilicon.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
/COM,Silicon Core Iron
/COM,********* Typical B-H properties for demo purposes *********
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
TB,BH ,_MATL , 1, 20
TBTEM, 0.000000000E+00, 1
TBPT,, 59.5238095 , 0.200000000
TBPT,, 119.047619 , 0.400000000
TBPT,, 158.730159 , 0.550000000
TBPT,, 396.825397 , 1.15000000
TBPT,, 555.555556 , 1.30000000
TBPT,, 793.650794 , 1.40000000
TBPT,, 1587.30159 , 1.55000000
TBPT,, 3968.25397 , 1.63500000
TBPT,, 7936.50794 , 1.65500000
TBPT,, 15873.0159 , 1.67500000
TBPT,, 31746.0317 , 1.70138960
TBPT,, 63492.0635 , 1.75000000
TBPT,, 95238.0952 , 1.79000000
TBPT,, 190476.190 , 1.90980000
TBPT,, 285714.286 , 2.02960000
TBPT,, 380952.381 , 2.14950000
/GO

View File

@@ -0,0 +1,35 @@
! ANSYS $RCSfile: emagVanad.SI_MPL,v $
! Modified on $Date: 2009/11/13 16:18:22 $
! Source ID = $Revision: 1.3 $
/NOP
/COM,Internal UNITS set at file creation time = SI (MKS)
/COM,Iron Cobalt Vanadium
/COM,********* Typical B-H properties for demo purposes *********
TBDEL,ALL,_MATL
MPDEL,ALL,_MATL
TB,BH ,_MATL , 1, 40
TBTEM, 0.000000000E+00, 1
TBPT,, 170.000000 , 1.53960800
TBPT,, 210.000000 , 1.71974500
TBPT,, 250.000000 , 1.82620500
TBPT,, 290.000000 , 1.89563200
TBPT,, 330.000000 , 1.94421800
TBPT,, 370.000000 , 1.98006600
TBPT,, 410.000000 , 2.00762400
TBPT,, 470.000000 , 2.03886300
TBPT,, 560.000000 , 2.07188000
TBPT,, 695.000000 , 2.10459900
TBPT,, 897.500000 , 2.13547000
TBPT,, 1201.25000 , 2.16379600
TBPT,, 1656.87500 , 2.18955700
TBPT,, 2340.31300 , 2.21303500
TBPT,, 3365.46900 , 2.23454800
TBPT,, 4903.20300 , 2.25434900
TBPT,, 7209.80500 , 2.27262100
TBPT,, 14420.0000 , 2.29000000
TBPT,, 28840.0000 , 2.30900000
TBPT,, 57680.0000 , 2.34600000
TBPT,, 115360.000 , 2.41900000
TBPT,, 230720.000 , 2.56400000
TBPT,, 461440.000 , 2.85500000
/GO

View File

@@ -0,0 +1,26 @@
!prerequisits
!1. local cylindrical coordinate system 12
!2. correct symmetry factor
!3. friction factor
!4. 3d ASYMMETRICAL contacts
frict=0.1 ! friction co-efficient
symm=6 ! symmetry factor
set,last
esel,s,ename,,conta174 ! 174: 3d asymetrical contact!
csys,12 ! local cylindrical co-ordinate system
*get,en,elem,,count
etable,r,cent,x
csys
etable,cp,cont,pres
etable,a,volu!contact element areas
smult,tang,cp,a,frict*symm ! tangential forces over the whole circumference
smult,res,tang,r ! moment
!smult,cpres,cp,,1/en
ssum
*get,my_torque,ssum,,item,res
*get,my_force,ssum,,item,tang
*get,my_carea,ssum,,item,a
alls

View File

@@ -0,0 +1,142 @@
! Commands inserted into this file will be executed immediately after the ANSYS /POST1 command.
! Active UNIT system in Workbench when this object was created: Metric (m, kg, N, s, V, A)
! NOTE: Any data that requires units (such as mass) is assumed to be in the consistent solver unit system.
! See Solving Units in the help system for more information.
/com,*** Begin of /post26 output macro ***
!! macro calculates the vector sum of node accelerations of harmonics
!! Prerequisits:
!! 1.) Configure: Analysis Settings -> Solution Data Management ->
!! Save MAPDL Database: yes
!! 2.) Create Named Selection of one mesh node: SensorNode
!! Output:
!! graph and result file
/post26
resume
!! we need more than 10 /post26 variables here !!
numvar,20
nsel,s,,,SensorNode
NN = Ndnext(0)
Ux = 2 $ Uy = 3 $ Uz = 4
nsol,Ux,NN,U,x, DisplX ! Get x-deflection data
nsol,Uy,NN,U,y, DisplY
nsol,Uz,NN,U,z, DisplZ
!! above are complex displacements if damping or phase shifted loads
!! acceleration is only valid for transient runs, not harmonics!
!! NSOL,2,NN,acc,x, Ax ! Get x-acceleration data
!! NSOL,3,NN,acc,y, Ay
!! NSOL,4,NN,acc,z, Az
!! velocity
Pi=acos(-1)
!! get velocity
Vx = 5 $ Vy = 6 $ Vz = 7
!! complex scaling, needs to be applied after each operation
cfact,0,2*Pi,1,0
prod,Vx,1,Ux,,VeloX
cfact,0,2*Pi,1,0
prod,Vy,1,Uy,,VeloY
cfact,0,2*Pi,1,0
prod,Vz,1,Uz,,VeloZ
Ax = 8 $ Ay = 9 $ Az = 10
cfact,0,2*Pi,1,0
prod,Ax,1,Vx,,AcelX
cfact,0,2*Pi,1,0
prod,Ay,1,Vy,,AcelY
cfact,0,2*Pi,1,0
prod,Az,1,Vz,,AcelZ
!! calculate the vector sum
!! REALVAR,3,2,,,REAL2 ! Variable 3 is real part of variable 2, name = REAL2
!! IMAGIN,4,2,,,IMAG2 ! Variable 4 is imaginary part
AxAx = 11 $ AyAy = 12 $ AzAz = 13
prod,AxAx,Ax,Ax
prod,AyAy,Ay,Ay
Prod,AzAz,Az,Az
AsumAsum = 14
add,AsumAsum,AxAx,AyAy,AzAz,Asum2
!! had to write a name in above add otherwise it was confused with
!! Asum below! I consider this as a serious bug in apdl!
Asum = 15
sqrt,Asum,AsumAsum,,,AccelSum
!! QUOT,5,3,4 ! Fractions
!! ATAN,7,5,,,PHASE2 ! Variable 7 is the phase angle
!! display of result
!! toggle output of result representation with plcplx
plcplx,0
!! 0 <20> Amplitude, the default.
!! 1 <20> Phase angle.
!! 2 <20> Real part.
!! 3 <20> Imaginary part.
!! invert image background colour
/RGB,INDEX,100,100,100, 0
!! /RGB,INDEX, 80, 80, 80,13
!! /RGB,INDEX, 60, 60, 60,14
/RGB,INDEX, 0, 0, 0,15
/grid,1
/title,Displacement Components over Frequency
/axlab,x,Frequency in Hz
/axlab,y,Displacement in m
/show,png
plvar,Ux,Uy,uz
/show,close
/title,Velocity Components over Frequency
!! /axlab,x,Frequency in Hz
/axlab,y,Velocity in m/s
/show,png
plvar,Vx,Vy,Vz
/show,close
/title,Acceleration Components over Frequency
!! /axlab,x,Frequency in Hz
/axlab,y,Acceleration m/s^2
/show,png
plvar,Ax,Ay,Az
/show,close
/title,Acceleration Vector Sum Amplitude over Frequency
/show,png
plvar,Ax,Ay,Az,Asum
/show,close
!! output of variables into file
*GET,Size,VARI,,NSETS
*dim,Freq,arry,Size
*dim,ACC,array,Size ! Create array parameter
vget,Freq(1),1 ! Store freq data of variable into array
vget,ACC(1),Asum ! Store freq data of variable into array
!! overwriting existing file!
*cfopen,acceleration_sum,txt
!! The units are dependent of Workbench settings!!!!
Strg='Freq. in Hz, Acceleration in m/s^2'
*vwrite,Strg
%S
*VWRITE,Freq(1),ACC(1) ! Write array in given format to file
%G %G
*CFCLOSE
store,MERGE
!! switch back to /post1
/post1
allsel
/com,*** post 26 output...done ***
!! ++++++++++++++++++++++++++++++

View File

@@ -0,0 +1,105 @@
fini
/clear
!! y
/units,mpa ! indicate mm-t-s unit system
!@ ==============================
!@ --- Preprocessing ---
!@ ==============================
/prep7
Thick = 10.5 !element thickness, spring depth in mm
W = 0.1 !spring thickness in mm
Rad = 1.5 !Spring radius
!@@ -- Elements --
Steel = 1
ID = Steel
real = Steel
!! plane stress with thickness
!! et,ID,plane182 !2d, 4 node
et,ID,plane183,,,3 !2d, 8 node (3)0:plane stress, 1:axissymmetric, 2:plane
!strain, 3:plane stress with thickness real
!constant
r,ID,Thick ! element thickness
!! contacts: targe169 - conta172
/eshape,1 ! 1:use real constant def. for element shapes
/graphics, power ! for post1 results
!@@ -- Material --
mp,nuxy,Steel,0.3 ! Poisson No
mp,ex,Steel,200000 ! Elastic modulus
!@@ -- Modeling --
k,1,0,.25
k,2,0,.25 + W
k,3,.25
k,4,.25, W
a,1,3,4,2
k,5,2.5 - Rad
k,6,2.5 - Rad,W
a,3,5,6,4
!!*get,LN,
k,7,2.5,-Rad
k,8,2.5+W,-Rad
!! centre kp for radius
k,9,2.5-Rad,-Rad
larc,5,7,9,Rad
l,7,8
larc,8,6,9,Rad+W
l,6,5
!!/pnum,lines,on
!!lplot
al,6,8,9,10
!!aplot,all
!@@ -- Meshing --
mshkey,1 ! 1: mapped meshing,2: mapped if possible
esize,W/4
amesh,all
!@@ -- BCs, Loads --
!! symmetry
nsel,s,loc,x,0
d,all,ux
!! displacement
nsel,r,loc,y,.25
d,all,uy,.5
!! fixation
nsel,s,loc,y,-Rad
d,all,all
allsel
!@ ==============================
!@ --- Solving ---
!@ ==============================
/solu
nlgeom,on
!!outres,all,all ! ,item,freq,cname
solve
save
!@ ==============================
!@ --- Postprocessing ---
!@ ==============================
/post1
set,last !for fsum
/view,,.1,.1,1
!!plnsol,u,sum,2
/expand,2,rect,half,-1e-6
/dscale,,1
plnsol,s,1,2
nsel,s,loc,y,-Rad
fsum ! sum nodal forces/moments of selected elements

View File

@@ -0,0 +1,38 @@
!! Prerequisites:
!! 1.) 2d plane stress model with element length adjusted!!!!
!! 2.) Define assymetrical contact options
!! 3.) Local, cylindrical coordinate system ID:12
!! Adjust the variables
friction = 0.1 !friction co-efficient
symmetry = 1 !symmetry order (1 means full model, 2 means half
!model, etc.)
!! *if
!! esel,s,type,,cid_press_fit ! must be asymetrical contact
!! Requires element type variable 'cid_press_fit' and input argument
!! arg1
!! *endif
csys,12 ! local cylindrical co-ordinate system
set,last
esel,s,ename,,conta172 ! only asymetrical contacts please!
etable,a,volu ! contact element areas (or path)
etable,r,cent,x ! element centres
!! pressing-out torque
smult,forc,cp,a,friction,symmetry
!! Torque
smult,torq,forc,r
!! Average contact pressure
etable,cp,cont,pres
*get,en,elem,,count
smult,cpres,cp,,1/en
ssum ! summations for all selected elements
*get,my_force,ssum,,item,forc ! pressing-out force
*get,my_torque,ssum,,item,torq ! transmissible torque
*get,my_avg_contact_pressure,ssum,,item,cpres !average contact pressure
allsel

View File

@@ -0,0 +1,39 @@
!! ******************************
!! check symmetry variable
!!
/com,*** post26 output ***
/go
/post26
!! invert background colour
/RGB,INDEX,100,100,100, 0
!! /RGB,INDEX, 80, 80, 80,13
!! /RGB,INDEX, 60, 60, 60,14
/RGB,INDEX, 0, 0, 0,15
symmetry=2
nsol,2,nn,u,z
rforce,3,nn,f,z
add,4,2,,,displ,,,-1
add,5,3,,,force,,,-symmetry
/gmarker,1,1 !curve_no,marker_key (1=triangle)
!(2=squares,3=diamonds,4=crosses)
/grid,1
/axlab,x,displacement in mm
/axlab,y,F in N
!! store,appen
!! timerange,0,1
!! /xrange,0,.16
!! /yrange,0,40
xvar,4
spring_thick=0.4
/title,Spring thickness %spring_thick% mm
/show,png
plvar,5
/show,close !or /graphics,off
/post1 !don't forget this with multiple loadsteps
/nopr
/com,*** post 26 output...done ***
!! ++++++++++++++++++++++++++++++

View File

@@ -1,11 +1,11 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*- ;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "diff-hl" "20251125.238" (define-package "diff-hl" "20251216.242"
"Highlight uncommitted changes using VC." "Highlight uncommitted changes using VC."
'((cl-lib "0.2") '((cl-lib "0.2")
(emacs "26.1")) (emacs "26.1"))
:url "https://github.com/dgutov/diff-hl" :url "https://github.com/dgutov/diff-hl"
:commit "8dc486f568afa08dcf9932f4045677df6f5a23f8" :commit "e79aa49ad3cbbe85379cf6646db3aaacd3b04708"
:revdesc "8dc486f568af" :revdesc "e79aa49ad3cb"
:keywords '("vc" "diff") :keywords '("vc" "diff")
:authors '(("Dmitry Gutov" . "dmitry@gutov.dev")) :authors '(("Dmitry Gutov" . "dmitry@gutov.dev"))
:maintainers '(("Dmitry Gutov" . "dmitry@gutov.dev"))) :maintainers '(("Dmitry Gutov" . "dmitry@gutov.dev")))

View File

@@ -1,6 +1,6 @@
;;; diff-hl-show-hunk.el --- Integrate popup/posframe and diff-hl-diff-goto-hunk -*- lexical-binding: t -*- ;;; diff-hl-show-hunk.el --- Integrate popup/posframe and diff-hl-diff-goto-hunk -*- lexical-binding: t -*-
;; Copyright (C) 2020-2021 Free Software Foundation, Inc. ;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
;; Author: Álvaro González <alvarogonzalezsotillo@gmail.com> ;; Author: Álvaro González <alvarogonzalezsotillo@gmail.com>

View File

@@ -5,8 +5,8 @@
;; Author: Dmitry Gutov <dmitry@gutov.dev> ;; Author: Dmitry Gutov <dmitry@gutov.dev>
;; URL: https://github.com/dgutov/diff-hl ;; URL: https://github.com/dgutov/diff-hl
;; Keywords: vc, diff ;; Keywords: vc, diff
;; Package-Version: 20251125.238 ;; Package-Version: 20251216.242
;; Package-Revision: 8dc486f568af ;; Package-Revision: e79aa49ad3cb
;; Package-Requires: ((cl-lib "0.2") (emacs "26.1")) ;; Package-Requires: ((cl-lib "0.2") (emacs "26.1"))
;; This file is part of GNU Emacs. ;; This file is part of GNU Emacs.
@@ -422,7 +422,8 @@ It can be a relative expression as well, such as \"HEAD^\" with Git, or
(or (memq state '(edited conflict)) (or (memq state '(edited conflict))
(and (eq state 'up-to-date) (and (eq state 'up-to-date)
;; VC state is stale in after-revert-hook. ;; VC state is stale in after-revert-hook.
(or (static-if (>= emacs-major-version 31) (or (static-if (boundp 'revert-buffer-in-progress)
;; Emacs 31.
revert-buffer-in-progress revert-buffer-in-progress
revert-buffer-in-progress-p) revert-buffer-in-progress-p)
;; Diffing against an older revision. ;; Diffing against an older revision.
@@ -741,9 +742,36 @@ Return a list of line overlays used."
(defun diff-hl--resolve (value-or-buffer cb) (defun diff-hl--resolve (value-or-buffer cb)
(if (listp value-or-buffer) (if (listp value-or-buffer)
(funcall cb value-or-buffer) (funcall cb value-or-buffer)
(with-current-buffer value-or-buffer (static-if (fboundp 'vc-run-delayed-success)
(vc-run-delayed ;; Emacs 31.
(funcall cb (diff-hl-changes-from-buffer (current-buffer))))))) (with-current-buffer value-or-buffer
(vc-run-delayed-success 1
(funcall cb (diff-hl-changes-from-buffer (current-buffer)))))
(diff-hl--when-done value-or-buffer
#'diff-hl-changes-from-buffer
cb))))
(defun diff-hl--when-done (buffer get-value callback &optional proc)
(let ((proc (or proc (get-buffer-process buffer))))
(cond
;; If there's no background process, just execute the code.
((or (null proc) (eq (process-status proc) 'exit))
;; Make sure we've read the process's output before going further.
(when proc (accept-process-output proc))
(when (get-buffer buffer)
(with-current-buffer buffer
(funcall callback (funcall get-value buffer)))))
;; If process was deleted, we ignore it.
((eq (process-status proc) 'signal))
;; If a process is running, set the sentinel.
((eq (process-status proc) 'run)
(set-process-sentinel
proc
(lambda (proc _status)
;; Delegate to the parent cond for decision logic.
(diff-hl--when-done buffer get-value callback proc))))
;; Maybe we should ignore all other states as well.
(t (error "Unexpected process state")))))
(defun diff-hl--autohide-margin () (defun diff-hl--autohide-margin ()
(let ((width-var (intern (format "%s-margin-width" diff-hl-side)))) (let ((width-var (intern (format "%s-margin-width" diff-hl-side))))

View File

@@ -22,12 +22,12 @@
(if (>= emacs-major-version 28) (if (>= emacs-major-version 28)
(require 'pg nil t) (require 'pg nil t)
(message "emacsql-pg.el requires Emacs 28.1 or later")) (message "emacsql-pg.el requires Emacs 28.1 or later"))
(declare-function pg-connect "pg" (declare-function pg-connect "ext:pg"
( dbname user &optional ( dbname user &optional
(password "") (host "localhost") (port 5432) (tls nil))) (password "") (host "localhost") (port 5432) (tls nil)))
(declare-function pg-disconnect "pg" (con)) (declare-function pg-disconnect "ext:pg" (con))
(declare-function pg-exec "pg" (connection &rest args)) (declare-function pg-exec "ext:pg" (connection &rest args))
(declare-function pg-result "pg" (result what &rest arg)) (declare-function pg-result "ext:pg" (result what &rest arg))
(defclass emacsql-pg-connection (emacsql-connection) (defclass emacsql-pg-connection (emacsql-connection)
((pgcon :reader emacsql-pg-pgcon :initarg :pgcon) ((pgcon :reader emacsql-pg-pgcon :initarg :pgcon)

View File

@@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*- ;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "emacsql" "20251116.1655" (define-package "emacsql" "20251130.1841"
"High-level SQL database front-end." "High-level SQL database front-end."
'((emacs "26.1")) '((emacs "26.1"))
:url "https://github.com/magit/emacsql" :url "https://github.com/magit/emacsql"
:commit "e1908de2cf2c7b77798ef6645d514dded1d7f8a4" :commit "f177a41e93b92a4b1139a553eed5415ca33f439c"
:revdesc "e1908de2cf2c" :revdesc "f177a41e93b9"
:authors '(("Christopher Wellons" . "wellons@nullprogram.com")) :authors '(("Christopher Wellons" . "wellons@nullprogram.com"))
:maintainers '(("Jonas Bernoulli" . "emacs.emacsql@jonas.bernoulli.dev"))) :maintainers '(("Jonas Bernoulli" . "emacs.emacsql@jonas.bernoulli.dev")))

View File

@@ -17,9 +17,11 @@
(require 'emacsql-sqlite) (require 'emacsql-sqlite)
(require 'sqlite3 nil t) (require 'sqlite3 nil t)
(declare-function sqlite3-open "ext:sqlite3-api") ;; Prevent check-declare from finding the defining file but then making
(declare-function sqlite3-exec "ext:sqlite3-api") ;; noise because it fails to find the definition because it is a module.
(declare-function sqlite3-close "ext:sqlite3-api") (declare-function sqlite3-open "ext:module:sqlite3-api")
(declare-function sqlite3-exec "ext:module:sqlite3-api")
(declare-function sqlite3-close "ext:module:sqlite3-api")
(defvar sqlite-open-readwrite) (defvar sqlite-open-readwrite)
(defvar sqlite-open-create) (defvar sqlite-open-create)

View File

@@ -6,8 +6,8 @@
;; Maintainer: Jonas Bernoulli <emacs.emacsql@jonas.bernoulli.dev> ;; Maintainer: Jonas Bernoulli <emacs.emacsql@jonas.bernoulli.dev>
;; Homepage: https://github.com/magit/emacsql ;; Homepage: https://github.com/magit/emacsql
;; Package-Version: 20251116.1655 ;; Package-Version: 20251130.1841
;; Package-Revision: e1908de2cf2c ;; Package-Revision: f177a41e93b9
;; Package-Requires: ((emacs "26.1")) ;; Package-Requires: ((emacs "26.1"))
;; SPDX-License-Identifier: Unlicense ;; SPDX-License-Identifier: Unlicense

View File

@@ -1571,6 +1571,12 @@ by `ess-function-template'."
:group 'ess :group 'ess
:type 'regexp) :type 'regexp)
(defcustom ess-r-outline-regexp
"^[ \t]*#+ +.*\\(?:----\\|====\\|####\\)\\s-*$"
"Regexp used to detect the beginning of R headings."
:group 'ess-R
:type 'regexp)
; ess-inf: variables for inferior-ess. ; ess-inf: variables for inferior-ess.

View File

@@ -1,10 +1,10 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*- ;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "ess" "20251015.1619" (define-package "ess" "20251212.937"
"Emacs Speaks Statistics." "Emacs Speaks Statistics."
'((emacs "25.1")) '((emacs "25.1"))
:url "https://ess.r-project.org/" :url "https://ess.r-project.org/"
:commit "a7d685bd9a3dbc8540edf86318012a0a0528e49e" :commit "e39ca8fa7fce703aa2851e83987a412737d575f0"
:revdesc "a7d685bd9a3d" :revdesc "e39ca8fa7fce"
:authors '(("David Smith" . "dsmith@stats.adelaide.edu.au") :authors '(("David Smith" . "dsmith@stats.adelaide.edu.au")
("A.J. Rossini" . "blindglobe@gmail.com") ("A.J. Rossini" . "blindglobe@gmail.com")
("Richard M. Heiberger" . "rmh@temple.edu") ("Richard M. Heiberger" . "rmh@temple.edu")

View File

@@ -299,6 +299,14 @@ When t, loading a file into a namespaced will output information
about which objects are exported and which stay hidden in the about which objects are exported and which stay hidden in the
namespace.") namespace.")
(defun ess-r-outline-level ()
"R mode `outline-level` function."
(save-excursion
(beginning-of-line)
(if (looking-at "^[ \t]*\\(#+\\)\\s-")
(length (match-string 1))
1000)))
;; The syntax class for '\' is punctuation character to handle R 4.1 ;; The syntax class for '\' is punctuation character to handle R 4.1
;; lambdas. Inside strings it should be treated as an escape ;; lambdas. Inside strings it should be treated as an escape
;; character which we ensure here. ;; character which we ensure here.
@@ -855,6 +863,9 @@ top level functions only."
(setq imenu-generic-expression ess-imenu-S-generic-expression) (setq imenu-generic-expression ess-imenu-S-generic-expression)
(when ess-imenu-use-S (when ess-imenu-use-S
(imenu-add-to-menubar "Imenu-R")) (imenu-add-to-menubar "Imenu-R"))
;; outline
(setq-local outline-level #'ess-r-outline-level)
(setq-local outline-regexp ess-r-outline-regexp)
(setq-local beginning-of-defun-function #'ess-r-beginning-of-defun) (setq-local beginning-of-defun-function #'ess-r-beginning-of-defun)
(setq-local end-of-defun-function #'ess-r-end-of-defun) (setq-local end-of-defun-function #'ess-r-end-of-defun)
(ess-roxy-mode)) (ess-roxy-mode))

View File

@@ -17,8 +17,8 @@
;; ;;
;; Maintainer: ESS Core Team <ESS-core@r-project.org> ;; Maintainer: ESS Core Team <ESS-core@r-project.org>
;; Created: 7 Jan 1994 ;; Created: 7 Jan 1994
;; Package-Version: 20251015.1619 ;; Package-Version: 20251212.937
;; Package-Revision: a7d685bd9a3d ;; Package-Revision: e39ca8fa7fce
;; URL: https://ess.r-project.org/ ;; URL: https://ess.r-project.org/
;; Package-Requires: ((emacs "25.1")) ;; Package-Requires: ((emacs "25.1"))
;; ESSR-Version: 1.8 ;; ESSR-Version: 1.8

View File

@@ -3267,6 +3267,7 @@ ESS has a few extra features, which didn't fit anywhere else.
* Parens:: Parenthesis matching * Parens:: Parenthesis matching
* Graphics:: Using graphics with ESS * Graphics:: Using graphics with ESS
* Imenu:: Support for Imenu in ESS * Imenu:: Support for Imenu in ESS
* Outline:: Use outline-minor-mode in R scripts
* Toolbar:: Support for toolbar in ESS * Toolbar:: Support for toolbar in ESS
* Xref:: Xref * Xref:: Xref
* Rdired:: Directory editor for R objects * Rdired:: Directory editor for R objects
@@ -3482,7 +3483,7 @@ interaction and graphics within S-PLUS. (Thanks to Tim Hesterberg for
this information.) this information.)
 
File: ess.info, Node: Imenu, Next: Toolbar, Prev: Graphics, Up: Extras File: ess.info, Node: Imenu, Next: Outline, Prev: Graphics, Up: Extras
11.7 Imenu 11.7 Imenu
========== ==========
@@ -3501,9 +3502,42 @@ uses, check the value of imenu-generic-expression. This value is set
by various ESS variables such as ess-imenu-S-generic-expression. by various ESS variables such as ess-imenu-S-generic-expression.
 
File: ess.info, Node: Toolbar, Next: Xref, Prev: Imenu, Up: Extras File: ess.info, Node: Outline, Next: Toolbar, Prev: Imenu, Up: Extras
11.8 Toolbar 11.8 Outline navigation
=======================
R editing buffers integrate with outline-minor-mode. When you toggle
the minor mode (for example via M-x outline-minor-mode or by adding it
to ess-r-mode-hook), ESS assigns ess-r-outline-level to
outline-level and installs ess-r-outline-regexp so that comment
headings drive folding. Lines that begin with one or more #, followed
by text and a trailing marker of ----, ====, or ####, are treated
as outline headings. This matches the section markers convention
adopted by RStudio.
# Setup ----
## Data ----
### Models ====
#### Helpers ####
The number of leading # characters sets the outline depth. Use
standard Outline commands (such as C-c C-t) to cycle visibility once
the minor mode is active. To enable Outlining automatically, add it to
the R mode hook:
(add-hook 'ess-r-mode-hook #'outline-minor-mode)
-- User Option: ess-r-outline-regexp
Regular expression used by ESS to recognise outline headings in R
buffers. The default matches the RStudio-style sections shown
above, but you can customise it if you prefer a different comment
convention.

File: ess.info, Node: Toolbar, Next: Xref, Prev: Outline, Up: Extras
11.9 Toolbar
============ ============
The R and S editing modes have support for a toolbar. This toolbar The R and S editing modes have support for a toolbar. This toolbar
@@ -3515,8 +3549,8 @@ ways to change the toolbar.
 
File: ess.info, Node: Xref, Next: Rdired, Prev: Toolbar, Up: Extras File: ess.info, Node: Xref, Next: Rdired, Prev: Toolbar, Up: Extras
11.9 Xref 11.10 Xref
========= ==========
Xref is an Emacs interface that supports finding "identifiers," usually Xref is an Emacs interface that supports finding "identifiers," usually
function definitions in ESS's view. ESS ships with support for Xref in function definitions in ESS's view. ESS ships with support for Xref in
@@ -3526,7 +3560,7 @@ Emacs versions 25.1 and higher. For how to use this feature, see *Note
 
File: ess.info, Node: Rdired, Next: Package listing, Prev: Xref, Up: Extras File: ess.info, Node: Rdired, Next: Package listing, Prev: Xref, Up: Extras
11.10 Rdired 11.11 Rdired
============ ============
Ess-rdired provides a dired-like buffer for viewing, editing and Ess-rdired provides a dired-like buffer for viewing, editing and
@@ -3558,7 +3592,7 @@ the object, 'v' will view it, and 'd' will mark the object for deletion
 
File: ess.info, Node: Package listing, Next: Org, Prev: Rdired, Up: Extras File: ess.info, Node: Package listing, Next: Org, Prev: Rdired, Up: Extras
11.11 Package listing 11.12 Package listing
===================== =====================
ESS[R] provides several commands to list and manage packages and objects ESS[R] provides several commands to list and manage packages and objects
@@ -3598,7 +3632,7 @@ bindings in this mode (type ? in this buffer for a description).
 
File: ess.info, Node: Org, Next: Sweave and AUCTeX, Prev: Package listing, Up: Extras File: ess.info, Node: Org, Next: Sweave and AUCTeX, Prev: Package listing, Up: Extras
11.12 Interaction with Org mode 11.13 Interaction with Org mode
=============================== ===============================
Org-mode (<https://orgmode.org>) now supports reproducible research and Org-mode (<https://orgmode.org>) now supports reproducible research and
@@ -3617,7 +3651,7 @@ R process. (This section contributed by Dan Davison and Eric Schulte.)
 
File: ess.info, Node: Sweave and AUCTeX, Prev: Org, Up: Extras File: ess.info, Node: Sweave and AUCTeX, Prev: Org, Up: Extras
11.13 Support for Sweave in ESS and AUCTeX 11.14 Support for Sweave in ESS and AUCTeX
========================================== ==========================================
Libraries for literate data analysis are obsolete and not loaded by Libraries for literate data analysis are obsolete and not loaded by
@@ -4778,6 +4812,7 @@ Function and program index
* ess-quit: Hot keys. (line 70) * ess-quit: Hot keys. (line 70)
* ess-quit <1>: Help. (line 170) * ess-quit <1>: Help. (line 170)
* ess-R-complete-object-name: roxygen2. (line 80) * ess-R-complete-object-name: roxygen2. (line 80)
* ess-r-outline-level: Outline. (line 6)
* ess-r-package-list-available-packages: Package listing. (line 12) * ess-r-package-list-available-packages: Package listing. (line 12)
* ess-r-package-list-local-packages: Package listing. (line 9) * ess-r-package-list-local-packages: Package listing. (line 9)
* ess-r-package-update-packages: Package listing. (line 16) * ess-r-package-update-packages: Package listing. (line 16)
@@ -4827,6 +4862,7 @@ Function and program index
* mark-paragraph: roxygen2. (line 85) * mark-paragraph: roxygen2. (line 85)
* newline-and-indent: roxygen2. (line 102) * newline-and-indent: roxygen2. (line 102)
* objects(): Hot keys. (line 24) * objects(): Hot keys. (line 24)
* outline-minor-mode: Outline. (line 6)
* printer(): printer. (line 11) * printer(): printer. (line 11)
* q(): Hot keys. (line 71) * q(): Hot keys. (line 71)
* R: Starting up. (line 11) * R: Starting up. (line 11)
@@ -4877,6 +4913,8 @@ Variable index
* ess-r-flymake-linters: ESS Flymake. (line 16) * ess-r-flymake-linters: ESS Flymake. (line 16)
* ess-r-flymake-lintr-cache: ESS Flymake. (line 23) * ess-r-flymake-lintr-cache: ESS Flymake. (line 23)
* ess-R-font-lock-keywords: Highlighting. (line 19) * ess-R-font-lock-keywords: Highlighting. (line 19)
* ess-r-outline-regexp: Outline. (line 6)
* ess-r-outline-regexp <1>: Outline. (line 27)
* ess-search-list: Source Directories. (line 62) * ess-search-list: Source Directories. (line 62)
* ess-source-directory: Source Directories. (line 22) * ess-source-directory: Source Directories. (line 22)
* ess-style: Styles. (line 21) * ess-style: Styles. (line 21)
@@ -4915,6 +4953,7 @@ Concept Index
* changing ESS processes: Multiple ESS processes. * changing ESS processes: Multiple ESS processes.
(line 6) (line 6)
* cleaning up: Hot keys. (line 71) * cleaning up: Hot keys. (line 71)
* code folding: Outline. (line 6)
* comint: Credits. (line 6) * comint: Credits. (line 6)
* command history: Command History. (line 6) * command history: Command History. (line 6)
* command line arguments: iESS(R)--Inferior ESS processes. * command line arguments: iESS(R)--Inferior ESS processes.
@@ -4997,6 +5036,7 @@ Concept Index
(line 6) (line 6)
* new objects, creating: Edit buffer. (line 14) * new objects, creating: Edit buffer. (line 14)
* objects: Hot keys. (line 24) * objects: Hot keys. (line 24)
* outline-minor-mode: Outline. (line 6)
* pages in the process buffer: Transcript. (line 24) * pages in the process buffer: Transcript. (line 24)
* paging commands in help buffers: Help. (line 28) * paging commands in help buffers: Help. (line 28)
* paragraphs in the process buffer: Transcript. (line 13) * paragraphs in the process buffer: Transcript. (line 13)
@@ -5111,50 +5151,51 @@ Node: R documentation files132772
Node: roxygen2136587 Node: roxygen2136587
Node: Namespaced Evaluation141110 Node: Namespaced Evaluation141110
Node: Extras143124 Node: Extras143124
Node: ESS ElDoc144148 Node: ESS ElDoc144216
Node: ESS Flymake145728 Node: ESS Flymake145796
Node: Handy commands146858 Node: Handy commands146926
Node: Highlighting148135 Node: Highlighting148203
Node: Parens149186 Node: Parens149254
Node: Graphics149662 Node: Graphics149730
Node: printer150333 Node: printer150401
Node: X11151105 Node: X11151173
Node: winjava151444 Node: winjava151512
Node: Imenu151856 Node: Imenu151924
Node: Toolbar152711 Node: Outline152779
Node: Xref153119 Node: Toolbar154091
Node: Rdired153447 Node: Xref154501
Node: Package listing154526 Node: Rdired154831
Node: Org155974 Node: Package listing155910
Node: Sweave and AUCTeX156928 Node: Org157358
Node: ESS for R159560 Node: Sweave and AUCTeX158312
Node: ESS(R)--Editing files159860 Node: ESS for R160944
Node: iESS(R)--Inferior ESS processes160365 Node: ESS(R)--Editing files161244
Node: Philosophies for using ESS(R)163084 Node: iESS(R)--Inferior ESS processes161749
Node: Example ESS usage164011 Node: Philosophies for using ESS(R)164468
Node: ESS for SAS165415 Node: Example ESS usage165395
Node: ESS(SAS)--Design philosophy166142 Node: ESS for SAS166799
Node: ESS(SAS)--Editing files167079 Node: ESS(SAS)--Design philosophy167526
Node: ESS(SAS)--TAB key169023 Node: ESS(SAS)--Editing files168463
Node: ESS(SAS)--Batch SAS processes170437 Node: ESS(SAS)--TAB key170407
Node: ESS(SAS)--Function keys for batch processing175657 Node: ESS(SAS)--Batch SAS processes171821
Node: iESS(SAS)--Interactive SAS processes185564 Node: ESS(SAS)--Function keys for batch processing177041
Node: iESS(SAS)--Common problems189506 Node: iESS(SAS)--Interactive SAS processes186948
Node: ESS(SAS)--Graphics191120 Node: iESS(SAS)--Common problems190890
Node: ESS(SAS)--Windows191919 Node: ESS(SAS)--Graphics192504
Node: ESS for BUGS192503 Node: ESS(SAS)--Windows193303
Node: ESS for JAGS194315 Node: ESS for BUGS193887
Node: Mailing lists/bug reports197811 Node: ESS for JAGS195699
Node: Bugs198075 Node: Mailing lists/bug reports199195
Node: Reporting Bugs199751 Node: Bugs199459
Node: Mailing Lists200670 Node: Reporting Bugs201135
Node: Help with Emacs201408 Node: Mailing Lists202054
Node: Customization201944 Node: Help with Emacs202792
Node: Indices202722 Node: Customization203328
Node: Key index202897 Node: Indices204106
Node: Function and program index208029 Node: Key index204281
Node: Variable index217449 Node: Function and program index209413
Node: Concept index221010 Node: Variable index218979
Node: Concept index222686
 
End Tag Table End Tag Table

View File

@@ -1,11 +1,11 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*- ;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "flycheck" "20251119.1203" (define-package "flycheck" "20251128.1706"
"On-the-fly syntax checking." "On-the-fly syntax checking."
'((emacs "27.1") '((emacs "27.1")
(seq "2.24")) (seq "2.24"))
:url "https://www.flycheck.org" :url "https://www.flycheck.org"
:commit "1eafe2911d50c9f58efce81ff8abea59495e1ff3" :commit "62570fafbedb8fa3f7d75a50a9364feca3b294ef"
:revdesc "1eafe2911d50" :revdesc "62570fafbedb"
:keywords '("convenience" "languages" "tools") :keywords '("convenience" "languages" "tools")
:authors '(("Sebastian Wiesner" . "swiesner@lunaryorn.com")) :authors '(("Sebastian Wiesner" . "swiesner@lunaryorn.com"))
:maintainers '(("Clément Pit-Claudel" . "clement.pitclaudel@live.com") :maintainers '(("Clément Pit-Claudel" . "clement.pitclaudel@live.com")

View File

@@ -10,8 +10,8 @@
;; Bozhidar Batsov <bozhidar@batsov.dev> ;; Bozhidar Batsov <bozhidar@batsov.dev>
;; URL: https://www.flycheck.org ;; URL: https://www.flycheck.org
;; Keywords: convenience, languages, tools ;; Keywords: convenience, languages, tools
;; Package-Version: 20251119.1203 ;; Package-Version: 20251128.1706
;; Package-Revision: 1eafe2911d50 ;; Package-Revision: 62570fafbedb
;; Package-Requires: ((emacs "27.1") (seq "2.24")) ;; Package-Requires: ((emacs "27.1") (seq "2.24"))
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
@@ -10502,30 +10502,54 @@ CHECKER and BUFFER denoted the CHECKER that returned OUTPUT and
the BUFFER that was checked respectively. the BUFFER that was checked respectively.
See URL `https://proselint.com/' for more information about proselint." See URL `https://proselint.com/' for more information about proselint."
(mapcar (lambda (err) (let ((response (flycheck-parse-json output)))
(let-alist err (if (eq (caaar response) 'data)
(flycheck-error-new-at-pos ;; Proselint versions <= 0.14.0:
.start (mapcar (lambda (err)
(pcase .severity (let-alist err
(`"suggestion" 'info) (flycheck-error-new-at-pos
(`"warning" 'warning) .start
(`"error" 'error) (pcase .severity
;; Default to error (`"suggestion" 'info)
(_ 'error)) (`"warning" 'warning)
.message (`"error" 'error)
:id .check ;; Default to error
:buffer buffer (_ 'error))
:checker checker .message
;; See https://github.com/amperser/proselint/issues/1048 :id .check
:end-pos .end))) :buffer buffer
(let-alist (car (flycheck-parse-json output)) :checker checker
.data.errors))) ;; See https://github.com/amperser/proselint/issues/1048
:end-pos .end)))
(let-alist (car response)
.data.errors))
;; Proselint versions >= 0.16.0
(mapcar (lambda (err)
(let-alist err
(flycheck-error-new-at-pos
(nth 0 .span)
'warning
.message
:id .check_path
:buffer buffer
:checker checker
:end-pos (nth 1 .span))))
(let-alist (car response)
.result.<stdin>.diagnostics)))))
(flycheck-define-checker proselint (flycheck-define-checker proselint
"Flycheck checker using Proselint. "Flycheck checker using Proselint.
See URL `https://proselint.com/'." See URL `https://proselint.com/'."
:command ("proselint" "--json" "-") :command ("proselint"
(eval
(if (= (call-process (or flycheck-proselint-executable "proselint")
nil nil nil "--version")
0)
;; Proselint versions <= 0.14.0:
(list "--json" "-")
;; Proselint versions >= 0.16.0
(list "check" "--output-format=json"))))
:standard-input t :standard-input t
:error-parser flycheck-proselint-parse-errors :error-parser flycheck-proselint-parse-errors
:modes (text-mode markdown-mode gfm-mode message-mode org-mode)) :modes (text-mode markdown-mode gfm-mode message-mode org-mode))

View File

@@ -157,14 +157,22 @@ longer ones are after the value."
(concat str " " commodity) (concat str " " commodity)
(concat commodity " " str)))) (concat commodity " " str))))
(defun ledger-read-commodity-string (prompt) (defvar ledger-read-commodity-history nil
"Read an amount from mini-buffer using PROMPT." "Default history variable for `ledger-read-commodity-string'.")
(let ((str (read-from-minibuffer
(concat prompt " (" ledger-reconcile-default-commodity "): "))) (defun ledger-read-commodity-string (prompt &optional history)
comm) "Read an amount from mini-buffer using PROMPT.
(when (and (> (length str) 0)
(ledger-split-commodity-string str)) If not supplied as input, the commodity defaults to
(setq comm (ledger-split-commodity-string str)) `ledger-reconcile-default-commodity'.
If HISTORY is non-nil, it should be a minibuffer history variable.
Otherwise, default to `ledger-read-commodity-history'."
(let ((str (read-string
(format "%s (%s): " prompt ledger-reconcile-default-commodity)
nil (or history 'ledger-read-commodity-history))))
(when-let* (((> (length str) 0))
(comm (ledger-split-commodity-string str)))
(if (cadr comm) (if (cadr comm)
comm comm
(list (car comm) ledger-reconcile-default-commodity))))) (list (car comm) ledger-reconcile-default-commodity)))))

View File

@@ -304,11 +304,17 @@ an alist (ACCOUNT-ELEMENT . NODE)."
(match-string 2) (match-string 3) (match-string 4) (match-string 2) (match-string 3) (match-string 4)
(match-string 5) (match-string 6) (match-string 5) (match-string 6)
(= (line-end-position) (match-end 0))))) (= (line-end-position) (match-end 0)))))
(;; Transaction comments
(eq 'comment (car (cdr (ledger-context-at-point))))
(save-excursion
(back-to-indentation)
(setq start (point)))
(setq collection (cons 'nullary #'ledger-comments-list)))
(;; Payees (;; Payees
(eq 'transaction (eq 'transaction
(save-excursion (save-excursion
(prog1 (ledger-thing-at-point) (prog1 (ledger-thing-at-point)
(setq start (point))))) (setq start (point)))))
(setq collection (cons 'nullary #'ledger-payees-list))) (setq collection (cons 'nullary #'ledger-payees-list)))
(;; Accounts (;; Accounts
(save-excursion (save-excursion
@@ -322,10 +328,10 @@ an alist (ACCOUNT-ELEMENT . NODE)."
(- (match-beginning 0) end))) (- (match-beginning 0) end)))
realign-after t realign-after t
collection (cons 'nullary collection (cons 'nullary
(if ledger-complete-in-steps (if ledger-complete-in-steps
(lambda () (lambda ()
(ledger-complete-account-next-steps start end)) (ledger-complete-account-next-steps start end))
#'ledger-accounts-list))))) #'ledger-accounts-list)))))
(when collection (when collection
(let ((prefix (buffer-substring-no-properties start end))) (let ((prefix (buffer-substring-no-properties start end)))
(list start end (list start end
@@ -352,6 +358,20 @@ an alist (ACCOUNT-ELEMENT . NODE)."
(defun ledger-trim-trailing-whitespace (str) (defun ledger-trim-trailing-whitespace (str)
(replace-regexp-in-string "[ \t]*$" "" str)) (replace-regexp-in-string "[ \t]*$" "" str))
(defun ledger-comments-list ()
"Collect comments from the buffer."
(let ((comments '()))
(save-excursion
(goto-char (point-min))
;; FIXME: This only catches comments at beginning of lines and starting
;; with some spaces (so "transaction comments"). There can also be
;; comments after payees or prices too, as well as comments outside of
;; transactions (the latter should be completed over separately).
;; TODO: Unify this regex with `ledger-comment-regex'
(while (re-search-forward "^[ \t]+\\(?1:;.+\\)$" nil t)
(push (match-string-no-properties 1) comments)))
(sort (delete-dups comments) #'string-lessp)))
(defun ledger-fully-complete-xact () (defun ledger-fully-complete-xact ()
"Completes a transaction if there is another matching payee in the buffer. "Completes a transaction if there is another matching payee in the buffer.

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*- ;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "ledger-mode" "20250821.1439" (define-package "ledger-mode" "20251219.2350"
"Helper code for use with the \"ledger\" command-line tool." "Helper code for use with the \"ledger\" command-line tool."
'((emacs "26.1")) '((emacs "26.1"))
:url "https://github.com/ledger/ledger-mode" :url "https://github.com/ledger/ledger-mode"
:commit "e9bb645e8f05cf7ad0819b0450db7e84c9ed3f41" :commit "40e6a167530e21968e3ce7b8cb74e7595cb6009a"
:revdesc "e9bb645e8f05") :revdesc "40e6a167530e")

View File

@@ -4,8 +4,8 @@
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
;; Package-Version: 20250821.1439 ;; Package-Version: 20251219.2350
;; Package-Revision: e9bb645e8f05 ;; Package-Revision: 40e6a167530e
;; Package-Requires: ((emacs "26.1")) ;; Package-Requires: ((emacs "26.1"))
;; This is free software; you can redistribute it and/or modify it under ;; This is free software; you can redistribute it and/or modify it under

View File

@@ -92,7 +92,7 @@ Default is `ledger-default-date-format'."
:type 'string :type 'string
:group 'ledger-reconcile) :group 'ledger-reconcile)
(defcustom ledger-reconcile-target-prompt-string "Target amount for reconciliation " (defcustom ledger-reconcile-target-prompt-string "Target amount for reconciliation"
"Prompt for reconcile target." "Prompt for reconcile target."
:type 'string :type 'string
:group 'ledger-reconcile) :group 'ledger-reconcile)
@@ -522,7 +522,6 @@ Return a count of the uncleared transactions."
(delete-char -1)) ;gets rid of the extra line feed at the bottom of the list (delete-char -1)) ;gets rid of the extra line feed at the bottom of the list
(goto-char (point-min)) (goto-char (point-min))
(set-buffer-modified-p nil) (set-buffer-modified-p nil)
(setq buffer-read-only t)
(length xacts))) (length xacts)))
@@ -617,21 +616,37 @@ reconciliation, otherwise prompt for TARGET."
(ledger-reconcile-change-target target) (ledger-reconcile-change-target target)
(ledger-display-balance)))))) (ledger-display-balance))))))
(defvar ledger-reconcile-mode-abbrev-table) (defvar ledger-reconcile-target-history nil
"Minibuffer history for `ledger-reconcile-change-target'")
(defun ledger-reconcile-change-target (&optional target) (defun ledger-reconcile-change-target (&optional target)
"Change the TARGET amount for the reconciliation process." "Change the TARGET amount for the reconciliation process."
(interactive) (interactive)
(setq ledger-reconcile-target (or target (ledger-read-commodity-string ledger-reconcile-target-prompt-string))) (setq ledger-reconcile-target
(or target (ledger-read-commodity-string
ledger-reconcile-target-prompt-string
'ledger-reconcile-target-history)))
(ledger-display-balance)) (ledger-display-balance))
(defmacro ledger-reconcile-change-sort-key-and-refresh (sort-by) (defun ledger-reconcile--change-sort-key-and-refresh (sort-key)
"Set the sort-key to SORT-BY." "Set the sort-key to SORT-KEY and refresh the buffer."
`(lambda () (setq ledger-reconcile-sort-key sort-key)
(interactive) (ledger-reconcile-refresh))
(setq ledger-reconcile-sort-key ,sort-by) (defmacro ledger-reconcile--define-sort-command (name expr)
(ledger-reconcile-refresh))) "Define a sorting command named ledger-reconcile-sort-by-NAME.
The command will re-sort the reconcile buffer by EXPR."
(let ((command (intern (concat "ledger-reconcile-sort-by-" (symbol-name name)))))
`(defun ,command ()
,(concat "Sort reconcile buffer by " (symbol-name name) " and refresh.")
(interactive)
(ledger-reconcile--change-sort-key-and-refresh ,expr))))
(ledger-reconcile--define-sort-command file-order "(0)")
(ledger-reconcile--define-sort-command amount "(amount)")
(ledger-reconcile--define-sort-command date "(date)")
(ledger-reconcile--define-sort-command payee "(payee)")
(defvar ledger-reconcile-mode-map (defvar ledger-reconcile-mode-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
@@ -652,19 +667,16 @@ reconciliation, otherwise prompt for TARGET."
(define-key map (kbd "b") #'ledger-display-balance) (define-key map (kbd "b") #'ledger-display-balance)
(define-key map (kbd "B") #'ledger-reconcile-display-balance-in-header-mode) (define-key map (kbd "B") #'ledger-reconcile-display-balance-in-header-mode)
(define-key map (kbd "C-c C-o") (ledger-reconcile-change-sort-key-and-refresh "(0)")) (define-key map (kbd "C-c C-o") #'ledger-reconcile-sort-by-file-order)
(define-key map (kbd "C-c C-a") #'ledger-reconcile-sort-by-amount)
(define-key map (kbd "C-c C-a") (ledger-reconcile-change-sort-key-and-refresh "(amount)")) (define-key map (kbd "C-c C-d") #'ledger-reconcile-sort-by-date)
(define-key map (kbd "C-c C-p") #'ledger-reconcile-sort-by-payee)
(define-key map (kbd "C-c C-d") (ledger-reconcile-change-sort-key-and-refresh "(date)"))
(define-key map (kbd "C-c C-p") (ledger-reconcile-change-sort-key-and-refresh "(payee)"))
map) map)
"Keymap for `ledger-reconcile-mode'.") "Keymap for `ledger-reconcile-mode'.")
(easy-menu-define ledger-reconcile-mode-menu ledger-reconcile-mode-map (easy-menu-define ledger-reconcile-mode-menu ledger-reconcile-mode-map
"Ledger reconcile menu" "Ledger reconcile menu."
`("Reconcile" '("Reconcile"
["Save" ledger-reconcile-save] ["Save" ledger-reconcile-save]
["Refresh" ledger-reconcile-refresh] ["Refresh" ledger-reconcile-refresh]
["Finish" ledger-reconcile-finish] ["Finish" ledger-reconcile-finish]
@@ -674,10 +686,10 @@ reconciliation, otherwise prompt for TARGET."
["Change Target Balance" ledger-reconcile-change-target] ["Change Target Balance" ledger-reconcile-change-target]
["Show Cleared Balance" ledger-display-balance] ["Show Cleared Balance" ledger-display-balance]
"---" "---"
["Sort by payee" ,(ledger-reconcile-change-sort-key-and-refresh "(payee)")] ["Sort by payee" ledger-reconcile-sort-by-payee]
["Sort by date" ,(ledger-reconcile-change-sort-key-and-refresh "(date)")] ["Sort by date" ledger-reconcile-sort-by-date]
["Sort by amount" ,(ledger-reconcile-change-sort-key-and-refresh "(amount)")] ["Sort by amount" ledger-reconcile-sort-by-amount]
["Sort by file order" ,(ledger-reconcile-change-sort-key-and-refresh "(0)")] ["Sort by file order" ledger-reconcile-sort-by-file-order]
"---" "---"
["Toggle Entry" ledger-reconcile-toggle] ["Toggle Entry" ledger-reconcile-toggle]
["Add Entry" ledger-reconcile-add] ["Add Entry" ledger-reconcile-add]
@@ -687,10 +699,9 @@ reconciliation, otherwise prompt for TARGET."
["Visit Source" ledger-reconcile-visit] ["Visit Source" ledger-reconcile-visit]
["Previous Entry" previous-line] ["Previous Entry" previous-line]
"---" "---"
["Quit" ledger-reconcile-quit] ["Quit" ledger-reconcile-quit]))
))
(define-derived-mode ledger-reconcile-mode text-mode "Reconcile" (define-derived-mode ledger-reconcile-mode special-mode "Reconcile"
"A mode for reconciling ledger entries.") "A mode for reconciling ledger entries.")
(define-minor-mode ledger-reconcile-display-balance-in-header-mode (define-minor-mode ledger-reconcile-display-balance-in-header-mode

View File

@@ -98,15 +98,15 @@
(let* ((regex (eval regex)) (let* ((regex (eval regex))
(group-count (regexp-opt-depth regex)) (group-count (regexp-opt-depth regex))
(defs (defs
(list (list
`(defconst `(defconst
,(intern (concat "ledger-" (symbol-name name) "-regexp")) ,(intern (concat "ledger-" (symbol-name name) "-regexp"))
,regex ,regex
,docs) ,docs)
`(defconst `(defconst
,(intern (concat "ledger-regex-" (symbol-name name) ,(intern (concat "ledger-regex-" (symbol-name name)
"-group--count")) "-group--count"))
,group-count))) ,group-count)))
(addend 0) last-group) (addend 0) last-group)
(if (null args) (if (null args)
(progn (progn

View File

@@ -558,9 +558,9 @@ specific posting at point instead."
(find-file-other-window file) (find-file-other-window file)
(widen) (widen)
(if (markerp xact-position) (if (markerp xact-position)
(goto-char xact-position) (goto-char xact-position)
(progn (goto-char (point-min)) (progn (goto-char (point-min))
(forward-line (1- xact-position)))) (forward-line (1- xact-position))))
(when ledger-report-links-beginning-of-xact (when ledger-report-links-beginning-of-xact
(ledger-navigate-beginning-of-xact))))) (ledger-navigate-beginning-of-xact)))))

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*- ;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "magit-section" "20251108.1923" (define-package "magit-section" "20251220.917"
"Sections for read-only buffers." "Sections for read-only buffers."
'((emacs "28.1") '((emacs "28.1")
(compat "30.1") (compat "30.1")
@@ -7,8 +7,8 @@
(llama "1.0") (llama "1.0")
(seq "2.24")) (seq "2.24"))
:url "https://github.com/magit/magit" :url "https://github.com/magit/magit"
:commit "2d8f43e68125d9f7cf97ba182a5d266fe1a52c67" :commit "649b4c972151c0ee495876c0d4c8c13787614886"
:revdesc "2d8f43e68125" :revdesc "649b4c972151"
:keywords '("tools") :keywords '("tools")
:authors '(("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev")) :authors '(("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev"))
:maintainers '(("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev"))) :maintainers '(("Jonas Bernoulli" . "emacs.magit@jonas.bernoulli.dev")))

View File

@@ -8,8 +8,8 @@
;; Homepage: https://github.com/magit/magit ;; Homepage: https://github.com/magit/magit
;; Keywords: tools ;; Keywords: tools
;; Package-Version: 20251108.1923 ;; Package-Version: 20251220.917
;; Package-Revision: 2d8f43e68125 ;; Package-Revision: 649b4c972151
;; Package-Requires: ( ;; Package-Requires: (
;; (emacs "28.1") ;; (emacs "28.1")
;; (compat "30.1") ;; (compat "30.1")
@@ -105,8 +105,8 @@ similar defect.")
(define-obsolete-variable-alias 'magit-keep-region-overlay (define-obsolete-variable-alias 'magit-keep-region-overlay
'magit-section-keep-region-overlay "Magit-Section 4.0.0") 'magit-section-keep-region-overlay "Magit-Section 4.0.0")
(define-obsolete-variable-alias 'magit-section-visibility-indicator (make-obsolete-variable 'magit-section-visibility-indicator
'magit-section-visibility-indicators "Magit-Section 4.4.3") 'magit-section-visibility-indicators "Magit-Section 4.5.0")
;;; Hooks ;;; Hooks
@@ -392,7 +392,7 @@ but that ship has sailed, thus this option."
"Face used for the left margin. "Face used for the left margin.
Currently this is only used for section visibility indicators, and only Currently this is only used for section visibility indicators, and only
when `magit-section-visibility-indicator' is configured to show them in when `magit-section-visibility-indicators' is configured to show them in
the margin. the margin.
Due to limitations of how the margin works in Emacs, this is only used Due to limitations of how the margin works in Emacs, this is only used
@@ -1991,10 +1991,9 @@ When `magit-section-preserve-visibility' is nil, return nil."
(cl-defun magit-section-cache-visibility (cl-defun magit-section-cache-visibility
(&optional (section magit-insert-section--current)) (&optional (section magit-insert-section--current))
"Cache SECTION's current visibility." "Cache SECTION's current visibility."
(setf (compat-call alist-get (setf (alist-get (magit-section-ident section)
(magit-section-ident section) magit-section-visibility-cache
magit-section-visibility-cache nil nil #'equal)
nil nil #'equal)
(if (oref section hidden) 'hide 'show))) (if (oref section hidden) 'hide 'show)))
(cl-defun magit-section-maybe-cache-visibility (cl-defun magit-section-maybe-cache-visibility

View File

@@ -169,6 +169,7 @@ All Contributors
- Hannu Koivisto - Hannu Koivisto
- Hans-Peter Deifel - Hans-Peter Deifel
- hokomo - hokomo
- Huon Wilson
- Hussein Ait-Lahcen - Hussein Ait-Lahcen
- Ian Eure - Ian Eure
- Ian Milligan - Ian Milligan

View File

@@ -216,36 +216,6 @@ Also note that `git-commit-mode' (which see) is not a major-mode.")
git-commit-propertize-diff git-commit-propertize-diff
bug-reference-mode)) bug-reference-mode))
(defcustom git-commit-post-finish-hook nil
"Hook run after the user finished writing a commit message.
\\<with-editor-mode-map>\
This hook is only run after pressing \\[with-editor-finish] in a buffer used
to edit a commit message. If a commit is created without the
user typing a message into a buffer, then this hook is not run.
This hook is not run until the new commit has been created. If
that takes Git longer than `git-commit-post-finish-hook-timeout'
seconds, then this hook isn't run at all. For certain commands
such as `magit-rebase-continue' this hook is never run because
doing so would lead to a race condition.
Also see `magit-post-commit-hook'."
:group 'git-commit
:type 'hook
:get #'magit-hook-custom-get)
(defcustom git-commit-post-finish-hook-timeout 2
"Time in seconds to wait for git to create a commit.
The hook `git-commit-post-finish-hook' (which see) is run only
after git is done creating a commit. If it takes longer than
`git-commit-post-finish-hook-timeout' seconds to create the
commit, then the hook is not run at all."
:group 'git-commit
:safe 'numberp
:type 'number)
(defcustom git-commit-finish-query-functions (defcustom git-commit-finish-query-functions
(list #'git-commit-check-style-conventions) (list #'git-commit-check-style-conventions)
"List of functions called to query before performing commit. "List of functions called to query before performing commit.
@@ -586,17 +556,7 @@ Used as the local value of `header-line-format', in buffer using
(when (fboundp 'magit-commit--reset-command) (when (fboundp 'magit-commit--reset-command)
(add-hook 'with-editor-post-finish-hook #'magit-commit--reset-command) (add-hook 'with-editor-post-finish-hook #'magit-commit--reset-command)
(add-hook 'with-editor-post-cancel-hook #'magit-commit--reset-command)) (add-hook 'with-editor-post-cancel-hook #'magit-commit--reset-command))
(unless (memq last-command (git-commit-add-post-finish-hook)
'(magit-sequencer-continue
magit-sequencer-skip
magit-am-continue
magit-am-skip
magit-rebase-continue
magit-rebase-skip))
(add-hook 'with-editor-post-finish-hook
(apply-partially #'git-commit-run-post-finish-hook
(magit-rev-parse "HEAD"))
nil t))
(setq with-editor-cancel-message (setq with-editor-cancel-message
#'git-commit-cancel-message) #'git-commit-cancel-message)
(git-commit-setup-font-lock) (git-commit-setup-font-lock)
@@ -615,17 +575,6 @@ Used as the local value of `header-line-format', in buffer using
(setq with-editor-usage-message git-commit-usage-message)) (setq with-editor-usage-message git-commit-usage-message))
(with-editor-usage-message)) (with-editor-usage-message))
(defun git-commit-run-post-finish-hook (previous)
(when git-commit-post-finish-hook
(if (with-timeout (git-commit-post-finish-hook-timeout)
(while (equal (magit-rev-parse "HEAD") previous)
(sit-for 0.01))
t)
(run-hooks 'git-commit-post-finish-hook)
(message "No commit created after %s second. Not running %s."
git-commit-post-finish-hook-timeout
'git-commit-post-finish-hook))))
(define-minor-mode git-commit-mode (define-minor-mode git-commit-mode
"Auxiliary minor mode used when editing Git commit messages. "Auxiliary minor mode used when editing Git commit messages.
This mode is only responsible for setting up some key bindings. This mode is only responsible for setting up some key bindings.
@@ -1201,6 +1150,62 @@ Elisp doc-strings, including this one. Unlike in doc-strings,
(1 font-lock-constant-face prepend)) (1 font-lock-constant-face prepend))
("\"[^\"]*\"" (0 font-lock-string-face prepend)))) ("\"[^\"]*\"" (0 font-lock-string-face prepend))))
;;; Post Hook
(defcustom git-commit-post-finish-hook nil
"Hook run after the user finished writing a commit message.
\\<with-editor-mode-map>\
This hook is only run after pressing \\[with-editor-finish] in a buffer used
to edit a commit message. If a commit is created without the
user typing a message into a buffer, then this hook is not run.
This hook is not run until the new commit has been created. If
that takes Git longer than `git-commit-post-finish-hook-timeout'
seconds, then this hook isn't run at all. For certain commands
such as `magit-rebase-continue' this hook is never run because
doing so would lead to a race condition.
Also see `magit-post-commit-hook'."
:group 'git-commit
:type 'hook
:get #'magit-hook-custom-get)
(defcustom git-commit-post-finish-hook-timeout 2
"Time in seconds to wait for git to create a commit.
The hook `git-commit-post-finish-hook' (which see) is run only
after git is done creating a commit. If it takes longer than
`git-commit-post-finish-hook-timeout' seconds to create the
commit, then the hook is not run at all."
:group 'git-commit
:safe 'numberp
:type 'number)
(defun git-commit-add-post-finish-hook ()
(unless (memq last-command
'(magit-sequencer-continue
magit-sequencer-skip
magit-am-continue
magit-am-skip
magit-rebase-continue
magit-rebase-skip))
(add-hook 'with-editor-post-finish-hook
(apply-partially #'git-commit-run-post-finish-hook
(magit-rev-parse "HEAD"))
nil t)))
(defun git-commit-run-post-finish-hook (previous)
(when git-commit-post-finish-hook
(if (with-timeout (git-commit-post-finish-hook-timeout)
(while (equal (magit-rev-parse "HEAD") previous)
(sit-for 0.01))
t)
(run-hooks 'git-commit-post-finish-hook)
(message "No commit created after %s second. Not running %s."
git-commit-post-finish-hook-timeout
'git-commit-post-finish-hook))))
;;; _ ;;; _
(define-obsolete-function-alias (define-obsolete-function-alias

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
if [[ "$INSIDE_EMACS" == *magit ]]
then
for arg in "$@"; do args+="\"$arg\""; done
$GIT_EDITOR --eval \
"(magit-run-git-hook '(common-post-commit post-commit) ${args[@]})"
fi
if [[ -x "$SHADOWED_GITHOOK_DIRECTORY" ]]
then
"$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

13
lisp/magit/git-hooks/post-merge Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
if [[ "$INSIDE_EMACS" == *magit ]]
then
for arg in "$@"; do args+="\"$arg\""; done
$GIT_EDITOR --eval \
"(magit-run-git-hook '(common-post-commit post-merge) ${args[@]})"
fi
if [[ -x "$SHADOWED_GITHOOK_DIRECTORY" ]]
then
"$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
if [[ "$INSIDE_EMACS" == *magit ]]
then
for arg in "$@"; do args+="\"$arg\""; done
$GIT_EDITOR --eval \
"(magit-run-git-hook '(common-post-commit post-rewrite) ${args[@]})"
fi
if [[ -x "$SHADOWED_GITHOOK_DIRECTORY" ]]
then
"$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

8
lisp/magit/git-hooks/pre-push Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
hook="$SHADOWED_GITHOOK_DIRECTORY/$(basename $0)"
if [[ -x "$hook" ]]
then
"$hook" "$@"
fi

Some files were not shown because too many files have changed in this diff Show More