unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#41621: [PATCH] Add missing documentation (canonicalize-path)
@ 2020-05-30 21:07 Ricardo G. Herdt
  2020-06-17 21:32 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo G. Herdt @ 2020-05-30 21:07 UTC (permalink / raw)
  To: 41621

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]

Guile's manual doesn't mention the procedure canonicalize-path. I copied 
it over from libguile/filesys.c, and just added "(absolute)" to the text 
to help users finding it, since this term is more usual in other 
languages. I didn't make this change to filesys.c though.

Regards,

Ricardo G. Herdt

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-doc-Add-missing-canonicalize-path-documentation.patch --]
[-- Type: text/x-diff; name=0001-doc-Add-missing-canonicalize-path-documentation.patch, Size: 1309 bytes --]

From f899d43554f81bf1d20c22e07437a4e49e2bb400 Mon Sep 17 00:00:00 2001
From: "Ricardo G. Herdt" <r.herdt@posteo.de>
Date: Sat, 30 May 2020 22:50:16 +0200
Subject: [PATCH] doc: Add missing canonicalize-path documentation.

The documentation is copied over from libguile/filesys.c. I just added
"(absolute)" to the text to help users finding it, since this term is
more common in other languages.

* doc/ref/posix.texi
---
 doc/ref/posix.texi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/doc/ref/posix.texi b/doc/ref/posix.texi
index b2be9d707..f34c5222d 100644
--- a/doc/ref/posix.texi
+++ b/doc/ref/posix.texi
@@ -1040,6 +1040,21 @@ If @var{suffix} is provided, and is equal to the end of
 @end lisp
 @end deffn
 
+@deffn {Scheme Procedure} canonicalize-path path
+@deffnx {C Function} scm_canonicalize_path (path)
+Return the canonical (absolute) path of @var{path}.
+A canonical path has no @code{.} or @code{..} components,
+nor any repeated path separators (@code{/}) nor symlinks.
+
+Raises an error if any component of @var{path} does not
+exist.
+
+@lisp
+(canonicalize-path "test.xml")
+@result{} "/tmp/test.xml"
+@end lisp
+@end deffn
+
 @deffn {Scheme Procedure} file-exists? filename
 Return @code{#t} if the file named @var{filename} exists, @code{#f} if
 not.
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#41621: [PATCH] Add missing documentation (canonicalize-path)
  2020-05-30 21:07 bug#41621: [PATCH] Add missing documentation (canonicalize-path) Ricardo G. Herdt
@ 2020-06-17 21:32 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-06-17 21:32 UTC (permalink / raw)
  To: Ricardo G. Herdt; +Cc: 41621-done

Hi,

"Ricardo G. Herdt" <r.herdt@posteo.de> skribis:

> From f899d43554f81bf1d20c22e07437a4e49e2bb400 Mon Sep 17 00:00:00 2001
> From: "Ricardo G. Herdt" <r.herdt@posteo.de>
> Date: Sat, 30 May 2020 22:50:16 +0200
> Subject: [PATCH] doc: Add missing canonicalize-path documentation.
>
> The documentation is copied over from libguile/filesys.c. I just added
> "(absolute)" to the text to help users finding it, since this term is
> more common in other languages.
>
> * doc/ref/posix.texi

Applied, thanks!

Ludo’.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-17 21:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-30 21:07 bug#41621: [PATCH] Add missing documentation (canonicalize-path) Ricardo G. Herdt
2020-06-17 21:32 ` Ludovic Courtès

unofficial mirror of bug-guile@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
		bug-guile@gnu.org
	public-inbox-index guile-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.bugs
	nntp://news.gmane.io/gmane.lisp.guile.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git