diff --git a/ChangeLog b/ChangeLog
index b617d5a3fbc0fe77d175e850c7573894e193b178..d837d36c29c9d190719dd712a1584e8e5651eaef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-04-08  Hans Alves  <fonsvandeachterburen@gmail.com>
+	* nano.h, files.c, nano.c: Adding the command-line option --noread
+	to treat any name on the command line as a new file.  This allows
+	nano to write to named pipes -- it will start with a blank buffer,
+	and will write to the pipe when the user saves the file.  This way
+	nano can be used as an editor in combination with for instance gpg
+	without having to write sensitive data to disk first.
+
 2014-04-08  David Lawrence Ramsey  <pooka109@gmail.com>
 	* src/*.c: More editing of comment blocks and trimming of blank lines.
 
diff --git a/src/files.c b/src/files.c
index 7eb3f11305cfaad895c36cb9a04ed1fa6083f4e2..f876dd8c50b54a8406870d16409be8b138eac3a3 100644
--- a/src/files.c
+++ b/src/files.c
@@ -328,10 +328,10 @@ void open_buffer(const char *filename, bool undoable)
     if (new_buffer)
 	make_new_buffer();
 
-    /* If the filename isn't blank, open the file.  Otherwise, treat it
-     * as a new file. */
-    rc = (filename[0] != '\0') ? open_file(filename, new_buffer, &f) :
-	-2;
+    /* If the filename isn't blank, and we are not in NOREAD_MODE,
+     * open the file.  Otherwise, treat it as a new file. */
+    rc = (filename[0] != '\0' && !ISSET(NOREAD_MODE)) ?
+		open_file(filename, new_buffer, &f) : -2;
 
     /* If we have a file, and we're loading into a new buffer, update
      * the filename. */
diff --git a/src/nano.c b/src/nano.c
index c949ca082094090fbe23614bbe93439f7a39890a..67c97cac17d7d701288e0c6de6c8554c903e684e 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -916,6 +916,7 @@ void usage(void)
 #ifndef DISABLE_MOUSE
     print_opt("-m", "--mouse", N_("Enable the use of the mouse"));
 #endif
+    print_opt("-n", "--noread", N_("Do not read the file (only write it)"));
 #ifndef DISABLE_OPERATINGDIR
     print_opt(_("-o <dir>"), _("--operatingdir=<dir>"),
 	N_("Set operating directory"));
@@ -2121,6 +2122,7 @@ int main(int argc, char **argv)
 #ifndef DISABLE_MOUSE
 	{"mouse", 0, NULL, 'm'},
 #endif
+	{"noread", 0, NULL, 'n'},
 #ifndef DISABLE_OPERATINGDIR
 	{"operatingdir", 1, NULL, 'o'},
 #endif
@@ -2193,11 +2195,11 @@ int main(int argc, char **argv)
     while ((optchr =
 #ifdef HAVE_GETOPT_LONG
 	getopt_long(argc, argv,
-		"h?ABC:DEFGHIKLNOPQ:RST:UVWY:abcdefgijklmo:pqr:s:tuvwxz$",
+		"h?ABC:DEFGHIKLNOPQ:RST:UVWY:abcdefgijklmno:pqr:s:tuvwxz$",
 		long_options, NULL)
 #else
 	getopt(argc, argv,
-		"h?ABC:DEFGHIKLNOPQ:RST:UVWY:abcdefgijklmo:pqr:s:tuvwxz$")
+		"h?ABC:DEFGHIKLNOPQ:RST:UVWY:abcdefgijklmno:pqr:s:tuvwxz$")
 #endif
 		) != -1) {
 	switch (optchr) {
@@ -2325,6 +2327,9 @@ int main(int argc, char **argv)
 		SET(USE_MOUSE);
 		break;
 #endif
+	    case 'n':
+		SET(NOREAD_MODE);
+		break;
 #ifndef DISABLE_OPERATINGDIR
 	    case 'o':
 		operating_dir = mallocstrcpy(operating_dir, optarg);
diff --git a/src/nano.h b/src/nano.h
index 7976a6b4660b65b6f4b78e75032f3b9608452f23..6d51a2cf9eec3ad80723cbbafed957838a6eff77 100644
--- a/src/nano.h
+++ b/src/nano.h
@@ -532,7 +532,8 @@ enum
     UNDOABLE,
     SOFTWRAP,
     POS_HISTORY,
-    LOCKING
+    LOCKING,
+    NOREAD_MODE
 };
 
 /* Flags for the menus in which a given function should be present. */